I want to run Selenium tests written in TestNG framework using Jenkins.
The command configured in jenkins job (Freestyle project):
java -cp J:\\taf\\tes
This is not TestNG or Selenium issue. This error sometimes occure when Jenkins is insalled as Windows Service. Install Jenkins inside servlet container like Tomcat or GlassFish and it should help.
As suggested by Mackowski
, installed Jenkins
in tomcat
as a webapp
(instead of Windows Service
) and it solved the issue.
Reference:
Note: When we run the tests when deployed Jenkins as Windows Service
, no browser GUI is launched/observed. Jenkins inside tomcat
, browser GUI is launched.