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 test options for classes and specific tests #35

Open
cyborgx37 opened this issue Aug 4, 2016 · 2 comments
Open

Add test options for classes and specific tests #35

cyborgx37 opened this issue Aug 4, 2016 · 2 comments

Comments

@cyborgx37
Copy link

dmc test currently accepts a --ns option, but there are no options to run a specific class or a specific test within a class.

Add the following options:

  • --class to filter apex classes by name
  • --name to filter tests by name

Options may be used independently or may be combined to provide even more targeted filters for which tests to run.

For now, only exact name matches (case-insensitive) will be supported, although a future iteration could potentially allow globbing patterns ("BR1_*", for example)

Example usage:

dmc test --class AccountTests
dmc test --name BR1_AccountManagerOrRegionManagerRequired
dmc test --class AccountTests --name BR1_AccountManagerOrRegionManagerRequired
dmc test --ns MyManagedPackage --class AccountTests --name BR1_AccountManagerOrRegionManagerRequired
@cyborgx37
Copy link
Author

I'd be happy to help by submitting a PR once this issue has been reviewed and approved/amended.

@kevinohara80
Copy link
Owner

dmc test uses the same globbing patterns as a deploy to select which classes to run tests on. Something like this works...

dmc test src/classes/MyTest*

The ability to specify tests methods to run does not currently exist and I'd be happy to entertain a PR for it. It's in my mental backlog of things to add right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants