[TIMOB-17833] Run ti-mocha tests as part of Jenkins build
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-03-11T16:58:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.0 |
Components | Tooling, Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2014-10-09T18:57:01.000+0000 |
Updated | 2017-03-14T20:08:13.000+0000 |
Description
Tools/Scripts/generate_vs_project.sh Mocha
cygstart.exe Mocha.WindowsPhone.Win32/Mocha.sln
http://social.technet.microsoft.com/wiki/contents/articles/18173.how-to-launch-windows-phone-8-emulator-without-using-visual-studio-2012.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/dn632395.aspx#BKMK_commandline
There are a few hurdles here. One is generating the solution then building it. I've been able to do that, though it reports errors related to google test. Here's what I run:
and what I get:
The next is trying to launch the app in an emulator. That seems to be done by:
The first time I run that it starts the emulator but doesn't seem to actually launch the app. If I keep the emulator open and run it again, it launches the app. But now, the issue is that our logger only outputs to an attached debugger, not stdout/stderr or a file. So we can see output when run through VS 2013, but not through this AppDeployCmd.exe. I'm trying to generate a quick branch that actually logs to stdout to see if we can then get the output of running the app/tests.
Highly related: http://justinangel.net/WindowsPhone7EmulatorAutomation
OK, so the way to do this is to log to a file inside the actual app's local storage and then grab that file out of the emulator. I have to modify our logging code to generate the log.txt file and append to it as we go. Then I can do:
The guid there is our app's guid, which I'll have to grab out of the mocha project, I suppose. We should then have the logfile at "C:\Program Files (x86)\Jenkins\jobs\titanium_mobile_windows\workspace\build\IsolatedStorage\log.txt"
[~cwilliams] How will you know when the tests have completed and you can pull the log from isolated storage?
Finally! See http://studio-jenkins.appcelerator.org/job/titanium_mobile_windows/lastCompletedBuild/testReport/
Closing ticket as fixed.