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

E2e: Make autotests great again #289

Merged
merged 53 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9c37efc
remove qase. finally
VladSenyuta Mar 18, 2024
11f9c71
update pom
VladSenyuta Mar 18, 2024
702e156
Merge branch 'main' into vlad/develop
VladSenyuta Mar 20, 2024
9ac37b0
Merge branch 'main' into vlad/develop
VladSenyuta Mar 22, 2024
003a69c
fix a part of broken tests
VladSenyuta Mar 26, 2024
ac9167b
clear module from legacy trash
VladSenyuta Mar 26, 2024
d23022f
clear module from legacy trash
VladSenyuta Mar 27, 2024
55b568f
clear module from legacy trash
VladSenyuta Mar 27, 2024
115cc02
upd listeners
VladSenyuta Mar 27, 2024
2127700
upd enums
VladSenyuta Mar 27, 2024
acf921a
upd WebUtil logs
VladSenyuta Mar 27, 2024
8050064
Merge branch 'refs/heads/main' into vlad/develop
VladSenyuta Apr 9, 2024
bdb84b5
upd browser profiles
VladSenyuta Apr 9, 2024
8de7ca7
fix local browser setup
VladSenyuta Apr 9, 2024
03d82d1
Merge remote-tracking branch 'origin/vlad/develop' into vlad/develop
VladSenyuta Apr 9, 2024
4eac0ec
fix regression.xml
VladSenyuta Apr 9, 2024
de0909c
fix naming. a bit
VladSenyuta Apr 9, 2024
f9014a0
fix editActiveSmartFilterCheck
VladSenyuta Apr 9, 2024
d703b45
fix assert messages
VladSenyuta Apr 10, 2024
95b5ac6
fix assert messages
VladSenyuta Apr 10, 2024
f7bd3b5
fix readme
VladSenyuta Apr 10, 2024
97f2163
fix readme
VladSenyuta Apr 10, 2024
5f5de7b
fix regression.xml
VladSenyuta Apr 10, 2024
d23408a
Revert "fix regression.xml"
VladSenyuta Apr 10, 2024
0c13c0e
add SeekType enum
VladSenyuta Apr 10, 2024
8d816a3
upd bug links
VladSenyuta Apr 10, 2024
272b662
ашч messagesCountPerPageCheck
VladSenyuta Apr 10, 2024
09b7696
upd issues
VladSenyuta Apr 10, 2024
4d55f44
upd issues
VladSenyuta Apr 10, 2024
778569a
upd e2e mvn profiles naming
VladSenyuta Apr 10, 2024
2a676f0
Refactor pom file
Haarolean Apr 10, 2024
8c5c5c1
Revert "Infra: Disable e2e tests for now"
Haarolean Mar 17, 2024
d432966
Nuke remaining qase stuff
Haarolean Apr 10, 2024
3b5c807
upd searchItem
VladSenyuta Apr 11, 2024
745ec96
Refactor e2e workflows
Haarolean Apr 11, 2024
5ad88db
Merge remote-tracking branch 'origin/vlad/develop' into vlad/develop
Haarolean Apr 14, 2024
4bae3ac
Merge branch 'main' into vlad/develop
Haarolean Apr 15, 2024
98dbb89
fix enums to string method
VladSenyuta Apr 15, 2024
62e31ef
Merge remote-tracking branch 'origin/vlad/develop' into vlad/develop
VladSenyuta Apr 15, 2024
3533e7f
fix size > 0 with !isEmpty
VladSenyuta Apr 15, 2024
a80b6f1
fix log results
VladSenyuta Apr 15, 2024
42d01a0
fix log results
VladSenyuta Apr 15, 2024
4688b92
Fix test suite param name
Haarolean Apr 15, 2024
decd3b2
Nuke trailing spaces
Haarolean Apr 15, 2024
a4ba10a
Fix test suite param name (again)
Haarolean Apr 15, 2024
2548376
fix enums
VladSenyuta Apr 15, 2024
4fdffaf
Merge remote-tracking branch 'origin/vlad/develop' into vlad/develop
VladSenyuta Apr 15, 2024
943712e
fix enums
VladSenyuta Apr 15, 2024
cc4cb3e
fix naming. a bit
VladSenyuta Apr 15, 2024
b0ef8b8
fix clickClearSearchFieldButton
VladSenyuta Apr 15, 2024
2687487
Fix jobs conditions
Haarolean Apr 15, 2024
8bd9b46
Rename e2e wf files
Haarolean Apr 15, 2024
670fb8f
Merge remote-tracking branch 'origin/vlad/develop' into vlad/develop
Haarolean Apr 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: read
statuses: write

