4

I am a newbie on testing web apps. I am trying to do a headless regression testing with Selenium and Jenkins with help of PhantomJS but i am having problem in setting up this process.

Please provide me a solution. If there is already a discussion on this topic, please help me with the link.

Technext
  • 7,887
  • 9
  • 48
  • 76
privotester
  • 43
  • 1
  • 1
  • 3
  • 1
    When you are asking for some help, you should spare some time to write your query. Some research from your side is also expected. – Technext Aug 12 '14 at 05:30
  • Thanks for a quick reply, I am sorry for not including my research results here, since this is my first question on stackoverflow. thanks for correcting my question. will make sure it will be proper from now on. – privotester Aug 12 '14 at 05:37

1 Answers1

3

There is no plugin available for PhantomJS than can be integrated with Jenkins.

As far as installing PhantomJS goes, you have to setup the same on the slave/build agent and it is ready to go. If you are ok with using any other CI tool, then you can also look for TravisCI (http://docs.travis-ci.com/user/gui-and-headless-browsers/). It has built-in support for PhantomJS.

These links might also help you start with the process:
How can I setup & run PhantomJS on Ubuntu?
https://code.google.com/p/phantomjs/wiki/BuildInstructions
http://attester.ariatemplates.com/usage/phantom.html

Once you're done setting up PhantomJS, you can check this video link which talks about Speed Up Your Selenium Tests with PhantomJS: https://www.youtube.com/watch?v=wqxkKIC2HDY

Community
  • 1
  • 1
Technext
  • 7,887
  • 9
  • 48
  • 76
  • This is my scenario: 1. Jenkins already installed on my PC(windows 7) 2. selenium test cases are built and checked already on ff browser. 3. but now its required to do headless testing through jenkins. 4. for that to run my selenium test cases, i need a tool to be integrated in jenkins. 5. if its not phantomJS, which tool i can use to get this whole process done? – privotester Aug 12 '14 at 05:52
  • Why are you looking for an alternative when PhantomJS is available for Windows? You should try downloading PhantomJS and see how it goes. `http://phantomjs.org/download.html` – Technext Aug 12 '14 at 05:57
  • Check the video link in my answer too once you've setup PhantomJS. – Technext Aug 12 '14 at 06:02
  • I have downloaded it already and the examples are working fine when i execute from command line. my problem is that i am not able to make it work in integration with jenkins, 1.i schedule tests in jenkins 2.the tests should run with help of phantomjs – privotester Aug 12 '14 at 06:22
  • Thank you. will do some more research and post the solution here soon. – privotester Aug 12 '14 at 06:42
  • I have never used Selenium with Jenkins but this link should help you: `http://www.appneta.com/blog/automated-testing-java/` – Technext Aug 12 '14 at 06:47
  • Thank you sir, but I tried this before asking question here – privotester Aug 13 '14 at 06:10
  • here is the answer to this. In your jenkins job, run the selenium server locally - java -jar selenium-server-standalone-2.46.0.jar & >> /dev/null (run the selenium server in the background and direct output to null). Now invoke your phantomjs scripts, the same way you do in your local – user3920295 May 20 '17 at 15:31