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

skip debug when not needed #45

Closed
fspegni opened this issue May 10, 2019 · 3 comments
Closed

skip debug when not needed #45

fspegni opened this issue May 10, 2019 · 3 comments
Labels

Comments

@fspegni
Copy link
Contributor

fspegni commented May 10, 2019

Hi, first of all thanks for this cool library.

I'm facing this scenario: I'm writing my tests and from time to time I need to insert the Debug keyword in order to stop the execution and inspect variables. However, when finished, I may forget to delete some Debug keyword from my tests, and this would block the testing task in my CI/CD pipeline.

Would it be useful to add some notion of "debug mode" such that when I write tests I set the "debug mode" to ON, thus every Debug keyword actually stops the test execution, while on the CI/CD pipeline i can set the "debug mode" to OFF and every Debug keyword is returned immediately.

If this is not possible, I guess I can fork the project and send you a PR in the next weeks.

@tw39124-1
Copy link

As a suggestion, you could just wrap the Debug keyword in a Run Keyword If statement which checks for an environment variable. For example:

Run Keyword If | %{DEBUG_DISABLED}=="1" | Debug

Then in your CI/CD pipeline, ensure DEBUG_DISABLED is set to 1 to prevent the Debug keywords from stopping test execution.

@fspegni
Copy link
Contributor Author

fspegni commented Dec 17, 2019

Hi, this is of course possible, but it requires all the test developers to adhere to this schema, and I would like to provide something easier to use (e.g. a Debug If keyword).

I try to work on a fork and send a PR when done

@xyb xyb added the feature label May 9, 2020
@xyb
Copy link
Owner

xyb commented May 17, 2020

@fspegni @tw39124-1 I just released a new version v2.2.0 that adds the Debug If keyword.

@xyb xyb closed this as completed May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants