Practical Continuous Testing
Practical Continuous Testing
make Agile/DevOps real
About the Book
The trend of software development is moving towards frequently releasing backed up automated functional testing. This is Continuous Testing.
- Unit tests ⇒ Functional tests
- Adhoc test execution ⇒ Repeatable process to run all automated tests
- Programmers only ⇒ The whole team
- Testing for better code quality ⇒ Testing for overall quality and frequent releases
This movement shall not come as a surprise, as being able to push out software releases frequently with high quality is what every software project team is pursuing, i.e, “Quality at speed”. In my view, this is the true objective of Agile and DevOps.
Despite all the hype of CT (and previously CI/CD) and DevOps, most software projects failed on functional testing, hence, on Agile or DevOps. Not convinced? You can try to answer this question: "Does your team have the capability to push software updates to the production every day?"
To succeed in Continuous Testing, software projects need to overcome the following four technical challenges:
- Functional Test Automation
- Continuous Execution in a CI/CT server
- Scaling with Parallel execution in multiple build agents
- Maintaining test execution (scripts and infrastructure) with high efficiency
In my opinion, the key to overcome the challenges is to courageously adjust the approach based on the feedback from CT.
- If the team spends significant time maintaining Cucumber tests, why not use a much simpler and better BDD framework RSpec?
- The testers and business analysts find it difficult to read test scripts in Java, why not change it to a good scripting language such as Ruby?
- If the execution time of automated functional tests is too long, why not try parallel execution?
- The current End-2-End test suite fails in a CI Server (such as Jenkins) every day with high failure rate, why not change the CI server to a proper CT server?
- ...
In this book, I will share my 14 years of experience in CT to help you to implement real Agile and DevOps for your organizations.
What's unique about this book? Being practical. By following the instructions in Chapter 2 (included in the sample), you shall be able to set up a CT server and run a set of Selenium tests on your machine within one hour. How can that be? The answer is to use a real CT server, BuildWise. BuildWise is a free, open-source CT Server that I have created from the ground up to manage executing automated functional tests better. AgileWay (my company) has been using BuildWise since 2013, which enables our DevOps process: releasing all our (Web and Desktop) apps to production daily. BuildWise won the 2nd prize of the prestigious Ruby Award in 2018.
Learning CT techniques with a real CT server is much easier, more engaging and more fun. Very soon, you shall be able to set up a CT process at work.
Table of Contents
-
Preface
- My Continuous Testing journey
- What’s unique about this book?
- Who should read this book?
- How to read this book?
- Send me feedback
-
1 Introduction
- 1.1 What is Continuous Testing?
- 1.2 Continuous Testing is the trend
- 1.3 Continuous Testing vs Continuous Integration
- 1.4 Separate CT from existing CI/CD
- 1.5 Continuous Testing vs DevOps
- 1.6 Reality Check
- 1.7 Why will this book help?
-
2 Set up a CT server to run Selenium tests in minutes
- 2.1 Objectives
- 2.2 Prerequisite
- 2.3 Install CT Server
- 2.4 Create a Build Project
- 2.5 Trigger test execution manually
- 2.6 Feedback while test execution in progress
- 2.7 Build finished
- 2.8 Common Errors
- 2.9 Exercise: Create a new Build Project from another repository
-
3 How Continuous Testing Works?
- 3.1 Terminology
- 3.2 CT Process in detail
- 3.3 Install BuildWise Server for production use
- 3.4 Understand build working directories
- 3.5 Exercise: Fix a failed build
- 3.6 Review
-
4 Why is CT important?
- 4.1 Continuous Testing is the key to Agile
- 4.2 Detect regression errors quickly
- 4.3 Reduce/eliminate the needs for Defect Tracking
- 4.4 Try new ideas / upgrades
- 4.5 CT is vital for the maintenance
- 4.6 Training
- 4.7 Benefits for All Team Members
- 4.8 Review
-
5 Set up your own build project
- 5.1 Prepare your test scripts
- 5.2 Create a new build project
- 5.3 Trigger a build manually
- 5.4 View a build in progress
- 5.5 Cancel a build
- 5.6 View Change Log
- 5.7 Build history
- 5.8 View test failures and screenshot
- 5.9 View test script content
- 5.10 View test execution history
- 5.11 Build report
-
6 How to succeed in CT?
- 6.1 Definition of Success: AgileWay CT Grading
- 6.2 Functional test automation and continuous execution are interdependent
- 6.3 Success Factors (test automation)
- 6.4 Success Factors (infrastructure)
- 6.5 Success Factors (continuous execution)
- 6.6 Success Factors (human)
-
7 The Magic - Build Script
- 7.1 What is Build Script?
- 7.2 Use Build Script in BuildWise
- 7.3 Configure Build Tasks in BuildWise
- 7.4 Execute build tasks from the command line
- 7.5 Functional Testing (Sequential) Task
- 7.6 Functional Testing (Parallel) Task
-
8 Manage a project
- 8.1 Build Step Management
- 8.2 Common Pre-Functional-Testing Tasks
- 8.3 Clone an existing project
- 8.4 Build Artifacts
- 8.5 Enable the project’s API key
- 8.6 Notifications
- 8.7 Project Statistics
- 8.8 Hide a project
-
9 Manage builds
- 9.1 Trigger a build via API
- 9.2 Schedule a build
- 9.3 Add Build Summary
- 9.4 Invalidate a build
- 9.5 Delete a build
- 9.6 View and download build artifacts
- 9.7 View build logs
-
10 Sequential E2E Test Execution
- 10.1 Sequential Mode
- 10.2 Pre-requisite
- 10.3 Decide what tests to be included
- 10.4 Select test script files in the build script
- 10.5 Define a build target
- 10.6 Task Configuration in BuildWise
- 10.7 Test Execution Order
- 10.8 Feedback during the build
- 10.9 Analyse test reports
- 10.10 Anti-Pattern: Split tests into multiple sub-builds
-
11 Sequential Test Execution Best Practices
- 11.1 Limit the test count
- 11.2 Show test results immediately
- 11.3 Capture the error stack trace
- 11.4 Capture the error screenshot
- 11.5 View test script content
- 11.6 View test output
- 11.7 Customize test executions with Environment Variables
- 11.8 Clone build project for different purposes
- 11.9 Dynamic Ordering
-
12 Parallel Test Execution
- 12.1 Build Agents
- 12.2 Prerequisite for Test Scripts
- 12.3 Multi-Agents against the Single Server
- 12.4 Multi-Agents against the Multi-Servers
- 12.5 Set up a parallel build project
- 12.6 Monitor the build progress
- 12.7 Assess the benefits of parallelism
- 12.8 Common Issues
-
13 Parallel Test Execution Best Practices
- 13.1 Optimal agent count
- 13.2 Intelligent test execution ordering
- 13.3 Auto retry failed tests once more
- 13.4 Manually rerun a failed test
- 13.5 Cross-Platform Testing
- 13.6 Headless or not?
- 13.7 Distribution rules
- 13.8 Delay completion
-
14 Parallel Testing Lab
- 14.1 Hosting option: Cloud-based or On-premises?
- 14.2 Cost
- 14.3 Advice: starting small, grow gradually
- 14.4 My preferred setup for CT Lab
- 14.5 Set up BuildWise Server
- 14.6 Set up Build Agents
- 14.7 Best Practices
- 14.8 Wrap up
-
15 Why do most projects fail in CT?
- 15.1 Failure Factors - test automation
- 15.2 Failure Factors - infrastructure
- 15.3 Failure Factors - continuous execution
- 15.4 Failure Factors - Human
-
16 CT with web app testing in other frameworks
- 16.1 BuildWise supports multi-frameworks
- 16.2 PyTest (Python)
- 16.3 Mocha (JavaScript)
- 16.4 Cucumber (Ruby)
- 16.5 Parallel Build with multi frameworks
- 16.6 Review
-
17 CT with Native apps and Microservices
- 17.1 Will my tests run in this CT server?
- 17.2 Desktop App Testing with Appium
- 17.3 Non-UI Functional Testing
-
18 Other Uses
- 18.1 Load Testing
- 18.2 Cross-Browser Testing
- 18.3 Prepare Application Data
- 18.4 Requirement Traceability
- 18.5 Execute specific tests on Server via Web Interface
- 18.6 Utilities
- 18.7 Wrap up
- Appendix 1 - CI Steps
-
Resources
- Books
- Tools
- References
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them