How to make Jenkins run Selenium WebDriver/TestNG/Java tests automatically on deploy and what has Maven to do with all this? -


i've been researching few hours now, i've found pieces of big picture. everywhere assuming reader has part of system set up.

i think useful have big picture description of parts needed put whole thing together.

they "use maven selenium tests" , on , forth.

edit: after research found out need install maven in jenkins , on computer, install maven plugin eclipse, , create/convert projects maven projects. how transfer maven projects in jenkins? export .jar, or move whole folder on server? how connect whole thing xvfb?

so here know far

  1. install jenkins (we have on our server)
  2. install plugins jenkins (which ones?)
  3. install xvfb tests run in headless browser (how specify in java written test?)
  4. install maven on computer, jenkins , eclipse, use maven projects.
  5. which part of project folder eclipse workplace should upload on server , where? have testng.xml file , classes (which acutal tests)
  6. how tell jenkins automatically run selenium webdriver tests after deploy, , file point to?
  7. how reports - through testng or through jenkins feature?

responses, following list:
q1. install jenkins (we have on our server)
a1. none needed.

q2. install plugins jenkins (which ones?)
a2. far remember no specific plugin required purpose. jenkins should able run maven or ant job, it's out of box.

q3. install xvfb tests run in headless browser (how specify in java written test?)
a3. in java tests specifying host browser should launched (more technically, host runs selenium server). it's 'localhost', case different (it not idea run jenkins , selenium on same box). so, in java code indicate host xvfb , selenium grid (that listens port 4444 default). considered practice factor information out of code (property files and, further, variables in pom file, or provided jenkins).

q4. install maven on computer, jenkins , eclipse, use maven projects.
a4. maven should installed on jenkins host (and local machine, 1 use develop tests).

q5. part of project folder eclipse workplace should upload on server , where? have testng.xml file , classes (which acutal tests)
a5. code placed under version control (right?), point jenkins fetch project (then compile code, compile tests, run tests...). answer "at least code needed compile tests , run them". jenkins builds project source , test execution phase of process.

q6. how tell jenkins automatically run selenium webdriver tests after deploy, , file point to?
a6. use 'integration-test' phase served surefire plugin.

q7. how reports - through testng or through jenkins feature?
a7. jenkins display (and distribute, if set way) reports generated testng.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -