2017-12-20 08:05:02 -05:00
|
|
|
# End-to-End Testing
|
|
|
|
|
|
|
|
## What is End-to-End testing?
|
|
|
|
|
|
|
|
End-to-End testing is a strategy used to check whether your application works
|
|
|
|
as expected across entire software stack and architecture, including
|
|
|
|
integration of all microservices and components that are supposed to work
|
|
|
|
together.
|
|
|
|
|
|
|
|
## How do we test GitLab?
|
|
|
|
|
|
|
|
We use [Omnibus GitLab][omnibus-gitlab] to build GitLab packages and then we
|
|
|
|
test these packages using [GitLab QA][gitlab-qa] project, which is entirely
|
|
|
|
black-box, click-driven testing framework.
|
|
|
|
|
|
|
|
### Testing nightly builds
|
|
|
|
|
|
|
|
We run scheduled pipeline each night to test nightly builds created by Omnibus.
|
|
|
|
You can find these nightly pipelines at [GitLab QA pipelines page][gitlab-qa-pipelines].
|
|
|
|
|
|
|
|
### Testing code in merge requests
|
|
|
|
|
2018-01-05 09:32:41 -05:00
|
|
|
It is possible to run end-to-end tests (eventually being run within a
|
|
|
|
[GitLab QA pipeline][gitlab-qa-pipelines]) for a merge request by triggering
|
2018-03-19 05:04:23 -04:00
|
|
|
the `package-and-qa` manual action, that should be present in a merge request
|
2018-01-05 09:32:41 -05:00
|
|
|
widget.
|
2018-01-02 08:22:48 -05:00
|
|
|
|
2018-01-11 07:05:55 -05:00
|
|
|
Manual action that starts end-to-end tests is also available in merge requests
|
2018-01-05 09:32:41 -05:00
|
|
|
in Omnibus GitLab project.
|
2017-12-20 08:05:02 -05:00
|
|
|
|
|
|
|
Below you can read more about how to use it and how does it work.
|
|
|
|
|
2018-01-02 08:22:48 -05:00
|
|
|
#### How does it work?
|
|
|
|
|
2018-01-04 06:09:14 -05:00
|
|
|
Currently, we are using _multi-project pipeline_-like approach to run QA
|
|
|
|
pipelines.
|
2018-01-02 08:22:48 -05:00
|
|
|
|
2018-01-02 08:37:01 -05:00
|
|
|
1. Developer triggers a manual action, that can be found in CE and EE merge
|
2018-01-04 06:09:14 -05:00
|
|
|
requests. This starts a chain of pipelines in multiple projects.
|
2018-01-02 08:37:01 -05:00
|
|
|
|
2018-01-04 06:09:14 -05:00
|
|
|
1. The script being executed triggers a pipeline in GitLab Omnibus and waits
|
|
|
|
for the resulting status. We call this a _status attribution_.
|
2018-01-02 08:37:01 -05:00
|
|
|
|
|
|
|
1. GitLab packages are being built in Omnibus pipeline. Packages are going to be
|
|
|
|
pushed to Container Registry.
|
|
|
|
|
2018-01-02 08:22:48 -05:00
|
|
|
1. When packages are ready, and available in the registry, a final step in the
|
2018-01-02 08:37:01 -05:00
|
|
|
pipeline, that is now running in Omnibus, triggers a new pipeline in the GitLab
|
|
|
|
QA project. It also waits for a resulting status.
|
|
|
|
|
2018-01-02 08:22:48 -05:00
|
|
|
1. GitLab QA pulls images from the registry, spins-up containers and runs tests
|
2018-01-04 06:09:14 -05:00
|
|
|
against a test environment that has been just orchestrated by the `gitlab-qa`
|
|
|
|
tool.
|
2018-01-02 08:37:01 -05:00
|
|
|
|
2018-01-04 06:09:14 -05:00
|
|
|
1. The result of the GitLab QA pipeline is being propagated upstream, through
|
2018-01-02 08:37:01 -05:00
|
|
|
Omnibus, back to CE / EE merge request.
|
2017-12-20 08:05:02 -05:00
|
|
|
|
2018-01-02 08:22:48 -05:00
|
|
|
#### How do I write tests?
|
2017-12-20 08:05:02 -05:00
|
|
|
|
2018-01-02 08:22:48 -05:00
|
|
|
In order to write new tests, you first need to learn more about GitLab QA
|
2018-01-04 06:09:14 -05:00
|
|
|
architecture. See the [documentation about it][gitlab-qa-architecture] in
|
|
|
|
GitLab QA project.
|
2017-12-20 08:05:02 -05:00
|
|
|
|
2018-01-04 06:09:14 -05:00
|
|
|
Once you decided where to put test environment orchestration scenarios and
|
|
|
|
instance specs, take a look at the [relevant documentation][instance-qa-readme]
|
2018-01-02 08:37:01 -05:00
|
|
|
and examples in [the `qa/` directory][instance-qa-examples].
|
2017-12-20 08:05:02 -05:00
|
|
|
|
|
|
|
## Where can I ask for help?
|
|
|
|
|
2018-04-19 03:28:08 -04:00
|
|
|
You can ask question in the `#quality` channel on Slack (GitLab internal) or
|
|
|
|
you can find an issue you would like to work on in
|
|
|
|
[the issue tracker][gitlab-qa-issues] and start a new discussion there.
|
2017-12-20 08:05:02 -05:00
|
|
|
|
|
|
|
[omnibus-gitlab]: https://gitlab.com/gitlab-org/omnibus-gitlab
|
|
|
|
[gitlab-qa]: https://gitlab.com/gitlab-org/gitlab-qa
|
|
|
|
[gitlab-qa-pipelines]: https://gitlab.com/gitlab-org/gitlab-qa/pipelines
|
2018-01-02 08:22:48 -05:00
|
|
|
[gitlab-qa-architecture]: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/architecture.md
|
|
|
|
[gitlab-qa-issues]: https://gitlab.com/gitlab-org/gitlab-qa/issues
|
2018-01-02 08:37:01 -05:00
|
|
|
[instance-qa-readme]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa/README.md
|
|
|
|
[instance-qa-examples]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa/qa
|