diff -r 2e8eeb919028 -r b538b70cbe51 settingsengines/sdb/tests/native/SdbTest/Readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/settingsengines/sdb/tests/native/SdbTest/Readme.txt Thu Mar 11 18:20:56 2010 +0200 @@ -0,0 +1,75 @@ +SdbTest +======= + + SdbTest works in cooperation with Java part of the framework (see Emulator class). + + Emulator launches SdbTest executable and can retrieve test result. SdbTest stores result code in: + + epoc32/winscw/c/SdbTestOut.txt. + + Each native test is named. Particular test to be run when SdbTest is specified by including test + name as the first parameter on the command line. + + +Java example +============ + + From the Java side it is enough to write: + + // Discovering available emulators + + // Emulator configs are read from XML file specified by "com.symbian.sdb.emulator.def" system property + // See below for example file + Emulator[] emulators = Emulator.availableEmulators() + + + // Running the test and checking the result + + emulators[0].setOutFile("SdbTestOut.txt"); + String [] cmds = {"ExampleTest"}; + try{ + int result = emulators[0].runNativeTestAndWait("SdbTest.exe", cmds, SymbianStartupMode.TEXT_ONLY); + System.out.println("OK : " + Integer.toHexString(result)); + } catch(Exception e){ + e.printStackTrace(); + } + + + +Adding a native verification test +================================= + + 1. Modify RegisterTestsL in src/Tests.cpp to register your test function + 2. Implement your test function by either: + a) Adding your test function to src/Tests.cpp + b) Implementing test function in a separate file and adding the new file to group/SdbTest.mmp. + + An example test named ExampleTest is included in the src/Tests.cpp. + + +Example Emulator definition XML file +==================================== + + + + N + /9.3/ + WINSCW + UDEB + SOS_9_3 + + + N + /9.4/ + WINSCW + UDEB + SOS_9_4 + + + N + /9.5/ + WINSCW + UDEB + SOS_9_5 + + \ No newline at end of file