
Design and build innovative automated solutions that optimize the way we work and deliver to our clients.
Voice of customer is the center stage of automated testing process, maximize effective test coverage and deliver a quality products. Partners across various teams including Product Development and
Software Engineering to help the quality and testing transformation. Apply Development and QA Best Practices and actively look for process improvement. Create and maintain test cases and test data using Qmetry/ TestRail/ Confluence and developed automation framework for multiple application types and business segments.
QA Automation Lead
Picarro TechnologyQA Automation R&D3 Lead
Broadcom/SymantecSDET
Alten-Calsoft labsIT Analyst
TCSSystems Engineer
TCSProduct Engineer Lead
Infosys Ltd
Qmetry

TestRail

Confluence

Selenium

TestNG

Maven

Rest Assured
.png)
Jenkins

Curl

Splunk

Eclipse
Jira

TeamCity

CI/CD
Hello everyone, my name is Vijay Gangwar and I have been working in the IT industry for about 15 years. I have been into automation for the last 10 years. I did my engineering from a government college in Uttarakhand. After that, I joined TCS in Bangalore, and then I joined Infosys in Bangalore, where I worked on the C++ project. I then got a chance to work for a small company called California Software, where I started working on backend automation. In 2015, I got a chance to work for a startup, where I was mainly working on backend automation, UI automation using TestNG, JUnit, REST API, and Selenium in Java. Initially, we were using TestNG, then we moved to JUnit, and I started using the company's technologies. My company got acquired and became a part of Symantec. I worked there for around 5 years before moving to a smaller company called Picaro Technologies, where I continued working as a senior QA automation engineer. I used to work on both backend and UI, using Selenium, TestNG, JUnit, and Postman. Postman is a very good tool for debugging, especially when I need to verify manually the API working things, so I would use it to debug.
so the page object model is a very good and popular model used for QA automation, actually it's a design pattern which is used. The benefits of using the page object model is that it gives our script and data related to it a very systematic way of code arrangement and then externalizes the things or the locators that are changing. This is one of the beautiful things of the selenium page object model. For example, suppose you are automating a login page. So for this page, we will have a separate Java class which will handle all the actions that will be done for a login page, just like a method for providing the username and then the password and then clicking on the login button. Then we will have one whole method for doing a login action, like providing the username, then the password, and then logging in. This is how a page object for a login page will look like, and this page object will have all the locators and the methods associated with it, which I explained earlier. Locators will also be there, and the test method for the test method we will have a separate class, which we can say is the Java login page test method. In that case, we will be providing the username and password for that scenario. With that, we can modify it using the data provider, like if we have to do extensive testing, data-driven testing on this, we can provide the data provider, either from the external source or if we have something which has to be provided, we can use the CSV file and use it as data and pass that as data input, and it will be taken care of by the data provider.
So for handling the headless mode in Jenkins build, we can use the HTML folder or HTML unit. We can use either or basically we have to pass a parameter, meaning multiple browsers will actually test. Jenkins test will be running in the browser, suppose it is running in Chrome then we have to pass that parameter, passing the capabilities. If it has to be run in headless mode or normal mode. Once that parameter is provided, from the Jenkins build, we can do it either by using a parameterized Jenkins build which will pass the parameters, which will pass a parameter and that can be taken care of. Or if a parameter is set so that can be done. This can also be actualized. So to enumerate it, like we have a normal test case and a normal test case and testNG file for that scenario. In a parameterized testNG file, we have to pass a parameter for a headless capability and which then gets cascaded into the script which is running, instantly changing our parameters. So to again externalize either we can pass it as a parameter there itself or even we can parameterize since it is a Jenkins build. So we can take the liberty of providing as a parameter whether we want to pass as headless or normal. The weakness can be passed through Jenkins parameterized build also. Based on the choices we made, it will run the test accordingly.
So this is one of the normal features that we have in our Selenium test. So suppose the login test which I described, now test execution has happened, again we have to pass, we have to publish the results of this test. So what happens is, we can create a separate job, a separate job which is the post-action of the job that we can create. Once the test build is executed and we have got the result, we can link a different cron job which can trigger the result reporting. So that job, that reporting job will pick that, will pick the reports are always handled at the STM, respective reporting folder, we can pick the STM folder or the other way which we would have kept or the normal Jenkins report that we have in the STM. So that file is a dot STM file, we can pick that report file in our second job and link that job as a post-execution step. So once the execution is completed, it will run that second job which will trigger the report sharing of the test execution. So it can happen very easily with this.
So to handle the popup, authentication popup using Selenium WebDriver, so to do this we have to, there are multiple ways of handling it, either we have to, we can use the session tokens and keep on using it as a bearer token, and this will make the session active all the time, or whenever it is failed, it can regenerate the session using that credentials, that is one way. Suppose a login popup happens, then we have to, in that we have to pass the credentials, because if it is a UI, there is no way of passing the credentials, if it is a UI, since UI popup is coming, so that approach will not work, so it will definitely ask for the username and password, we can pass the username and password using the Windows handler, like driver.get_window_handle() is there for driver, that is driver.get_window_handle() where we have to get the handle, driver.get_window_handle() and get that particular popup, which window, like that handling mechanism, that is used like current window, we know, we are current window, and once popup has come, we move to that, get the handle of that popup, and then switch to that handle, and then in that switch to that handle, we can provide the login user, username and password, and click the authenticate button, if it is there, since it is a, so with that it should be handled, or if it is a normal popup, then we can simply use the action class, to accept the popup, that is pointed out, this is other way of doing.
So this scenario one scenario is facing us like manual testing it works fine and then selenium when I try it will not work so I was trying with the files and one I was trying to do a file upload on a Google Drive using Java so there what happened whenever and I was testing it on Friday one Friday so earlier it was working fine and then Friday when I was testing it again it failed I tested it manually and the file upload on Google Drive was working fine then I realized the earlier method I used of putting the file name to the input field it was not working so I realized that I had to do something different which is make it handle and accept the file so I since it was not working I tried multiple ways but it still didn't work so what I used was I moved to the auto it wasn't there so I used the file loader utility provided the location and all and with that it started working and so this is one scenario it happened to me another scenario was I was trying to click on some button and that action was there in my class in my test case and when I checked manually it was working fine but when I try to do it using selenium testing it was failing it was not identifying it so when I checked that it was saying just click on that just hover for a second on that wait for some time and then you have to it will get enabled basically it was disabled initially and once we are hovering it and then only it will get enabled and we can click on it after that so this was one of the scenarios when I encountered so I basically changed the steps to make a mouse hover and then click on that button.
So in this code we are doing a get of data get call and we are setting the status code in this what else we can do is like instead of doing the status code we should check if some data is coming in the response. Like, if the response is something they say "ok" or some data is also there along with that they send that data. Sometimes, what happens is like the call is "ok" when you share the call you will get a 200 status word, means successful but no data is not there, it is null data or it is not there. The call is successful but there is no data, so that one part we can do small validation we can add as an assert. Another one is like regarding the path of this call, that looks somewhat okay to me, yeah this is only one solution. Like I am going further and checking for the data it is coming.
so in this I can see that given when then is problematic but should be replaced is something else like you can replace but with then like and you will see a welcome message and when user clicks then so the like assertion after that can happen instead of but we can use then as an end message like user clicks the logout and it is reacting so you can put then as an end also instead of but other things seem okay given when and then yeah only one comment regarding the but other things seem okay
There are multiple things that can be done for integrating a security testing. One is that it can be taken up separately using HCL AppScan for SAST and DAST testing. That suite is a totally different suite and we can integrate it with our Selenium 2 suite and publish the results. So, we used to do it in our current project for security clearance and if any alert is there or test failure is there, we will take action correspondingly. So, this is one plan. Another plan is going for tool-based. Since it's Selenium automation, so means it's automation. So, we have to integrate a tool, run a tool on our application and that running should be done and that execution should be done using the Selenium automation suite. We have to create a cron job to trigger that suite from a Jenkins environment and it goes to that particular node, test execution happens for security testing and then we get the result. So, this is one way of doing it. If we are writing our own Selenium test case suite for security testing and then running automation, this is something different, like newly writing it to our written test and application. This can also be done, but it is a very tricky part. The easiest part is going with the already set vendor for security testing or if some security testing engineer is there who is writing the Java code perfectly. Then we have to go to the OWASP top 10 plan and based on that we can create scenarios.
I have to change it for the charger, my system was low on charge, so for my Selenium project, mostly it will be, so like initially, best coding practices. Yeah, I have to change it for the charger, my system was low on charge, so for my Selenium project, mostly it will be, so initially, best coding practices. Yeah, I have to change it for the charger, my system was low on charge, so for my Selenium project, the number of tests should be as per the test case description and the expected result should be as per the expectation, and the assertion should be there as per the expectation of the test case.
To use Jenkins as a part, so in that the feature file part I would like to have because multiple people will see it, so the feature file part needs to be handled. VDD is mainly used for the UAT purpose where a person from the business team will write the test case scenarios and steps as per the UAT and user needs. He will first write those steps and once he writes those steps, we will get to know how we can code it easily. However, the main part, like what is needed and what should be validated, can be done from that. The feature file part, on which person has to write, needs to be taken care of, so because this will be handled by the business development team. We have to externalize and manage that part, so once it's managed, it will become easy for the project management for Jenkins.