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

Generate E2E typescript test report for ReportPortal #22590

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

nallikaea
Copy link
Contributor

@nallikaea nallikaea commented Oct 10, 2023

What does this PR do?

resolves #22543

Screenshot/screencast of this PR

https://reportportal-crw.apps.ocp-c1.prod.psi.redhat.com/ui/#devspaces/launches/all

What issues does this PR fix or reference?

resolves #22543

How to test this PR?

Use REPORTER_CONSTANTS to set reporter parameters
Then run tests, for example using tests/e2e/configs/sh-scripts/regressionTestRun.sh

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@nallikaea nallikaea changed the title 22543 peportportal Generate E2E typescript test report for ReportPortal Oct 10, 2023
@che-bot che-bot added target/branch Indicates that a PR will be merged into a branch other than master. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Oct 10, 2023
@nallikaea nallikaea force-pushed the 22543-peportportal branch 5 times, most recently from bf06c39 to 3e083d8 Compare October 18, 2023 14:33
@dmytro-ndp
Copy link
Contributor

@nallikaea : could you please share an example of ReportPortal constants to run Dev Spaces functional test suite and send test results to ReportPortal ?:

docker run --shm-size=4096m -p 5920:5920 \
 -e TS_SELENIUM_LOAD_PAGE_TIMEOUT=420000 \
 -e TS_SELENIUM_BASE_URL=https://devspaces.apps.ocp413.crw-qe.com \
 -e DELETE_WORKSPACE_ON_FAILED_TEST=true \
 -e TS_SELENIUM_START_WORKSPACE_TIMEOUT=120000 \
 -e NODE_TLS_REJECT_UNAUTHORIZED=0 \
 -e VIDEO_RECORDING=true \
 -e E2E_OCP_CLUSTER_API_URL=https://api.ocp413.crw-qe.com:6443 \
 -e TS_SELENIUM_LOG_LEVEL=TRACE \
 -e TS_WAIT_LOADER_PRESENCE_TIMEOUT=120000 \
 -e TS_COMMON_DASHBOARD_WAIT_TIMEOUT=30000 \
 -e OCP_INFRA=PSI \
 -v /tmp:/usr/local/bin:Z \
 -v /home/hudson/.kube:/home/seluser/.kube:Z \
 -v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e:/tmp/e2e:Z \
 -v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e/video:/tmp/ffmpeg_report:Z \
 -e TS_SELENIUM_VALUE_OPENSHIFT_OAUTH=true \
 -e TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=htpasswd \
 -e TS_SELENIUM_OCP_USERNAME=******* \
 -e 'TS_SELENIUM_OCP_PASSWORD=******' \
 -e TS_COMMON_DASHBOARD_WAIT_TIMEOUT=120_000 \
 -e TEST_SUITE=functional-test-suite \
 -e OCP_VERSION=4.13 \
 -e ARCH_VERSION=x86_64 quay.io/eclipse/che-e2e:next

@nallikaea
Copy link
Contributor Author

nallikaea commented Oct 23, 2023

docker run --shm-size=4096m -p 5920:5920
-e TS_SELENIUM_BASE_URL=https://devspaces.apps.ocp413.crw-qe.com
-e TS_SELENIUM_LOG_LEVEL=TRACE
-v /tmp:/usr/local/bin:Z
-v /home/hudson/.kube:/home/seluser/.kube:Z
-v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e:/tmp/e2e:Z
-v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e/video:/tmp/ffmpeg_report:Z
-e TS_SELENIUM_OCP_USERNAME=*******
-e 'TS_SELENIUM_OCP_PASSWORD=******'
-e TEST_SUITE=functional-test-suite
-e OCP_VERSION=4.13
-e ARCH_VERSION=x86_64 \

-e SAVE_RP_REPORT_DATA=true
-e RP_API_KEY=<USER_APP_KEY_OR_TOKEN>
-e RP_IS_LOCAL_SERVER=false
-e RP_USE_PERSONAL=false
quay.io/eclipse/che-e2e:next

@dmytro-ndp
Copy link
Contributor

@nallikaea : thank you

For the sake of simplicity, I would use constant OCP_INFRA=["PSI", "AWS", "IBM Z", "IBM Power"] instead of ARCH_VERSION.

The point is that when it turns to CRW Jenkins CI, typescript-tests pipeline is running tests using x86_64 Jenkins nodes doesn't matter if the testing OCP arch is amd64, or s390x.
The only difference is value of OCP_INFRA parameter of typescript-tests pipeline.

@nallikaea
Copy link
Contributor Author

@nallikaea : thank you

For the sake of simplicity, I would use constant OCP_INFRA=["PSI", "AWS", "IBM Z", "IBM Power"] instead of ARCH_VERSION.

The point is that when it turns to CRW Jenkins CI, typescript-tests pipeline is running tests using x86_64 Jenkins nodes doesn't matter if the testing OCP arch is amd64, or s390x. The only difference is value of OCP_INFRA parameter of typescript-tests pipeline.

okay, replaced in new commit

/**
* user name on ReportPortal
*/
RP_USER: process.env.RP_USER || process.env.USER || 'superadmin',
Copy link
Contributor

Choose a reason for hiding this comment

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

From security perspective I would prefer empty RP user name by default.

@dmytro-ndp
Copy link
Contributor

@nallikaea : thanks for the fixup.

I tried to run tests with parameters you shared [1] and using personal RP access token [2], but had got an error:

01:10:18  Error: Request failed with status code 403: {"errorCode":4003,"message":"You do not have enough permissions."}
01:10:18  URL: https://reportportal-crw.apps.ocp-c1.prod.psi.redhat.com/api/v1/superadmin_personal/launch
01:10:18  method: POST
01:10:18      at /tmp/e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
01:10:18      at processTicksAndRejections (node:internal/process/task_queues:96:5)

It seemed to be missing -e RP_USER in the test run command.

[1] #22590 (comment)
[2] https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/13528/consoleFull

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Oct 25, 2023

@nallikaea : second try with RT_USER parameter and single testcase was successful: https://reportportal-crw.apps.ocp-c1.prod.psi.redhat.com/ui/#devspaces/launches/all/132 , https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/13529/console

At the same time I couldn't find info about test OCP version = 4.14 and OCP infra = PSI in RP test launch.
Is it expected?
Test run command:

docker run --shm-size=4096m -p 5920:5920 -e TS_SELENIUM_LOAD_PAGE_TIMEOUT=420000 -e TS_SELENIUM_BASE_URL=https://devspaces.apps.ocp414.crw-qe.com/ -e DELETE_WORKSPACE_ON_FAILED_TEST=true -e TS_SELENIUM_START_WORKSPACE_TIMEOUT=120000 -e NODE_TLS_REJECT_UNAUTHORIZED=0 -e VIDEO_RECORDING=true -e E2E_OCP_CLUSTER_API_URL=https://api.ocp414.crw-qe.com:6443/ -e TS_SELENIUM_LOG_LEVEL=TRACE -e TS_WAIT_LOADER_PRESENCE_TIMEOUT=120000 -e TS_COMMON_DASHBOARD_WAIT_TIMEOUT=30000 -e OCP_INFRA=PSI -e OCP_VERSION=4.14 -v /tmp:/usr/local/bin:Z -v /home/hudson/.kube:/home/seluser/.kube:Z -v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e:/tmp/e2e:Z -v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2e/video:/tmp/ffmpeg_report:Z -e USERSTORY=SmokeTest -e TS_SELENIUM_OCP_USERNAME=***** -e 'TS_SELENIUM_OCP_PASSWORD=*****' -e SAVE_RP_REPORT_DATA=true -e RP_IS_LOCAL_SERVER=false -e RP_USE_PERSONAL=false -e RP_USER=DNOCHEVN ******** quay.io/eclipse/che-e2e:next

Third run, now with -e TEST_SUITE=functional-test-suite, has left no test launch in RP at all: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/13530/consoleFull

@nallikaea
Copy link
Contributor Author

no, you should not set RP_user by default, let me check

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

looks good to merge

@nallikaea nallikaea merged commit 9fb1a12 into eclipse-che:main Oct 27, 2023
3 checks passed
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. target/branch Indicates that a PR will be merged into a branch other than master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate E2E typescript test report for ReportPortal
4 participants