BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-03-2009, 12:00 AM   #1 (permalink)
New Member
 
Join Date: Sep 2009
Model: None
PIN: N/A
Carrier: None
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatic unit tests

Please Login to Remove!

Is there a way to automatically run unit tests on a device / simulator?
The goal is to have a script that would run nightly, build the CODs (and load them), and then run a set of sanity tests. If any of the tests fail - a mail should be sent (or any other notification message should be activated).
I looked at BUnit, but it only runs on the device itself, and requires manual activation and a person that would look at the screen and see the result.
Thanks
Offline  
Old 09-03-2009, 08:15 AM   #2 (permalink)
BlackBerry Master
 
dankarlinski's Avatar
 
Join Date: May 2007
Model: 1
Carrier: 1
Posts: 3,391
Post Thanks: 1
Thanked 2 Times in 2 Posts
Default

Wirelessly posted (White and Nerdy)

I would imagine there would be something like that thru a BES, but not BIS. When you reboot however, it does run a security check. Hope this helps. =)
Offline  
Old 09-06-2009, 10:38 AM   #3 (permalink)
New Member
 
Join Date: Sep 2009
Model: None
PIN: N/A
Carrier: None
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The BES can load the tests to the device.
However, there is still the need to close the loop, and get the results of the run back to the build machine. How would you recommend that the BES would return the result?
Offline  
Old 09-09-2009, 02:30 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: none
PIN: N/A
Carrier: none
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, there is, but it's not free. Our ant script builds everything, launches our app server, mds simulator, and the device simulator, and the test app executes automatically running all the unit tests. Then the test app talks back to our ant task to report unit tests results, everything gets shut down, and the script continues.

The unit tests are based on J2MEUnit, but we've modified it to work more like JUnit, so tests are wired together automatically during the build, you just define your test*() methods.

Quote:
Originally Posted by Goldi View Post
Is there a way to automatically run unit tests on a device / simulator?
The goal is to have a script that would run nightly, build the CODs (and load them), and then run a set of sanity tests. If any of the tests fail - a mail should be sent (or any other notification message should be activated).
I looked at BUnit, but it only runs on the device itself, and requires manual activation and a person that would look at the screen and see the result.
Thanks
Offline  
Old 09-10-2009, 12:40 AM   #5 (permalink)
New Member
 
Join Date: Sep 2009
Model: None
PIN: N/A
Carrier: None
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sounds exactly like what we are looking for.
When you say that it is not free - Is it a product (that we can buy), or an in-house solution?
Can you elaborate how the test app talks back with the ANT script? Is it through log files, direct TCP connection, or something else?
Offline  
Old 09-14-2009, 08:11 PM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: none
PIN: N/A
Carrier: none
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Goldi View Post
Sounds exactly like what we are looking for.
When you say that it is not free - Is it a product (that we can buy), or an in-house solution?
Can you elaborate how the test app talks back with the ANT script? Is it through log files, direct TCP connection, or something else?
It's an in-house solution. Not free, meaning it doesn't come with the RIM dev environment, or in any free library.

The test app talks back to the build script using TCP. There is an ant task that we created that will listen on a certain port for the test app output and test results.
Offline  
Old 09-15-2009, 02:14 AM   #7 (permalink)
New Member
 
Join Date: Sep 2009
Model: None
PIN: N/A
Carrier: None
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. I hoped to be able to use a communication mechanism that already exists, such as the JDWP or the JavaLauncher.
I hope RIM would add such a capability in the future.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.