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 new built in command in Test suite that lists full names of all test classes or test cases. #3169

Closed
jk-1 opened this issue May 20, 2024 · 1 comment · Fixed by #3191
Closed
Milestone

Comments

@jk-1
Copy link

jk-1 commented May 20, 2024

Please add new built in command in Test suite that lists full names of all test classes or test cases.

E.g.

mill myLib.test.testList

com.myCompany.aa.FooTest         
com.myCompany.aa.BarTest
com.myCompany.bb.BlaaTest                  
com.myCompany.cc.BlaaBlaaTest      
com.myCompany.cc.BazTest               
com.myCompany.cc.HelloWorldTest

or with all test case names

mill myLib.test.testList -n

com.myCompany.aa.FooTest.myCase1         
com.myCompany.aa.BarTest."myCase 1"
com.myCompany.aa.BarTest."myCase 2"
com.myCompany.bb.BlaaTest.testCase01
com.myCompany.cc.BlaaBlaaTest."testCase 01"
com.myCompany.cc.BlaaBlaaTest."testCase 02"
com.myCompany.cc.BlaaBlaaTest."testCase 03"
com.myCompany.cc.BazTest.testBadValues
com.myCompany.cc.HelloWorldTest.testGoodValues
com.myCompany.cc.HelloWorldTest."test good and bad values"

so that it is easy to use this output for scripting like:

mill show myLib.test.testOnly -- com.myCompany.cc.HelloWorldTest."test good and bad values"

@lefou
Copy link
Member

lefou commented May 29, 2024

I like the idea, but I think the TestFramework abstraction we use can only provide us a list of test classes, not all test cases.

lefou added a commit that referenced this issue May 29, 2024
…#3191)

Example usage:

```
> mill show __.discoverTestClasses
{
  "foo.test.discoverTestClasses": [
    "foo.tests.FooTests",
    "foo.tests.FoobarTests"
  ]
  "bar.test.discoverTestClasses": [
    "foo.tests.BarTests"
  ]
}
```

Fix #3169

Pull request: #3191
@lefou lefou added this to the 0.11.8 milestone May 29, 2024
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 a pull request may close this issue.

2 participants