Comments (2)
This sounds difficult to do right, plus I think it's sometimes reasonable
to have test cases that are identical except for the final validation step.
There is a school of thought that a test case should test only one thing.
So, for example, I may have a test for a file parser that parses the file
and then verifies that the return code is zero. I might have another test
that also parses the file and then verifies that it doesn't print anything
to stdout. These two tests would be identical except for the name,
documentation string, and final keyword. Though, maybe because of that your
rule wouldn't be triggered?
Testing for duplicate documentation and duplicate names might be the better
way to go. I know we have the problem that people will cut and pasted a
whole test case, modify the final verification, but forget to update the
documentation.
On Thu, Dec 11, 2014 at 4:45 PM, Guy Kisel [email protected] wrote:
I was thinking it would be nice to have a rule that warns about code
duplication, or about the potential to pull reused code out into a separate
keyword.I've made an initial attempt at it, but I was wondering if anyone else
thinks this seems like something worth doing, or if it would just raise too
many false positives to be useful.guykisel/robotframework-lint@7412f5c
guykisel@7412f5c—
Reply to this email directly or view it on GitHub
#16.
from robotframework-lint.
That's a good point. Looking for duplicate documentation seems reasonable, and it would be pretty easy to adapt my code to do that instead. All I'm really doing is using difflib
to compute a similarity ratio.
from robotframework-lint.
Related Issues (20)
- Comments included in testcase tags
- Comments included in keyword settings
- Multiple instances of RfLint will result in duplicate rules
- Add support for Tasks type (new in RF 3.1)
- Comment before continuation not handled well by statements()
- New rule TrailingWhitespace doesn't work with version 1.0 HOT 4
- rflint does not work with Robot Framework 3.2.0 HOT 13
- PyPi release for new fixes HOT 1
- ImportError: cannot import name 'FileReader' from 'robot.utils' HOT 2
- Incorrect duplicate Metadata error
- InvalidTable, Unknown table name 'Comments' HOT 2
- VSCode integration HOT 1
- Calling rflint with argumentfile succeeds but rflint is not actually run HOT 1
- Movie CircleCI builds to Github Actions HOT 7
- Does the folder "site-rules" only allow under the rflint folder?
- Tasks type itself isn't accepted suite HOT 1
- Unable to access the keywords and variables used within a testcase
- Could this tool check for errors likes "Multiple keywords with name XXX found" HOT 1
- xUnit output
- imp library no longer supported in python 3.12 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotframework-lint.