Creating a Selenium Test Automation Framework from scratch
Kushan Shalindra Amarasiri
Head of Quality Engineering at Social Catfish
Today every test professional globally has to know test automation and its a key ingredient. Test automation at modern era does not mean converting a manual test case to an automated test case using a tool like Selenium. There is more into it. Today any organization expects the test automation engineer to design and develop a test automation framework to any given requirements, environment and technology. The expertise of a test automation professional is where he or she can develop a framework with a minimal time period.
The global test community is still learning and transforming their work nature of manual testing into more technical and automated testing. Therefore everyone needs to learn the way of designing and developing a test automation framework in simple way. As an experienced test automation professional and an experienced global mentor in test automation I have started creating simple illustrative videos which show how to create a simple Java Selenium test automation framework using TestNG for everyone who loves learning.
Video 01 Starting to create the framework and Page Object Model - This video shows how we can setup the environment to create a Selenium Java maven driven framework. It also covers the page object re-usability. Rather than reusing same set of pages and actions in multiple set of test scenarios, we can use the Page Object Re-usability concept. This is the starting point of this series of learning.
Video 02 Adding data driven capability with Excel - This video shows, how we can integrate the configurability and data driven capability with Apache POI, where we can read URL, User Names and Passwords from excel files rather than just hard-coding them.
Video 03 Adding reporting capability with Allure reporting - Every good test automation framework should have the reporting capability. The stakeholders should know the health of the test automation execution every time its being executed. The next video will show how we can integrate the Allure reporting in quick easy steps.
Video 04 Adding Behavior Driven Development (BDD) to the Selenium Java framework - BDD is playing a crucial part in the test automation where we test what actually what the customer wants. Thus eliminating any requirement discrepancies. This fourth video show how to add BDD capability for the framework that we are developing.
These are the core components that should be there in a test automation framework. We will also look at adding our framework for continuous integration tools like Jenkins in upcoming video to be released. With these set of videos I'm hoping that everyone in the QA community can build up a basic Selenium Java framework within hours time and transform their selves from a manual test professional to a well versed test automation professional.
QA automatisation de test/outils d'automatisation de test
2 年Great !! but a few remarks .. For the Allure report framework, we could add case Screenshots with the "addAttachment()" method in the non-passing tesCase. In addition, you have to find a way to delete the "Allure-resulta" file so as not to show the old results in the new report, and in your case you have to type a CMD command "Allure server" at the end of each execution to read the data JSON generated and this is tiring, we should find a automated méthod for do it. Thanks,
Sr Test Analyst | Results-Oriented IT Consultant | 10+ Years Experience in Software Testing & QA | Multinational Project Expertise in Banking, Insurance, Telecom |
5 年Great
Working as Associate Consultant at Global Logic (Hitachi)
5 年Thanks
Senior Quality Assurance Specialist at IAG (Insurance Australia Group)
5 年You can also use the DataProvider class rather than going for POI
Performance Testing Expert | Lead Consultant | Software Quality Assurance Specialist
5 年Great?