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

Add a test case to an existing test suite #644

Open
dmcassel opened this issue Jan 6, 2023 · 3 comments
Open

Add a test case to an existing test suite #644

dmcassel opened this issue Jan 6, 2023 · 3 comments

Comments

@dmcassel
Copy link
Contributor

dmcassel commented Jan 6, 2023

The mlGenerateUnitTestSuite task will create a new test suite, but if you give it the name of an existing suite it will overwrite the setup and teardown modules. Allow generation of a new test case. This could be done a couple ways:

  1. Modify mlGenerateUnitTestSuite so that if the test suite already exists, it creates the new test case and skips all the setup/teardown.
  2. Create a new task for generating only test cases.
@rjrudin rjrudin added this to the 4.6.0 milestone Aug 9, 2023
@rjrudin
Copy link
Contributor

rjrudin commented Aug 9, 2023

I think approach 1 would work, where the task would say - if the directory exists and there's at least one file in it, then only generate the test module.

@rjrudin
Copy link
Contributor

rjrudin commented Aug 10, 2023

@dmcassel I'm wondering about the value of this now - in practice, I just copy/paste an existing test, as that is likely to already be importing other libraries that are helpful for my tests. That seems easier than having to remember a Gradle task name and type out the correct arguments.

@rjrudin rjrudin removed this from the 4.6.0 milestone Aug 10, 2023
@dmcassel
Copy link
Contributor Author

@rjrudin fair enough. Is it worth having the mlGenerateUnitTestSuite task see that the target directory already exists and decline to go further, to avoid overwriting things? Or good enough to rely on git's ability to restore?

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

No branches or pull requests

2 participants