![]() I simply like it the most as it is very easy to read and understand once you have been getting used to the thing with the “additional whitespaces” mentioned above. The format used throughout this blog post (and blog series) is the Plain Text Format. The Robot Framework is supporting different formats for writing Test Case Files. ![]() Furthermore I am planning to enhance that site with more examples in the future. This way they are hopefully easier to access than through this blog post and there are more examples than shown in this blog post. We will still have a closer look on the Report- and Log-File at the end of this blog post.Īll examples shown in this blog post can be found from GitHub here. Just take a look at the Report-File by opening it in a Browser. Here we are using “–outputdir” to define the place where the resulting Log- and Report-Files are stored. There are lots of command line options possible. Java -jar /usr/local/opt/robotframework/robotframework-2.9.2.jar -outputdir. The test can be executed with pybot or Java – depending on the type of your installation – directly from the directory where the Test Case File is stored. Both should be visible from the example, but it is still easy to miss these things. Furthermore there must be always an indention of two spaces in the beginning of each line below a testcase. There must be at least two spaces to separate arguments from Keywords and arguments from each other. Easy as that, but still there are a few stumbling blocks. That one is executing one Keyword “Log” and we are passing one parameter to this Keyword, namely the String “Test Logging”. We defined one testcase below the Test Cases section. I could have omitted that section of course, but somehow for me it belongs to a Test Case File even if it is empty. The Settings section is empty because we are not importing any external Test Libraries. (Yes, actually it is not even testing anything, but that is nitpicking.) Let’s jump into the cold water right away with the smallest possible example I can think of for a Test written with the Robot Framework. Writing new Keywords this way is needed if you have to test specific technologies that are not yet covered by the existing Test Libraries. One could also use other programming languages, but for me as a Java developer this is a quite natural choice. ![]() The next blog post in this series will then deal with writing new Keywords in Java (just in case you are waiting for that one). For a lot of use cases this approach is already sufficient due to the huge amount of existing Test Libraries and thus Keywords. This blog post will entirely deal with available Keywords and how to write new Keywords out of existing ones directly using Robot Framework features. So here we go digging into the central testing concept of the Robot Framework and that is: Keywords. But then again I think that a blog post can be more specific in digging into one aspect of a tool than the documentation can. Sometimes this makes me think that additional tutorials are almost not needed. The Robot Framework really comes with a very comprehensive User Guide. Part 1: Installation Part 2: Keywords Part 3: Implementing Keywords in Java Part 4: Selenium2Library as a drop-in replacement for SeleniumLibrary Part 5: Integration with TeamCity CI-Server Part 6: Integration with Jenkins Part 7: File Processing Part 8: Working with Collections Part 9: Wrap-Up and Conclusion
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |