lunes, 26 de octubre de 2015

Selenium and Junit integrate to Jenkins

Jenkins
Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases our productivity. Jenkins is used to build and test our software projects continuously making it easier for developers to integrate changes to the project and making it easier for users to obtain  a fresh build.
Requirement
- install Java and set up environment variables
- install Ant and set up environment variables
-Download Jenkins from this page http://jenkins-ci.org/

GitHub
It offers all of the distributed revision control and source code management functionality of git as well adding its own feature.

My gitHub repository is this https://github.com/MarisolChambiArrosquipa/AntProjects, the code source is in the repository.The code source is the previous post http://marisolchambiarrosquipa.blogspot.com/2015/10/ant-iii-run-junit-with-selenium.html



It is too easy install it, select option next







It will show this page
Install plugins
install Junit plugins


we also need to install gitHub plugins



Manage Jenkins

Configure global setting and path as java, ant, maven,etc.











Create a new item

It is the project name  in GitHub












Built the project, we should select the option "build Now"


Select the Console output to see the detail of the execution




The console shows this






lunes, 12 de octubre de 2015

Run TestNG with Selenium WebDriver using Ant

Requirement, it is necessary that you review the following posts
http://marisolchambiarrosquipa.blogspot.com/2015/09/ant-ii-run-java-using-ant.html

http://marisolchambiarrosquipa.blogspot.com/2014/09/create-test-case-with-testng-and-eclipse.html

Our test case is the following




It is our xml file




Property elements
Ant build files are written in XML, which does not allow declaring variables as we do in a programming language so that we can use the PROPERTY  element which allow us to specify properties.
It is our build.xml file


Execute our build.xml file






lunes, 5 de octubre de 2015

Ant III Run JUnit with Selenium WebDriver using Ant

Requirement, you need to review the previous posts to understand better about Ant

http://marisolchambiarrosquipa.blogspot.com/2015/09/ant-part1.html
http://marisolchambiarrosquipa.blogspot.com/2015/09/ant-ii-run-java-using-ant.html

In this post, we will learn how to perform a project using Selenium WebDriver using Junit and Ant.
To understand better about Selenium webDriver with JUnit, you need to review the following post

http://marisolchambiarrosquipa.blogspot.com/2014/07/selenium-webdriver.html, in this post I explained that libraries need  and showed an example
Those classes I am using the next post http://marisolchambiarrosquipa.blogspot.com/2015/05/design-patterns.html, the unique difference is  that in that post I used TestNg, only change the annotations and it needs other library.




 the selenium-server-standalone-2.46.0.jar file include Junit


This will be our build.xml file after we need to run it.


 We need to add  the following tags, then we will run the build.xml file