The document discusses quality assurance processes for automated testing including developing an automation framework using Java, Selenium, TestNG, Git, Maven and Jenkins. It provides steps for configuring the automation project, describes functional testing as creating test suites and tracking bug status, and discusses best practices for load and performance testing, security testing, and using the page object model in test automation.
1. QA PROCESS
What quality assurance process refers to ? What does this actually mean ? Best
practices
2. Automated testing
is very important in the testing process because is more efficient for functional & regression testing & reduces the effort.
I did develop from scratch an automation framework using Java, Selenium, TestNG, Git, Maven & Jenkins. The tests must be easy to use
& update so the maintenance is also quick & easy. The code must be written efficient, no duplicate code so I used Page Object Model
principles.
Framework is created with the setup of the testing environment, basic methods are implemented, the foundation on which the actual
tests will be implemented such as : click(), enterText(), selectFromDropDown(), maximize(), load(), etc.. into Utility package.
Each test suite is implemented by writing code for each page (Java class) from the application & creating a TestNG for the actual test.
3. How to use & configure the automation project
Steps:
1. Go to C:/Users/User_Name/
2. git clone git@bitbucket.org:hubeleon/project.git
3. Open Eclipse (neon version or latest)
4. File -> Import-> Existing Maven Projects
5. On the project go to Build Path & make sure that external jars selenium server & jgit are having the right path, if not remove
the existing ones & add the one from current path
6. Go to Help-> install new software
set values Name: TestNG, Location: http://beust.com/eclipse
7. Install Maven (URL: http://download.eclipse.org/technology/m2e/releases/1.5/1.5.0.20140606-0033)
you need to have installed Maven on your local, if you don't have
it, download it from here: https://maven.apache.org/download.cgi?Preferred=http%3A%2F%2Fapache.javapipe.com%2F
8. Add variables environment JAVA_HOME: C:Program FilesJavajdk1.8.0_73, M2: %M2_HOME%bin , M2_HOME: C:Program
Filesapache-maven-3.3.9, PATH: C:Program Filesapache-maven-3.3.9bin
9. Install Firefox (make sure that the v <=v.46)
4. Functional testing
This type of testing involves the following:
1. create/execute test suites
2. report bugs
3. follow up the status of the bugs until the final resolution (meaning retesting & regression testing)
4. create documents & reports with the status
5. Functional testing process
Functional Testing for Web Applications is a process that checks whether a web application functions as intended and verifies
whether it supplies what the users expect. Aila Quality Software delivers functional software testing for web apps covering the
main steps of this process:
Step#1. Determining which kind of functions must be performed by the web application.
Step#2. Creation of the data-in that is based on the function’s specification.
Step#3. Detection of the correspondence output data.
Step#4. Performance of the test case.
Step#5. Comparison of the actual and expected results.
6. Load & Performance testing
Create load for sets of users & make the business scenario simulating the clicks.
Results are saved for loading time per each page & analyzed including the errors triggered (if is the case).
Load & performance testing how much importance gives to your web application quality standards?
Load & performance testing is a MUST for any website with a high traffic.
Load testing measures actually time (in sec.) for the maximum number of users supported by the system accessing the website at
the same time.
Performance testing measures actually time (in sec.) for the maximum number of users supported by the system navigating into
the website following a specific business scenario at the same time.
Usually load & performance is done using JMeter.
There was a time when I used also Webserver Stress Tool, but is not so accurate.
At the end you obtain reports for each set of test .csv file & other graphs with evolution from a load increase to another so you
can compare how the website evolves.
7. Security testing
Website is scanned & vulnerabilities are searched. All the results with all the low, major & critical priority vulnerabilities are saved
& can be analyzed.
What do you need for your company?
Beside the usual testing : functional, load & performance, regression testing is a must to insert also SQL injections & blind SQL in
order to prevent the possible hacks. It must be done for every edit/text/area field. From my experience most of the web
application such insertion are producing crashes so is a vulnerability for your software to have possible to retrieve data from your
database.
How to install OWASP WebGoat? (for Security Testing)
1. Go to https://sourceforge.net/…/owasp/files/WebGoat/WebGoat%205.2/
2. Download WebGoat-OWASP_Standard-5.2.zip
3. Unzip the archive
4. Start the webgoat.bat (Tomcat server is up & running)
5. Access on a web browser: http://localhost/WebGoat/attack with username: guest & password: guest
6. For webscarab go to https://sourceforge.net/…/ow…/files/WebScarab/20070504-1631/
7. Download webscarab-selfcontained-20070504-16.jar file
8. Double click the jar file to start it.
8. Best practices
How to fix: Error message in TestNG java.lang.AbstractMethodError:
org.openqa.selenium.MutableCapabilities.is(Ljava/lang/String;)Z ?
Remove all the jars from Configure build path, install the latest version of Firefox and use instead of
Eclipse Intellij IDEA.
These changes will solve the issue.
I spent a lot of time on this problem without any resolution.
Page Object Model used in Automation
A Page Object simply models these as objects within the test code. This reduces the amount of
duplicated code and means that if the UI changes, the fix need only be applied in one place.
So every page is designed as an entity with all elements on the page and interacts with the
following page.
So the best approach is to have each page from the applications extends the BasePage and contains all
the actions on that page, for example create a form, searches, checks, etc.. & create link with the
next page to be defined in another Java Class.
Pages are declared in package Pages, classes with all methods related to browser & driver (load
driver, maximize Window, clickOnElementWithWait, etc..) are declared into WebDriverUtils package
& the actual test (TestNG class) which implies the interaction between pages with its actions in Tests
package. Page Object Model was developed from the need to have a cleaner, maintainable reusable
and encapsulated code.
9. Best practices
Ho to install OWASP WebGoat? (for Security Testing)
1. Go to https://sourceforge.net/…/owasp/files/WebGoat/WebGoat%205.2/
2. Download WebGoat-OWASP_Standard-5.2.zip
3. Unzip the archive
4. Start the webgoat.bat (Tomcat server is up & running)
5. Access on a web browser: http://localhost/WebGoat/attack with username: guest & password: guest
6. For webscarab go to https://sourceforge.net/…/ow…/files/WebScarab/20070504-1631/
7. Download webscarab-selfcontained-20070504-16.jar file
8. Double click the jar file to start it
Load & performance testing how much importance gives to your web application quality standards? Load &
performance testing is a MUST for any website with a high traffic.
Load testing measures actually time (in sec.) for the maximum number of users supported by the system
accessing the website at the same time.
Performance testing measures actually time (in sec.) for the maximum number of users supported by the
system navigating into the website following a specific business scenario at the same time.
Usually load & performance is done using JMeter.
There was a time when I used also Webserver Stress Tool, but is not so accurate.
At the end you obtain reports for each set of test .csv file & other graphs with evolution from a load
increase to another so you can compare how the website evolves.
What do you need for your company?
Beside the usual testing : functional, load & performance, regression testing is a must to insert also SQL
injections & blind SQL in order to prevent the possible hacks. It must be done for every edit/text/area
field. From my experience most of the web application such insertion are producing crashes so is a
vulnerability for your software to have possible to retrieve data from your database.