2. Moataz Nabil
Software Engineer in Test ,
Zalando Lounge
Berlin , Germany
moataznabil.net
05.10.2018
QA Automation Pipeline
(Web , API and Performance Tests)
Learn How to Build Your Own
Cairo Testing Meetup
3. AGENDA
Who Am I
About Zalando
What is Continuous Delivery ?
QA Pipeline
Today we will take a look about
Tech Stack
Demo – Run Automation Tests locally
Continuous Integration
Run QA Automation Pipeline with Jenkins Pipeline
Build Your Configuration via Jenkinsfile and Jenkins Pipelines
Questions
4. WHO AM I ?
• Currently I'm working as SDET at Zalando in Berlin , Germany
• I have 14+ years of IT experience across development and testing
roles, automation testing , software quality assurance ,
performance and service delivery.
• I worked in Egypt before in different companies such as (Integrant
and Cequens) and working as Technical instructor and consultant
at TestPRO and delivered selenium automation course to different
groups.
• Recently I published my first Automation Course using Selenium
WebDriver on Udemy and I have channel on YouTube and also I
published different articles on LinkedIn and Medium
6. In the past years, software delivery has made a big step
forward thanks to the implementation of continuous delivery.
Quality Assurance is no exception, and the acceleration of the
QA pipeline has helped shorten delivery cycles and bring
higher quality software.
7. What is Continuous Delivery – AKA CD ?
• Continuous Delivery is the ability to get changes
of all types—including new features, configuration
changes, bug fixes and experiments—into
production, or into the hands of
users, safely and quickly in a sustainable way.
• The goal is to make deployments—whether of a
large-scale distributed system, a complex
production environment, an embedded system, or
an app—predictable, routine affairs that can be
performed on demand.
8. Why Most Companies Are Getting Continuous
Delivery Wrong?
What comes to your mind when I say the words Continuous Integration
(CI) and Continuous Delivery (CD)?
You’re probably already thinking of popular tools and systems that
enable these processes, such as Jenkins CI, Ansible or Bamboo, and
wondering how to integrate them so you can proudly say that your
organization has a fully operational CI/CD process.
9. We tend to spend a lot of time talking about the tools required to
ensure a successful Continuous Delivery process - and not enough
focusing on other critical elements.
Don’t get me wrong, you simply can’t have a Continuous Delivery
process without automated tools and systems - but there’s more to it
than that.
The tools are vital. But they come second.
10. Why Continuous Delivery Isn’t Just About the
Tools?
• Each Department Has its Own Needs When it Comes to CD
• You Need to Think About the Process - Not Just the End
Result
11. Continuous Delivery Success: 5 Things to
Remember
Establishing a successful Continuous Delivery process in your organization is within
your reach.
Just remember these five points before you get started:
1. Focus on the process before the tools
2. Understand the needs of each team
3. Build one process to merge the combined needs of every team in the company
4. Implement the tools
5. Appoint a Continuous Delivery Engineer to manage all of the above!
16. QA Pipeline !
A fast and reliabel QA Pipeline is usually based on multi-level
automation tests and stable continuous integration, which
runs all of these tests on a daily basis against different test
environments.
17. Today we will take a look about
• A simple test automation framework written in Java programming
language, which contains basic test scenarios created by using some
of the most popular testing frameworks (Rest Assured, Serenity and
Selenium), which you might find very useful for your needs)
• Integrating with some of the most well known automation tools
• Executing different types of tests
• Adding beautiful visualization to created test automation pipeline
with the Jenkins Blue Ocean
18. Tech Stack
• Java
• Apache Maven
• JUnit - a basic Java unit tests framework
• Serenity - the backbone of the automation framework
that provides many useful features, like detailed
reporting, parallel execution and tests grouping by tags
• REST Assured - a framework for REST API tests
• Selenium WebDriver - a tool for UI automation tests
and web browser interaction
• Taurus - a performance testing tool that allows you to
write performance tests via yml scripts
20. You can run smoke, API and UI tests accordingly:
mvn clean verify -Dtags="type:Smoke"
mvn clean verify -Dtags="type:API"
mvn clean verify -Dtags="type:UI"
bzt test.yml
For performance
Test using Taurus
21. Continuous Integration
• As soon as you implemented your first tests automation suite, it’s
time to take care of automation execution.
• Of course, you can run your tests manually, but it doesn’t make
sense if you can automate this step as well.
22. Automating Execution has many benefits
• Faster tests result feedback (you can configure automation tests to
run as soon as the code has been committed)
• Some tests might have a longer execution time and you can set
up nightly runs to verify results in the morning
• Fewer mistakes can happen if steps are automated (avoid human
errors)
• You can configure several agents to run automation tests in
parallel in different environments
23. Jenkins CI
One of the most commonly used CI servers for automation needs
is Jenkins. It is open source, allows you to run any kind of tests, and
integrates with almost anything you can imagine. It has one of the
biggest open source communities, and they bring Jenkins to new levels
year after year.
24. Build Your Configuration via Jenkinsfile and
Jenkins Pipelines
• Jenkins pipelines is a continuous delivery through code tool, which is
usually added under version control tools like Git.
• It basically means that you can configure, maintain, revert and add
build plans the same way you work with a code.
• At the same time, the Jenkins pipelines workflow has a nice
representation that shows you all steps of your build plan in action.
• This gives you a nice view on build steps with timing and results for
each.
• A file that contains pipelines code with build configuration is called
Jenkinsfile.
25. What is Blue Ocean ?
• Blue Ocean is a project developed by the Jenkins community team,
which improves the experience of using Jenkins pipelines for
continuous integration pipeline representation.
• First, you need to install required plugins. Go into “Manage Jenkins” ->
“Manage plugins” -> “Available” -> search for ‘Blue Ocean’
27. Now It’s your Turn
• I hope this was useful and gave you useful information for
building your own automation tests pipeline, maybe from
scratch.
• Now, It‘s your turn to know more about Serenity, Selenium,
Taurus, Jenkins and automation tests in general