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

Test Case setting order is different than Robocop/style guide #719

Open
emilezwiggelaar opened this issue Oct 22, 2024 · 1 comment
Open

Comments

@emilezwiggelaar
Copy link

I have a testcase in which I use [Template] and a [Setup], like this example:

Case One
[Documentation] datadriven testcase via test-template
[Setup] Log Setup console
[Template] A Template
Just a keyword in testcase One
[Teardown] Log Teardown console

But when I run robotidy on my commandline it tells me that [Template] should be before [Setup]. (Well actually it 'fixes' the order automatically).

And then when I run robocop on my commandline I get this message: [W] 0927 'SETUP' is in wrong place of Test Case. Recommended order of elements in Test Cases: DOCUMENTATION, TAGS, TIMEOUT, SETUP, TEMPLATE, KEYWORD, TEARDOWN (test-case-section-out-of-order)
These styles seem to contradict each other.... in Slack I was told that Robocop uses the correct order so it would be nice to have robotidy use that same order...

(I know I can just configure tidy to use the same order as robocop but that is impractical)

@bhirsz
Copy link
Member

bhirsz commented Jan 3, 2025

I agree on it. I remember the discussion on it and I will adjust so both Robocop and Robotidy uses the same order.

Ideally though it should be just robocop rule with option to 'fix' the issue. I will look into it in the future Robocop first ('Robocop 2' or merged both tools). If not, I will release it in robotidy

@bhirsz bhirsz changed the title Robotidy ruleset conflicting with robocop/styleguide Test Case setting order is different than Robocop/style guide Jan 3, 2025
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