Doing automation testing, a complete overview !!!

Here I am going to tell you how you can build an end to end automation testing platform in which different tools are integrated with each other to provide the automation.

Now for setting up a proper platform I am going to use several different languages and tools which are as follows:-

  • Jenkins

  • GitHub

  • Eclipse

  • Maven

  • Selenium

  • Test NG

Now also I will provide an overview of each of these items and also drop a link so you can read more if you are interested in these tools and languages, comment down below so I can give you a new blog post on that.

Note - Testing always comes after the development, either for modules or for the whole project and this blog covers the web application project testing.


I will explain in the order of the working so sit tight and enjoy the automation!!!.


Eclipse:-


As you all know eclipse is an IDE that provides a platform to build your projects. The Eclipse software development kit provides different plugins and java development tools and it is meant for java developers.

Now make a new choose project and choose a maven project, maven is a build automation tool, well in layman language maven is a tool which is used to build, dependency, and documentation. It lets you into a carefree environment in which you don't have to worry about the external library and jar's file which is needed to develop a project.

After you successfully created your maven project, drop a dependency of testNG and selenium in the POM file of the project. (POM file will appear only when you create a maven project).



Selenium/TestNG:-


Selenium is a scripting language. You write some scripts in eclipse which do the functionality that you have newly added in your web application or execute the whole project, it depends how you have written your scripts. A good example can be if you want to login into your website and check that login functionality is working or not or proper message is displayed or not etc things like that, one way is to do that manually, so you open your browser, go to that URL, enter your details and click login. Another way is you make a script which does all the above process by itself and give you the result.

Write your script in eclipse.



GitHub:-


You have now written your script in eclipse its time to push that maven project into the GitHub repository. Github is a version control platform hosted on the cloud, here you can upgrade your project by version, it also lets your teamwork in a single project and checks each other code when they pushed it from their local to the cloud.

After you build your module to local, just push this built code to the cloud so others can work accordingly to that.



Jenkins:-


It is a continuous integration(CI)/continuous deployment (CD) tool, it fetches the project from Github more technically it clones your GitHub repo into your local workspace and runs it to check everything is fine, also the whole thing is automated from this feature, like when you want to fetch code, you can set a period and after each that period it fetch you and compiles it and give results on to your mail, so you have to work only in development and writing scripts.

This is the most important tool that is presently used in the company's to automate their process so you have to learn it.

Here is a sample code that how it fetches the maven code

Make a pipeline job then go to Pipeline where the declarative script is being written


and follow this code:- 

pipeline {    agent any    tools {       // Install the Maven version configured as "M3" and add it to the path.       maven "MAVEN_HOME"    }    stages {       stage('Clone') {          steps {             // Get some code from a GitHub repository git credentialsId: 'f50beb26-0b0e-49d3-b130-0e67df14', url: 'https://github.com/Disturbed-Rover/Selenium---project.git'             // Run Maven on a Unix agent.            // sh "mvn -Dmaven.test.failure.ignore=true clean package"          }       }       stage('Build') {          steps {             // To run Maven on a Windows agent, use              bat 'mvn -f mvn-selenium-testing/pom.xml clean install'          }       }    } }


This is the pipeline script that you need.


If you love this content and want more stuff on Jenkins's comment down below.


Please share it with your friends so we move together...


80 views

Recent Posts

See All