Commit 9714adf0 authored by Marcin Sedlak-Jakubowski's avatar Marcin Sedlak-Jakubowski

Merge branch 'add-logging-best-practices' into 'master'

Add logging using logger to e2e best practices

See merge request gitlab-org/gitlab!79840
parents 1b7b17ad 71396c23
......@@ -518,3 +518,12 @@ Neither problem is present if we create a custom negatable matcher because the `
would be used, which would wait only as long as necessary for the job to disappear.
Lastly, negatable matchers are preferred over using matchers of the form `have_no_*` because it's a common and familiar practice to negate matchers using `not_to`. If we facilitate that practice by adding negatable matchers, we make it easier for subsequent test authors to write efficient tests.
## Use logger over puts
We currently use Rails `logger` to handle logs in both GitLab QA application and end-to-end tests.
This provides additional functionalities when compared with `puts`, such as:
- Ability to specify the logging level.
- Ability to tag similar logs.
- Auto-formatting log messages.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment