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

Print error message from start workspace page in E2E test logs #22983

Merged
merged 3 commits into from
Nov 9, 2024

Conversation

dmytro-ndp
Copy link
Contributor

@dmytro-ndp dmytro-ndp commented May 23, 2024

What does this PR do?

It is extracting Start workspace status , Start workspace progress title , Start workspace progress description information from "Creating workspace" page to improve test log analysis and give more patterns to ReportPortal automatic TFA.

Screenshot/screencast of this PR

For the next workspace start failure:

Screenshot from 2024-11-08 00-34-40

there was next test log with extracted Start workspace status , Start workspace progress title , Start workspace progress description :

...
      ✔ Create and open new workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo
            ‣ DriverHelper.getDriver
            ‣ WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage - failed to obtain name from workspace start page, element not visible yet. Retrying.
            ‣ DriverHelper.wait - (1000 milliseconds)
  [ERROR] WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage - failed to obtain workspace name
            ‣ DriverHelper.getDriver
            ‣ DriverHelper.getDriver
            ‣ DriverHelper.getDriver
      • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace status: Stopped
      • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace progress title: <span class="pf-u-screen-reader">Warning alert:</span>Existing workspace found
      • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace progress description: A workspace with the same name (devfile-with-typo) has been found. Should you want to open the existing workspace or proceed to create a new one, please choose the corresponding action.
      1) Obtain workspace name from workspace loader page
  [ERROR] CheReporter runner.on.fail: The SmokeTest userstory  Create workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo Obtain workspace name from workspace loader page failed after 20768ms
            ‣ FullTitle:The SmokeTest userstory  Create workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo Obtain workspace name from workspace loader page
            ‣ Function.sanitizeTitle
            ‣ FullTitleSanitized:The_SmokeTest_userstory__Create_workspace_from_factory-https-++github.com+dmytro-ndp+devfile-with-typo_Obtain_workspace_name_from_workspace_loader_page
            ‣ TestTitle:Obtain workspace name from workspace loader page
            ‣ Function.sanitizeTitle
            ‣ TestTitleSanitized:Obtain_workspace_name_from_workspace_loader_page
            ‣ DriverHelper.getDriver
          ▼     at /home/ndp/projects/che/tests/e2e/specs/MochaHooks.ts:39:12 - delete workspace name


  1 passing (1m)
  1 failing

  1) The SmokeTest userstory 
       Create workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo
         Obtain workspace name from workspace loader page:
     InvalidArgumentError: WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage failed to obtain workspace name.
...

What issues does this PR fix or reference?

#22967

How to test this PR?

Functional tests run from this PR: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/complex/job/latest/job/functional-tests/1669/

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.

@ibuziuk
Copy link
Member

ibuziuk commented Jul 22, 2024

@dmytro-ndp what is the plan with this PR? Should we close it or prioritize the issue for the next sprint?

@dmytro-ndp
Copy link
Contributor Author

@ibuziuk: thanks for reminding.

Let's prioritize the issue for the next sprint.

@dmytro-ndp
Copy link
Contributor Author

New test run with new changes: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/29760/console

22:57:05    [ERROR] DriverHelper.waitVisibility - failed with exception, out of attempts - TimeoutError: Waiting for element to be located By(css selector, .monaco-workbench)
22:57:05    Wait timed out after 1214ms
22:57:05    [ERROR] ProjectAndFileTests.waitWorkspaceReadinessForCheCodeEditor - waiting for workspace readiness failed: TimeoutError: Waiting for element to be located By(css selector, .monaco-workbench)
22:57:05    Wait timed out after 1214ms
22:57:05              ‣ DriverHelper.getDriver
22:57:05              ‣ DriverHelper.getDriver
22:57:05              ‣ DriverHelper.getDriver
22:57:05        • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace status: Failed
22:57:05        • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace progress title: <span class="pf-u-screen-reader">Warning alert:</span>Failed to open the workspace
22:57:05        • WorkspaceHandlingTests.logStartWorkspaceInfo - Start workspace progress description: Error creating DevWorkspace deployment: Container tools has state ImagePullBackOff
22:57:05        1) Wait workspace readiness
22:57:05    [ERROR] CheReporter runner.on.fail: The SmokeTest userstory  Create workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo Wait workspace readiness failed after 69291ms
22:57:05              ‣ FullTitle:The SmokeTest userstory  Create workspace from factory:https://github.com/dmytro-ndp/devfile-with-typo Wait workspace readiness

Start workspace page screenshot:
screenshot-Wait_workspace_readiness (22)

@dmytro-ndp dmytro-ndp merged commit 064b37c into main Nov 9, 2024
5 checks passed
@dmytro-ndp dmytro-ndp deleted the che-22967 branch November 9, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants