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

feat: warn when a Playwright test function can't be found #2782

Merged
merged 1 commit into from
May 27, 2024

Conversation

hassy
Copy link
Member

@hassy hassy commented May 23, 2024

Description

Print an error message when a Playwright test function can't be loaded. This can happen if a testFunction or flowFunction attribute specifies a function that does not exist, or if the attribute is missing.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

@hassy hassy merged commit 1682bbb into main May 27, 2024
12 checks passed
@hassy hassy deleted the feat/warn-when-no-test-function branch May 27, 2024 11:24
@@ -352,6 +352,14 @@ class PlaywrightEngine {
self.processor[spec.testFunction] ||
self.processor[spec.flowFunction];

console.error('Playwright test function not found:', fn);
Copy link
Contributor

Choose a reason for hiding this comment

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

@hassy I might be wrong, but why is that console.error call not inside the if block below ?

Copy link
Contributor

Choose a reason for hiding this comment

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

because since I updated to v2.0.13 I get spammed a lot about some test function not found 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ and this is why even "trivial" changes should have an automated test. Will release a fix asap

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

no problem, it didn't break anything, just printed a lot 😄

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