Hi,
What does everyone do about unit testing for their connect IQ apps? Also what about integrating into a CI tool like Jenkins?
Thanks,
Ricky
I have unit tested most of my functional modules using a JUnit like framework I have developed.
As Connect IQ lacks reflection, the tests are very Junit3 like. I have also worked on a new editor that would collect the needed information, but that is currently on pause as I don't have the time for it right now.
I have also started development of a simple Maven plugin that will invoke monkeybrains to do the compilation. (I would have liked just to use the existing scripts and the ant-runner, but my CI environment in
on a Linux machine and the scripts are not reporting back the proper information...). My main problem here is that the needed Garmin jars are not found on Maven Central, so they will have to be embedded in the plugin or downloaded on the fly.
How do you invoke the unit tests?
Well, that is the stupid part...
Currently I have a separate ConnectIQ project and simply copy over the needed files.
The unit tests are then invoked directly from App.onStart(state)... I intend to add to this so it will be a proper app in the end.
If all tests succeed then it writes "SUCCESS" on the stdout.
Otherwise it writes the exception...
The mentioned maven plugin will then use a special special directory with the test sources as you normally see when you use Maven for Java projects.
So the directory structure will something like:
<base>
- manifest.mf
- resources*/*
- sources/*.mc
- tests/manifest.mf (auto-generated if not present)
- tests/sources/*.mc
I hope I will have the time for this within the next few months...
how do you translate es6 to monkeyc?
Hi!
I know this is an old thread. But I have written an article on the subject. It doesn't include anything about tests yet, but I'm working on adding support for it.
You can find the article here: https://jokarls.github.io/post/donkeybrains/