How to run Selenium tests using TestNG framework and Jenkins

前端 未结 2 1889
半阙折子戏
半阙折子戏 2021-01-22 11:22

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         


        
相关标签:
2条回答
  • 2021-01-22 11:28

    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.

    0 讨论(0)
  • 2021-01-22 11:49

    As suggested by Mackowski, installed Jenkins in tomcat as a webapp (instead of Windows Service) and it solved the issue.

    Reference:

    1. https://wiki.jenkins-ci.org/display/JENKINS/Tomcat

    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.

    0 讨论(0)
提交回复
热议问题