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

A way to run just one test case #144

Open
wRAR opened this issue Feb 24, 2023 · 2 comments
Open

A way to run just one test case #144

wRAR opened this issue Feb 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@wRAR
Copy link
Member

wRAR commented Feb 24, 2023

I see three useful ways to run tests: by passing the fixtures directory / not passing anything, by passing the fixtures/<page object> directory and by passing the fixtures/<page object>/<test case> directory. Out of these, the last use case doesn't work, instead running all test cases in fixtures/<page object>, because collect_file_hook() always returns a WebPoetFile corresponding to fixtures/<page object>. On the other hand, if WebPoetFile is like a Python file with multiple test functions and one test case is like a single test function, then the correct usage would be fixtures/<page object>::<test case>? It currenty returns "directory argument cannot contain ::".

@wRAR wRAR added the enhancement New feature or request label Feb 24, 2023
@kmike
Copy link
Member

kmike commented Feb 27, 2023

A nice idea to have a documented way to run a single fixtures/<page object>/<test case>.

As a crude workaround, I think -k argument may work. It also works if one needs to run a test just for a specific field, not for all fields.

@proway2
Copy link

proway2 commented Sep 1, 2023

It'd be nice to have these tests discoverable by the IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants