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

how to identify the test harness in use #128

Open
XSven opened this issue Feb 2, 2024 · 2 comments
Open

how to identify the test harness in use #128

XSven opened this issue Feb 2, 2024 · 2 comments

Comments

@XSven
Copy link

XSven commented Feb 2, 2024

I wanted to check in my test script which test harness is in use. I would like to distinguish Test::Harness (ExtUtils::MakeMaker manged test) and TAP::Harness (prove managed test). How can I do this? I have checked the environment (HARNESS_* environment variables) without success.

@Leont
Copy link
Member

Leont commented Feb 2, 2024

Test::Harness is just a wrapper for TAP::Harness, and has been for about 20 years, so I don't know why you would want to make such a distinction.

@XSven
Copy link
Author

XSven commented Feb 3, 2024

I know that because I have sufficiently careful read the documentation. Time (20 years) could mean something but it doesn't have to. My use case:

I have written a new App::Prove plugin. My build system (install tool in your terminology) is ExtUtils::MakeMaker. I have written a unit test script that requires the plugin and calls its load() method. I would like to add an integration test script that by definition should be run through prove using its -P option. The former unit test script shouldn't be deselected but should skip_all if prove is executing it. That's why I want to check the harness in my unit test script.

All kinds of harness related information is passed to test scripts using HARNESS_* environment variables but the most obvious/trivial information the harness package name is not part of this information.

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