Skip to content

Issue#354 Test cases added for Gradle and Maven#364

Open
SuparnaSuresh wants to merge 21 commits into
OpenLiberty:mainfrom
SuparnaSuresh:issue354-GradleTestcaseProjectNameSpace
Open

Issue#354 Test cases added for Gradle and Maven#364
SuparnaSuresh wants to merge 21 commits into
OpenLiberty:mainfrom
SuparnaSuresh:issue354-GradleTestcaseProjectNameSpace

Conversation

@SuparnaSuresh

@SuparnaSuresh SuparnaSuresh commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

Fixes #354
Added test case to handling the scenario for

  • Gradle project name with space
  • Gradle Project directory with space
  • Maven Project directory with space

@SuparnaSuresh SuparnaSuresh changed the title Issue#354 Gradle testcase project name space Issue#354 Test cases added for Gradle and Maven Nov 5, 2024
Comment thread src/test/GradleTestDevModeActionsWSProjectNameInit.ts Outdated
Comment thread src/test/GradleTestDevModeActionsWSProjectNameTasks.ts Outdated
Comment thread src/test/GradleTestPathDevModeActionsWSTasks.ts Outdated
@aparnamichael

aparnamichael commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

@SuparnaSuresh

  1. Please fix the indentations.
  2. Remove unwanted spaces and unused lines of code.
  3. Run tests for 'Gradle project name' with space and 'Gradle Project directory with space' together, same as in LTI.

@SuparnaSuresh

Copy link
Copy Markdown
Contributor Author

@aparnamichael
Review comments addressed.
Made changes to run tests for 'Gradle project name' with space and 'Gradle Project directory with space' together.

aparnamichael
aparnamichael previously approved these changes Nov 6, 2024

@aparnamichael aparnamichael left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!!

@aparnamichael aparnamichael self-requested a review November 8, 2024 11:24
@aparnamichael

Copy link
Copy Markdown
Contributor

This will be merged after merging issue 337 PR.

@SuparnaSuresh SuparnaSuresh self-assigned this Dec 9, 2024

@TrevCraw TrevCraw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the test suite for dev actions was copied entirely for both maven and gradle to run against some different projects. If a change to a test is needed, we would need to make the change in multiple places. This will lead to difficult code management, especially if we continue to copy tests anytime we need to test against a different kind of project (think multi-module projects).

I believe the ultimate goal here is to run the existing dev actions tests against projects with spaces in the path. We should not copy the tests. We should find a way to run the same tests against various projects (i.e. find a way to parameterize the projects for the tests).

@SuparnaSuresh

Copy link
Copy Markdown
Contributor Author

Hi @TrevCraw,
I have analyzed the approach to running the same tests across different projects. It is possible to implement the same test cases for multiple projects, but this requires restructuring the current setup. Specifically, since the VSCode Extension Tester executes test cases sequentially based on filenames, the entire test case structure needs to be updated.

Currently, test cases are split across two files—init and devActions.
Gradle project --> We have GradleInitProject.ts (Open the IDE and project) and GradleTestDevModeActions.ts (executing the dev actions)
Maven project --> MavenInitProject.ts (Open IDE and project) and MavenTestDevModeActions.ts (cover dev action test cases)
To enable reusability across different projects, all test cases will need to be consolidated into a single file. Additionally, we will need to update the relevant methods in testUtils.ts to reflect these changes.

In summary, we will need to completely restructure the current test cases. This is expected to take approximately 3-4 days of work.
Kindly confirm whether can we proceed with the approach.
Thanks

@aparnamichael

Copy link
Copy Markdown
Contributor

@SuparnaSuresh - Please update the branch and resolve the conflicts.

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.

Test Case for Handling Spaces in App name and Directory Name.

3 participants