Getting unit tests to run on a CI environment



Just wondering if anyone has had success getting unit tests to run in a CI/CD environment.

On Buddybuild - I was able to sort of ‘trick’ it into running my unit tests for an iOS device, but could not get things to run for Android - the emulator would boot, then just hang after running the tns test android --emulator command.

I’ve also tried getting an Android build running on CircleCI - managed to get my CircleCI environment setup with the right version of java, SDKs, etc - an emulator would launch, but then the tns test command would say ‘synced files to device’ - then do nothing for ~10 mins and the build would timeout.

If anyone has a sample repo / CI environment with this setup and working and could offer some guidance, would be greatly appreciated.



Hi Even,

Did you ever find an answer to this? I am trying to solve the same problem now, with no luck so far.



I know this is old, but I was facing the same problem and executing this command worked for me:
tns test android --emulator --justlaunch