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

Intelij: 2024.2 Update Test Automation in Windows and Linux #1067

Open
4 of 5 tasks
vaisakhkannan opened this issue Nov 1, 2024 · 10 comments
Open
4 of 5 tasks

Intelij: 2024.2 Update Test Automation in Windows and Linux #1067

vaisakhkannan opened this issue Nov 1, 2024 · 10 comments
Assignees
Labels
5 Estimated story points enhancement New feature or request high priority
Milestone

Comments

@vaisakhkannan
Copy link
Contributor

vaisakhkannan commented Nov 1, 2024

Update UI test automation on Windows to support IntelliJ 2024.2.

  • SingleModJakartaLSTestCommon - [Done]
  • SingleModLibertyLSTestCommon - [Done]
  • SingleModMPLSTestCommon -[Done]
  • SingleModMPProjectTestCommon -[In Progress]-> Failing in GHA for test MavenSingleModMPSIDProjectTest
  • SingleModNLTRestProjectTestCommon - [Done]
@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 5, 2024

SingleModLibertyLSTestCommon

  • prepareEnv & cleanup
  • testServerXMLFeatureHover
  • testServerXMLNonFeatureHover
  • testInsertFeatureIntoServerXML
  • testInsertLibertyConfigElementIntoServerXML
  • testInsertLibertyConfigIntoServerEnv
  • testInsertLibertyConfigIntoBootstrapProps
  • testServerEnvCfgHover
  • testBootstrapPropsCfgHover
  • testDiagnosticInServerXML
  • testQuickFixInServerXML
  • testDiagnosticInServerEnv
  • testDiagnosticInBootstrapProperties

@vaisakhkannan vaisakhkannan added the 5 Estimated story points label Nov 5, 2024
@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 5, 2024

SingleModNLTRestProjectTestCommon

  • testManualProjectAddRemoveActionUsingSearch
  • testsRefreshProjectWithServerXmlOnly
  • testsRefreshProjectWithLTBuildCfgOnlyWithBldScriptBlock
  • testsRefreshProjectWithLTBuildCfgOnly

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 5, 2024

SingleModJakartaLSTestCommon

  • testInsertJakartaCodeSnippetIntoJavaPart
  • testJakartaDiagnosticsInJavaPart
  • testJakartaQuickFixInJavaPart

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 5, 2024

SingleModMPLSTestCommon

  • testInsertCodeSnippetIntoJavaPart
  • testMPDiagnosticsInJavaPart
  • testMPQuickFixInJavaFile
  • testInsertMicroProfileProperty
  • testMicroProfileConfigHover
  • testDiagnosticInMicroProfileConfigProperties
  • testQuickFixInMicroProfileConfigProperties

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 6, 2024

SingleModMPProjectTestCommon

  • testOpenBuildFileActionUsingPopUpMenu
  • testStartWithParamsActionUsingDropDownMenu
  • testStartWithParamsActionUsingPlayToolbarButton
  • testStartWithParamsActionUsingPopUpMenu
  • testStartWithParamsActionUsingSearch
  • testRunTestsActionUsingDropDownMenu
  • testRunTestsActionUsingPlayToolbarButton
  • testRunTestsActionUsingPopUpMenu
  • testRunTestsActionUsingSearch
  • testStartWithConfigInDebugModeUsingToolbar
  • testStartWithConfigInDebugModeUsingMenu
  • testStartWithConfigInRunModeUsingToolbar
  • testStartWithConfigInRunModeUsingMenu
  • testMultipleConfigEditHistory
  • testStartInContainerActionUsingDropDownMenu - @EnabledOnOs({OS.LINUX})
  • testStartInContainerActionUsingPlayToolbarButton - @EnabledOnOs({OS.LINUX})
  • testStartInContainerActionUsingPopUpMenu - @EnabledOnOs({OS.LINUX})
  • testStartInContainerActionUsingSearch - @EnabledOnOs({OS.LINUX})
  • testCustomStartParametersClearedOnConfigRemoval

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 8, 2024

GHA Build Run : https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/11723063340/job/32653929671

Found issue when try to access Run Menu

upload-run-issue.mov

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 9, 2024

Found an issue in GHA in testOpenBuildFileActionUsingPopUpMenu test, Unable to close editor tab of build File

closetab-issue.mov

Solution :Instead of trying to click the close button (X) on the file tab, just right-click on the file tab name and choose the 'Close' menu item. This will close the file tab.

vaisakhkannan added a commit to vaisakhkannan/liberty-tools-intellij that referenced this issue Nov 11, 2024
vaisakhkannan added a commit to vaisakhkannan/liberty-tools-intellij that referenced this issue Nov 11, 2024
@vaisakhkannan vaisakhkannan changed the title Intelij: 2024.2 Update Test Automation in Windows Intelij: 2024.2 Update Test Automation in Windows and Linux Nov 12, 2024
@vaisakhkannan
Copy link
Contributor Author

@TrevCraw , I found a behavioral difference between Linux and Windows. In Linux, First robot clicks on the Main Menu(four lines), then the robot only needs to hover over the Action Menu after navigate to the corresponding Action Menu, while in Windows, I have written the code to click on the Action menu. This caused a failure in Linux, as it doesn't require a click on the action menu. To make it compatible with both systems, I modified the code to use moveMouse() instead of click(), which will work on both Linux and Windows.

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 12, 2024

I found 2 common failures in GHA

First one is

MavenSingleModMPSIDProjectTest > initializationError FAILED
    java.lang.RuntimeException: Unable to expand the Liberty tool window project tree.
        at io.openliberty.tools.intellij.it.UIBotTestUtils.expandLibertyToolWindowProjectTree(UIBotTestUtils.java:653)
        at io.openliberty.tools.intellij.it.SingleModMPProjectTestCommon.prepareEnv(SingleModMPProjectTestCommon.java:922)
        at io.openliberty.tools.intellij.it.MavenSingleModMPSIDProjectTest.setup(MavenSingleModMPSIDProjectTest.java:102)

        Caused by:
        com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT20S) for condition function (Failed to find 'ComponentFixture' by '//div[@class='LibertyExplorer']//div[@accessiblename='Expand All' and @class='ActionButton']' in 20s) 
            at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:51)
            at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:37)
            at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53)
            at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51)
            at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23)
            at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51)
            at com.intellij.remoterobot.fixtures.ContainerFixture.find(ContainerFixture.kt:12)
            at io.openliberty.tools.intellij.it.fixtures.ProjectFrameFixture.getActionButton(ProjectFrameFixture.java:62)
            at io.openliberty.tools.intellij.it.UIBotTestUtils.expandLibertyToolWindowProjectTree(UIBotTestUtils.java:634)
            ... 2 more

GHA Run link : https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/11790595086/job/32841292475

The MavenSingleModMPSIDProjectTest class inherits from SingleModMPProjectTestCommon, which has a total of four child classes. Only MavenSingleModMPSIDProjectTest is failing, so I am trying to add some delays to the MavenSingleModMPSIDProjectTest class code to make it work correctly.

Second one is ,

GradleSingleModMPProjectTest > initializationError FAILED
    com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT10S) for condition function (Failed to find 'ComponentFixture' by '//div[@class='ActionMenu' and @text='Window']//div[@class='ActionMenu' and @text='Editor Tabs']' in 10s) 
        at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:51)
        at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:37)
        at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53)
        at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51)
        at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23)
        at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51)
        at com.intellij.remoterobot.fixtures.ContainerFixture.find(ContainerFixture.kt:12)
        at io.openliberty.tools.intellij.it.fixtures.ProjectFrameFixture.getChildActionMenu(ProjectFrameFixture.java:106)
        at io.openliberty.tools.intellij.it.UIBotTestUtils.closeAllEditorTabs(UIBotTestUtils.java:807)
        at io.openliberty.tools.intellij.it.SingleModMPProjectTestCommon.prepareEnv(SingleModMPProjectTestCommon.java:931)
        at io.openliberty.tools.intellij.it.GradleSingleModMPProjectTest.setup(GradleSingleModMPProjectTest.java:83)

GHA Run link : https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/11790595086/job/32841292151

@vaisakhkannan
Copy link
Contributor Author

vaisakhkannan commented Nov 15, 2024

I resolved the above second issue successfully. For the first issue, I attempted various approaches, including adding delays and modifying the UI component class to access specific element. However, the issue persisted with the error:
MavenSingleModMPSIDProjectTest > initializationError FAILED
The MavenSingleModMPSIDProjectTest class inherits from SingleModMPProjectTestCommon, which has four child classes in total. Only MavenSingleModMPSIDProjectTest is failing. From the GHA results, I observed that MavenSingleModMPSIDProjectTest is executed after MavenSingleModMPProjectTest (another child class of the same parent class). To address this, I renamed the MavenSingleModMPProjectTest class to MavenSingleModMPTest. This change ensured that MavenSingleModMPSIDProjectTest executes first, followed by MavenSingleModMPTest. Fortunately, this resolved the initialization error for MavenSingleModMPSIDProjectTest.

You can review the linux GHA results below:
linux build 1
linux build 2
For Linux, the results show 120 tests completed, 16 failed, and 16 skipped. The 16 failures are unit test failures, while all other tests pass

You can review the Windows GHA results below:
windows build 1
windows build 2
the results were 120 tests completed, 17 failed, and 16 skipped. Of the 17 failures, 16 are unit test failures, and 1 is a known issue (testDiagnosticInServerEnv()).
Renaming MavenSingleModMPProjectTest to MavenSingleModMPTest consistently resolves the initialization error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 Estimated story points enhancement New feature or request high priority
Projects
Development

No branches or pull requests

1 participant