I have simply create a testing, I created a test case named “TC Module [2]” and run editor throw “unexpected error: [ ERROR ] Suite ‘suite_name’ contains no tests matching name,…”
Then I removed brackets in test case name to “TC Module 2” and it’s worked.
Can someone explain why I can’t named test case with brackets? Is there a rule to create test case name?
Hello,
Certain characters are used as simple or glob pattern when executing tests through robot command, such as square bracket. See here in simple pattern section :
https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-432
So it will search for pattern according to the info inside brackets, and will not find anything (searched for ‘TC Module 2’ I guess.
Also the note at the bottom here gives hints on the test cases naming :
https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-267
Remember also that using OS reseverd characters/not usable for paths for example is not a good idea too.
Regards
Charlie
What @CharlieScene said is correct, but in this case the error happened due to the way RIDE prepares an argument file with the tests selection. When we say to execute a specific test case (by checking its checkbox), the options --suite
and --test
are used. If we don’t select any test, it will run just with the test suite filename or directory.
See below a screen capture, where we can see that a test named TC Module [2]
was successfully ran when using a wild card in the test specific name or using suites or directories:
By the way ;), @honggam124 , you know that Robot Framework accepts localized robot files? And that RIDE is on it’s way to have the interface also in supported languages?
Here is your example test suite:
Language: Vietnamese
*** Các kịch bản kiểm thử ***
TC Module [2]
No Operation