Skip to content

Add support for skipped robot tests #358

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SAmorozov
Copy link

//: # (
. Thank you so much for sending us a pull request!
.
. Make sure you have a clear name for your pull request.
. The name should start with a capital letter and no dot is required in the end of the sentence.
. To link the request with isses use the following notation: (fixes #123, fixes #321)
.
. An example of good pull request names:
. - Add Russian translation (fixes #123)
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

Context

Now all robot's tests with tag "skipped" are marked as skipped in allure report.

Checklist

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sergei Morozov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sseliverstov
Copy link
Contributor

Thank you for your PR!

As you know, robot hasn't any possibilities to mark test for skipping, except if you directly select tests to execute in cmd line. In your PR status just redefined to skipped, so I not sure if it right. Test skipping means that it isn't actually runned.

For example, if the test doing something dangerous like table truncating then your reason to skip it is prevent dangerous action.

Is it true, you don't want to see some fails in report? Why are you not use --exclude?

@SAmorozov
Copy link
Author

Hi!
Yes, robot can't mark test as skipped, but we can do it in test by adding tag "skipped" and catching it in reporting servises, such as allure. It needed when we have functionality, that can be disabled. So our test previously checks, if functionality is enabled or disabled, and continue checking or skipping itself.
When we have many tests and many stands, we can't check manually if functionality is enabled or disabled, that's why we can't use --exclude.

@skhomuti
Copy link
Contributor

skhomuti commented Feb 27, 2019

@sseliverstov Example of skip_execution function

    def skip_execution(self, message, *tags):
        """Skip execution with pass result

        Args:
            message: message explaining why execution skipped
            tags: modifyed tags; see `pass_execution` keyword in `BuiltIn` library of Robot Framework
        """
        self.builtin_lib.log("Skip tests:%s" % message, level='WARN')
        try:
            self.builtin_lib.pass_execution("Skip tests:%s" % message, "skipped", *tags)
        except RuntimeError:
            self.pass_execution_without_tags(message)

@skhomuti skhomuti mentioned this pull request Jun 16, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants