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

Allow user to run a subset of pack tests using st2-run-pack-tests script #4464

Merged
merged 6 commits into from
Dec 4, 2018

Conversation

Kami
Copy link
Member

@Kami Kami commented Dec 4, 2018

This pull request adds new -f flag to the st2-run-pack-tests script which allows users to run a subset of tests from a particular file.

For example:

  1. Run all tests in a test file (module):
st2-run-pack-tests -j -x -p contrib/packs/ -f test_action_download
  1. Run a single test class
st2-run-pack-tests -j -x -p contrib/packs/ -f test_action_download:DownloadGitRepoActionTestCase
  1. Run a single test class method
st2-run-pack-tests -j -x -p contrib/packs/ -f test_action_download:DownloadGitRepoActionTestCase.test_run_pack_download

Before those change it was only possible to run all the tests from a particular pack which was rather slow and time consuming when working on a specific test.

Kami added 3 commits December 4, 2018 15:47
st2-run-pack-tests scripts.

For example:

1. Run all tests in a file (module):
   st2-run-pack-tests -j -x -p contrib/packs/ -m test_action_download
2. Run a single test class
   st2-run-pack-tests -j -x -p contrib/packs/ -m test_action_download:DownloadGitRepoActionTestCase
3. Run a single test class method
   st2-run-pack-tests -j -x -p contrib/packs/ -m test_action_download:DownloadGitRepoActionTestCase.test_run_pack_download
@Kami Kami added this to the 3.0.0 milestone Dec 4, 2018
@Kami
Copy link
Member Author

Kami commented Dec 4, 2018

Documentation change is available at StackStorm/st2docs#826.

@Kami Kami requested review from m4dcoder and blag December 4, 2018 18:05
Copy link
Contributor

@blag blag left a comment

Choose a reason for hiding this comment

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

Maybe add a note to the usage text that the argument is passed directly to nosetests, so users immediately know they need to look into the nose documentation for the format of the argument, but I'll leave that decision to you.

LGTM!

@Kami Kami merged commit 20da3f2 into master Dec 4, 2018
@Kami Kami deleted the st2_run_pack_tests_improvements branch December 4, 2018 21:34
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.

2 participants