Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » JUnit test for the Scout Search Form
JUnit test for the Scout Search Form [message #1151190] Wed, 23 October 2013 03:21 Go to next message
Eclipse UserFriend
Hi,

I am using Eclipse Scout Version: 4.3.0. In order to test a presentation functionality on a Form level I have created a test case. Here is a short description of my JUnit test case:
1. Create instances of the Form and FormData classes
2. Add some search data in the FormData instance
3. Export FormData
4. Call the service on the Scout Server side
5. Import FormData and verify some response data received in the FormData

By running a JUnit test I got the NullPointerException. It seems that in my test case I have to create Desktop and DesktopExtension instances as well and to add the form to the DesktopExtension.

I appreciate if somebody can help me about this issue, or any example for testing Forms by JUnit.

Kind regards,

Dusan.
Re: JUnit test for the Scout Search Form [message #1151607 is a reply to message #1151190] Wed, 23 October 2013 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dusan,

thanks for your post. Can you please post the complete stacktrace? This will help us to help you Smile

Greetings
Matthias
Re: JUnit test for the Scout Search Form [message #1151830 is a reply to message #1151607] Wed, 23 October 2013 12:31 Go to previous message
Eclipse UserFriend
I assume you get the NullPointerException on the call SERVICES.getService(..). This is because JUnit tests needs to run inside a Scout Session.

You might find some inputs in my presentation: Testing a Scout Application with JUnit (EclipseCon Boston 2013) and in the corresponding blog post.

We have a running demo app that contains some tests: Minifig Application

Have a look, do not hesitate to ask. This is something we need to document better.
Previous Topic:LoginDialog example
Next Topic:MySql trouble with SearchForm
Goto Forum:
  


Current Time: Thu Jul 03 12:21:49 EDT 2025

Powered by FUDForum. Page generated in 0.04226 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top