

Open Source Tests | GoCD Blog
source link: https://www.gocd.org/2015/11/18/Open-Source-Tests/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Open Source Tests - The GoCD way
Rajiesh
Why Open Source Tests
Testing open source projects has its own set of problems. Unit and integration tests are added by the contributors, however end to end tests are added later or neglected. There are several reasons for this like not being aware of the end to end flow, complexity of automating tests for end to end systems. However to be confident about a release we need end to end tests. To maintain the healthy balance defined by a test pyramid, every release must have its system test cases reviewed and maintained and this needs collaboration.
At GoCD we are finally open sourcing our functional tests, we believe open sourcing system tests will - improve quality through collaboration, make regression tests efficient, give the community a detailed picture of the system behavior and act as a live document for users.
How GoCD is continuously tested
Let's take a brief tour of how GoCD does continuous testing. GoCD is built, tested and deployed using GoCD itself. Here's a snapshot of the GoCD build pipeline.
GoCD is tested using "Server in-the-box" model. In this model we define the system under test - its scope and its boundaries. External dependencies for the system under test (SUT) say git or yum repo are stubbed out or built into the SUT itself. The pipeline "qa packages" does the necessary jobs to bundle the stub code with production code, and then pass on the packages to "smoke" and "acceptance" pipelines to run the tests. Upon successful runs of the upstream pipelines, "distributions-all" pipeline packages only the production code.
Test Classifications
Below are the set of functional test types modeled into the GoCD pipelines. Each of them are run on single or multiple agents as per the size of the tests. Every agent will be cleaned of any previous versions of the build when a new build is started.
-
Smoke: As per the classic definition "smoke tests" validates the basic functionality of the system under test. It runs on 2 GoCD server agents - one on windows and one on linux
-
Acceptance: These tests validates the necessary set of tests for each functionality or use case flow. It does not execute every scenario in the flow, but validates all possible flows. These tests are run on a total of 17 agents. Smoke and Acceptance are triggered by the upstream pipeline ‘qa packages".
-
Regression: A detailed set of tests which is exhaustive and comprehensive. This job is executed parallel in 17 agents. Regression tests are triggered when Smoke and Acceptance pipelines pass.
-
Performance: This pipeline is under development, will discuss this on a separate blog
How this model helps continuous delivery
Continuous delivery depends on a faster feedback loop. However Functional and Performance tests end up being bottlenecks. This can be reduced to a great extent by distributed tests.
Though not the only solution, it's a first step to achieving the faster feedback loop. Further enhancements and optimizations are on the way.
Twist to Gauge Migration
GoCD functional tests were initially developed using ThoughtWorks Twist automation tool. Since Twist has hit end-of-life as a product and is being replaced by Gauge, we've migrated our tests to Gauge. Moving to Gauge now helps us open source these tests (Twist was a commercial product).
Twist to Gauge migration is handled by the migration plugin bundled in Twist.
Gauge Specifications
Gauge specifications are in markdown language making it more readable. Gauge specs intend to be live documents of the system behavior
Gauge Reports
Gauge produces reports in an easily readable format and provides specification execution details like steps executed, time for each spec execution, overall test execution time, steps and specs passed, what failed and the screen shot of the failure page.
Conclusion
A distributed test environment and parallel execution are ways to support CD, by making long running tests short and getting faster feedback. Here we have addressed functional tests, we will soon be working on the performance tests.
If you would like to contribute to GoCD tests, please visit GoCD Functional Tests for contribution.
Recommend
-
10
GoCD 14.4 Released GoCD Team Today we released GoCD 14.4 You can download it from here. Take a look at
-
9
Roadmap - GoCD in 2016 Aravind SV GoCD 15.3 has been released! I think now is a great time to talk about GoCD in 2016. In a way, a lot of work in 2015 was setup towards enabling more improvements i...
-
10
Part 5 - Mo...
-
11
-
7
Deploy a package, not just a tag, branch or binary Sriram Narayan In a section called Principles and Practices of Build and Deployment Scripting, t...
-
8
Visibility Is Opportunity: stories of improving continuous integration Xiao Li Visibility can be hard, but it's worth it. Mingle is a 9 y...
-
9
GoCD is converting to open source! Ken Mugrage On 25 Feb 2014 ThoughtWorks announced that GoCD will soon be available under the Apache 2.0 open source license. We're really excited for the next cha...
-
11
Agent-bootstrapper upgrade to enable task plugins Sachin Sudheendra As part of GoCD 14.1, we officially announced Task plugins. Because tasks inherently are executed on an agent, we had to make few...
-
13
Continuous Delivery with GoCD - Webinar Recording Ken Mugrage Every couple of weeks ThoughtWorks hosts learning sessions for people who want more information about continuous delivery...
-
13
Update: Issue with uploading compressed artifacts in GoCD 14.3.0 GoCD Team There was an issue reported with respect to artifact uploads in the...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK