views:

40

answers:

1

Hello Stackfolks,

We have our own unit test framework for blackberry application. And now we need to generate unit test report in text file, before we were just printing on console.

CommandController.java - Sends commands to blackberry simulator and receive response in string format. It displays which commands has sent to simulator and responses on console

TestResults.java - compares the string response received above with expected value and prints success or failure info.

CommandController.java and TestResults.java are invoked from main class SimmTest.java.

Now I want to capture the info from both CommandController.java and TestResult.java in text file and as well as display on console.

Please let me know the best practices or patterns for this scenario. Thanks for help!

A: 

I don't know about java and blackberry but a format I like to display tests results is "TAP"

http://en.wikipedia.org/wiki/Test_Anything_Protocol

Basically the output of the tests is something like that :

  1..12
  ok 1 - This is the title of the first test
  not ok 2 - This is the title of the second test
siukurnin
Thanks for reply. But my question is more about coding best practices/patterns, not on how to print info. Like how to get info from both java classes into one place and write it to file and console. And also order of message capture should be in sequence.
ramrajedotcom
And also forget about blackberry... think as normal standalone java app
ramrajedotcom