testing: introduce RobotFramework tests#10095
Conversation
e48c1fb to
9129271
Compare
f4b4e30 to
3421c9d
Compare
|
Can you somehow add a tag into the output xml that contains the board, test, and commit hash? |
|
in theory you "know" all this because you invoke it like |
|
@MrKevinWeiss I removed the |
More useful in the xml output. If it is possible that it just makes everything easier and more modular. Lets say we feed the output.xml to a data agitator, then we don't need anything special to pass or parse, just the xml. |
|
@MrKevinWeiss please try again I added the output you wanted |
|
its now part of the suite setup |
e10c53b to
675ad08
Compare
Perfect, should be very easy to integrate! |
There was a problem hiding this comment.
As said several times before, I do not like the format of the .robot tests descriptions. I do not find them really clear and prefer the python tests. They could also be improved and refactored without changing the whole format.
However I like the direction of producing test results files (xunit) instead of only 0 and 1 output but it is not specific to robotframework.
It is personal opinion and I put a request changes so other maintainers/devs are asked for feedback on the format. If it is only me, it is my problem and will kick me in the butt to use it.
I also have other issues with the current integration and behavior but I do not want to nitpick on it before talking about the format.
|
@cladmi are you just saying that you don't like the robot way of describing tests, i.e., the framework? Or do you propose to express tests differently/more clearly in the robot keywords? |
|
@cladmi I understand your concern. On the other hand, we are comparing apples with oranges: In the specific example, the python test is a very static, fixed example, while the robot test works dynamically for changing configurations. |
Did you try modeling our release specs with the robot framework? I'm curious how compilation/flashing/handling of multiple nodes would look like. I remember finding it not trivial to implement a generic way to e.g., ping the link-local address of the 802154 interface of node A from node B without knowing it beforehand, or testing node A with examples/gnrc_networking compiled with "GNRC_SETTING_FOO=whiskybar", node B with "GNRC_SETTING_FOO=milkybar". |
fc395d3 to
45f1a91
Compare
This introduces a new environment variable for a common directory that holds all output of the build process, such as application or package binaries. This would also allow to easily redirect output to any other location, e.g. for out-of-source builds.
|
Now that the issue #10241 is out, the discussion about the general beauty and usefulness of Robot FW as well as its customization should go there. |
|
The current build system just executes every executable in the tests/ folder. |
284e8fc to
2b31819
Compare
TL;DRno it is not possible to make the robot scripts executable. Longer answer1.) making the robot test scripts executable will not work, as it is necessary to run them either with 2.) the extra make target is not required and the tests could be integrated into the current |
Contrary to what you probably wanted to say this sounds to me that you can make them executable, as they are just scripts to the robot binary / robot module. Have you tried setting a she-bang in line one and setting the |
|
@cladmi Any update on the blocking comment? It seems some progress has been made on the RFC. |
This introduces a new way to write RIOT tests using the RobotFramework, starting by adding new make targets for easy usage.
This adds a couple of tests already ported to RobotFramework.
Add simple wrapper to run static-tests using RobotFramework, this adds some nice HTML-output for free.
MrKevinWeiss
left a comment
There was a problem hiding this comment.
I couldn't find too much. A few recommendations on the keyword names but I think generally they are fine.
| ${count} = Get Number of Lines Matching Pattern ${pattern} | ||
| Should Be Equal As Integers ${count} ${number} | ||
|
|
||
| Verify Lines Matching Pattern Greater |
There was a problem hiding this comment.
Keyword recommendations (though it is pretty long):
Number of Lines Matching Pattern Should Equal
Number of Lines Matching Pattern Should Be Greater
Number of Lines Matching Pattern Should Be Less
There was a problem hiding this comment.
As stated elsewhere (can't find it right now): I would prefer if don't re-implementing pexpect in RobotFramework keywords. As far as I understand it should be possible to have a thin wrapper around pexpect with RobotFramework. This would give us a far more stable and future proof implementation.
I explained my point there instead: #10241 (comment)
|
superseded by #10843 |
Contribution description
This introduces the RobotFramework for writing and running RIOT test, it ships with some adapted tests. Integration into the build system is provided by a new
maketarget:robot-test. Also adaptedthe static tests, just call
make robot-static-test.Testing procedure
Simply build and execute a robot test, e.g. by calling:
tested on various boards such as
arduino-mega2560,pba-d-01-kw2x,samr21-xproandnative.Issues/PRs references
currently depends on #10038 (maybe adapted, see discussion there)