Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC][tests-only][full-ci] run e2e tests with runner #10601

Merged
merged 16 commits into from
Mar 18, 2024

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Mar 14, 2024

Description

To better organize the growing e2e tests, we have to move features to their favorable suites (folders). Also, we have to be careful about the execution time of each e2e pipeline. With the current approach and feature file location it will be difficult to organize and manage the pipeline execution time.

Therefore, here is my proposal:

  1. Move feature files into different suites (folders) and maintain this location: features/<suite>/*.feature
    • move folders/suites out of smoke suite
    features/smoke/shares -> features/shares
    features/smoke/search -> features/search
    ...
    
  2. Use runner script to run the e2e tests
    • doesn't affect the current way of running e2e tests
    • organizing suites in CI is simplified
    -"featurePaths": [
    -    "tests/e2e/cucumber/features/{smoke,journeys}/*.feature",
    -]
    +"suites": [
    +    "journeys",
    +    "smoke",
    +]
    • ability to split and run existing suites into groups (with this ocis ci doesn't have to change anything if some suites are added to the web repo)

Run all suites

./run-e2e.sh

Run test providing paths

./run-e2e.sh cucumber/features/journeys cucumber/features/search/search.feature

Run single scenario

./run-e2e.sh cucumber/features/search/search.feature:122

Run selective suites

./run-e2e.sh --suites shares,spaces

Exclude suites

./run-e2e.sh --xsuites app-provider,search

Divide and run suites into parts (suitable for splitting e2e in oCIS ci)

./run-e2e.sh --run-part 2 --total-parts 4
./run-e2e.sh --run-part 1 --total-parts 4 --exclude app-provider

Help

$ ./run-e2e.sh -h

COMMAND [options] [paths]

Available options:
    --suites        - suites to run. Comma separated values (folder names)
                      e.g.: --suites smoke,shares
    --xsuites       - exclude suites from running. Comma separated values
                      e.g.: --xsuites spaces,search
    --run-part      - part to run out of total parts (groups)
                      e.g.: --run-part 2 (runs part 2 out of 4)
    --total-parts   - total number of groups to divide into
                      e.g.: --total-parts 4 (suites will be divided into 4 groups)
    --help, -h      - show cli options

Motivation and Context

Make it easier to add/skip/organize e2e test suites in a pipeline

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@saw-jan saw-jan self-assigned this Mar 14, 2024
@saw-jan saw-jan marked this pull request as ready for review March 14, 2024 10:13
@saw-jan
Copy link
Member Author

saw-jan commented Mar 14, 2024

Some reviews have been done in #10557

Copy link
Contributor

@ScharfViktor ScharfViktor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@SagarGi SagarGi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this seems really cool to me as well. LGTM 👍

@SagarGi
Copy link
Member

SagarGi commented Mar 18, 2024

@saw-jan one thing that can be added but not necessary. can we have some color coded text for "ERR:" may be red?

@saw-jan saw-jan force-pushed the tests/e2e-runner-stable branch from f58d28e to 9b798ff Compare March 18, 2024 05:06
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@saw-jan saw-jan merged commit 341fc09 into stable-8.0 Mar 18, 2024
3 checks passed
saw-jan added a commit that referenced this pull request Mar 18, 2024
* add e2e runner script

* test(e2e): options to run suites or feature file

* test(e2e): add feat to run suites into divided parts

* test(e2e): refactor

* test(e2e): move suites out of smoke

* ci: use e2e test runner

* tests(e2e): fix script permissions

* tests(e2e): fix single running suite

* tests(e2e): treat extar args as paths

* tests(e2e): add help option

* tests(e2e): allow line numbers

* tests(e2e): drop --feature option

* tests(e2e): fix --exclude with run-parts

* test(e2e): fix glob expansion

* test(e2e): rename option --exclude to --xsuites

* color code logs
saw-jan added a commit that referenced this pull request Mar 18, 2024
* add e2e runner script

* test(e2e): options to run suites or feature file

* test(e2e): add feat to run suites into divided parts

* test(e2e): refactor

* test(e2e): move suites out of smoke

* ci: use e2e test runner

* tests(e2e): fix script permissions

* tests(e2e): fix single running suite

* tests(e2e): treat extar args as paths

* tests(e2e): add help option

* tests(e2e): allow line numbers

* tests(e2e): drop --feature option

* tests(e2e): fix --exclude with run-parts

* test(e2e): fix glob expansion

* test(e2e): rename option --exclude to --xsuites

* color code logs
saw-jan added a commit that referenced this pull request Mar 18, 2024
* add e2e runner script

* test(e2e): options to run suites or feature file

* test(e2e): add feat to run suites into divided parts

* test(e2e): refactor

* test(e2e): move suites out of smoke

* ci: use e2e test runner

* tests(e2e): fix script permissions

* tests(e2e): fix single running suite

* tests(e2e): treat extar args as paths

* tests(e2e): add help option

* tests(e2e): allow line numbers

* tests(e2e): drop --feature option

* tests(e2e): fix --exclude with run-parts

* test(e2e): fix glob expansion

* test(e2e): rename option --exclude to --xsuites

* color code logs
@saw-jan saw-jan deleted the tests/e2e-runner-stable branch May 23, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants