nikgoodley-ibboost / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Not able to execute the jstestdriver from TeamCity. #314

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am getting the below error while executing the below command in MSBuild by 
TeamCity.

Error : 

 C:\Program Files (x86)\TeamCity\buildAgent\work\6bdb674d7534af4f\BuildScripts\Package.proj(108,5): error MSB3073: The command ""C:\JavaRuntime\bin\java.exe" -jar "D:\JsTD\JsTestDriver-1.3.3d.jar" --port 9876 --browser "C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe" --config "C:\Program Files (x86)\TeamCity\buildAgent\work\6bdb674d7534af4f\MyAppIntegrationServices\js\jsTestDriver.conf" --testOutput "D:\Output" --tests all" exited with code 1.

Target definition in MSBuild: 

<Target Name="JSTestDriver">
    <Message Text="##teamcity[progressMessage 'Running JS Test Driver']" Importance="high" />
    <Message Text="-------- Running JS Test Driver --------" Importance="high" />

    <PropertyGroup>

      <JavaDir>"C:\JavaRuntime\bin\java.exe"</JavaDir>
      <JSTestDriverJar>&quot;D:\JsTD\JsTestDriver-1.3.3d.jar&quot;</JSTestDriverJar>
      <ConfigFile>&quot;$(MSBuildStartupDirectory)\MyAppIntegrationServices\js\jsTestDriver.conf&quot;</ConfigFile>
      <IEPath>&quot;C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe&quot;</IEPath>
      <OutputDir>&quot;D:\Output&quot;</OutputDir>
    </PropertyGroup>

    <Exec Command='$(JavaDir) -jar $(JSTestDriverJar) --port 9876 --browser $(IEPath) --config $(ConfigFile) --testOutput $(OutputDir) --tests all'/>

  </Target>

Can you please help me this out?

Original issue reported on code.google.com by peermoha...@gmail.com on 23 Dec 2011 at 12:48

GoogleCodeExporter commented 9 years ago
I know nothing of TeamCity. Try running with --runnerMode=DEBUG and attach the 
log.

Original comment by corbinrs...@gmail.com on 27 Dec 2011 at 5:13

GoogleCodeExporter commented 9 years ago
Hi,

I tried with --runnermode DEBUG. Not positive.

Note : 

* I can able to execute and launch the browser when directly executing this 
command in command prompt.
* I tried with different browsers.
* I changed the config file and JS file location and tried.

Please find the attached Build Log.

Original comment by peermoha...@gmail.com on 28 Dec 2011 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
I don't see any error. It appears that the process still exited with a failure 
code. Odd. It looks like TeamCity is looking for logged errors, does it fail 
based on those?

Original comment by corbinrs...@gmail.com on 28 Dec 2011 at 9:17

GoogleCodeExporter commented 9 years ago
Hi, 

Sorry for the late reply. Thanks for your timely reply. I resolved the issue. 
The BuildAgent of TeamCity was running with different user credentials, so that 
it was not able to launch the JsTD server. I restarted the TeamCity's 
BuildAgent service with same credentials in which MSBuild runs. Now it is 
working fine.

Thanks
Mydeen.

Original comment by peermoha...@gmail.com on 2 Jan 2012 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by corbinrs...@gmail.com on 2 Jan 2012 at 3:48