jobs:
build:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/e2e-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "E2E: Automation suite"
on:
workflow_dispatch:
inputs:
test_suite:
description: 'Select test suite to run'
default: 'regression'
required: true
type: choice
options:
- regression
- sanity
- smoke

permissions:
contents: read
checks: write
statuses: write

jobs:
build-and-test:
uses: ./.github/workflows/e2e-run.yml
secrets: inherit
with:
suite_name: ${{ github.event.inputs.test_suite }}
sha: ${{ github.sha }}
163 changes: 163 additions & 0 deletions .github/workflows/e2e-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: "E2E: Run tests"

on:
workflow_call:
inputs:
suite_name:
description: 'Test suite name to run'
default: 'regression'
required: true
type: string
sha:
required: true
type: string

permissions:
contents: read
checks: write
statuses: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ inputs.sha }}

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: 'maven'

- name: Build with Maven
id: build_app
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ inputs.sha }}
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true

- name: Upload maven artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: ~/.m2/repository/io/kafbat/ui/**/*
retention-days: 7

- name: Dump docker image
run: |
docker image save ghcr.io/kafbat/kafka-ui:latest > /tmp/image.tar

- name: Upload docker image
uses: actions/upload-artifact@v4
with:
name: image
path: /tmp/image.tar
retention-days: 7

tests:
runs-on: ubuntu-latest
needs: build
steps:

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ inputs.sha }}

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: 'maven'

- name: Download maven artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: ~/.m2/repository/io/kafbat/ui

- name: Download docker image
uses: actions/download-artifact@v4
with:
name: image
path: /tmp

- name: Load Docker image
run: |
docker load --input /tmp/image.tar

- name: Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('./e2e-tests/selenoid/selenoid-ci.yaml', './documentation/compose/e2e-tests.yaml') }}

- name: Compose up
id: compose_app
# use the following command until #819 will be fixed # TODO recheck 819
run: |
mkdir -p ./e2e-tests/target/selenoid-results/video
mkdir -p ./e2e-tests/target/selenoid-results/logs
docker-compose -f ./e2e-tests/selenoid/selenoid-ci.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d

- name: Run test suite
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ inputs.sha }}
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/${{ github.event.inputs.test_suite }}.xml' -f 'e2e-tests' test -Pprod

- name: Dump Docker logs on failure
if: failure()
uses: jwalton/[email protected]

- name: Upload allure reports artifact
uses: actions/upload-artifact@v4
with:
name: reports
path: ./e2e-tests/target/allure-results
retention-days: 7

reports:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.repository == 'kafbat/kafka-ui' }}
steps:
- name: Download allure reports artifact
uses: actions/download-artifact@v4
with:
name: reports
path: ./e2e-tests/target/allure-results

- name: Generate Allure report
uses: simple-elf/[email protected]
id: allure-report
with:
allure_results: ./e2e-tests/target/allure-results
gh_pages: allure-results
allure_report: allure-report
subfolder: allure-results
report_url: "https://reports.kafbat.dev"

- name: Upload allure report to R2
uses: ryand56/r2-upload-action@latest
with:
source-dir: allure-history/allure-results
destination-dir: .
r2-bucket: "reports"
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_ACCESS_SECRET_KEY }}

- name: Add allure link status check
uses: Sibz/[email protected]
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Click Details button to view Allure report"
state: "success"
sha: ${{ inputs.sha }}
target_url: https://reports.kafbat.dev/${{ github.run_number }}
24 changes: 24 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "E2E: PR healthcheck"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
paths:
- "pom.xml"
- "contract/**"
- "api/**"
- "serde-api/**"
- "frontend/**"
- "e2e-tests/**"

permissions:
contents: read
checks: write
statuses: write

jobs:
build-and-test:
uses: ./.github/workflows/e2e-run.yml
secrets: inherit
with:
suite_name: "smoke"
sha: ${{ github.event.pull_request.head.sha }}
17 changes: 17 additions & 0 deletions .github/workflows/e2e-weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "E2E: Weekly suite"
on:
schedule:
- cron: '0 1 * * 1'

permissions:
contents: read
checks: write
statuses: write

jobs:
build-and-test:
uses: ./.github/workflows/e2e-run.yml
secrets: inherit
with:
suite_name: "sanity"
sha: ${{ github.sha }}
3 changes: 0 additions & 3 deletions e2e-tests/.env.ci

This file was deleted.

3 changes: 0 additions & 3 deletions e2e-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.env
build/
allure-results/
selenoid/video/
target/
selenoid/logs/
70 changes: 0 additions & 70 deletions e2e-tests/QASE.md

This file was deleted.

Loading
Loading