I want to write (unit) tests for my widget, but I must be doing some stupid and hopefully simple mistake.
Here is my test code; it is in file "TestHowToTest.mc":
class TestHowToTest
{
(:test)
static function testHowToTest(logger)
{
Test.assertEqual(1,1);
return true;
}
}
I compile with this statement; maybe the "-t" flag is at the wrong place?:
/.../EclipseSDK/connectiq-sdk-mac-2.1.3/bin/monkeyc -t -o /.../TestUnitTest/bin/TestUnitTest.prg -w -y /.../key.. -z /.../TestUnitTest/resources/drawables/drawables.xml:/.../TestUnitTest/resources/layouts/layout.xml:/.../TestUnitTest/resources/strings/strings.xml -m /.../TestUnitTest/manifest.xml /.../TestUnitTest/source/TestHowToTest.mc /.../TestUnitTest/source/TestUnitTestView.mc /.../TestUnitTest/source/TestUnitTestApp.mc -d fr735xt_sim
Monkeyc also logs this warning: "WARNING: UnitTests:11: Class 'RunNoEvil' does not initialize its super class, 'Test'", but I don't know how to fix this.
I start the simulator like this:
/.../connectiq-sdk-mac-2.1.3/bin/connectiq
I try to execute the tests with this command:
/.../connectiq-sdk-mac-2.1.3/bin/monkeydo /.../TestUnitTest/bin/TestUnitTest.prg /t
What happens then is that the simulator window remains "blank" and the terminal outputs this:
...
File pushed successfully
Connection Finished
Closing shell and port
Found Transport: tcp
Connecting...
Connecting to device...
Device Version 0.1.0
Device id 1 name "A garmin device"
Shell Version 0.1.0
I do all this on a Mac.
I have tried a lot of different flavors of the code and the command line commands, but with no success.
Does anyone know where my error is? Of course, I have read the documentation about how to test, but maybe I miss something...
Thanks,
Florian