I have Automation Repository coded in Python. Now i want to use some of the RobotFramework features like, html for logs and output, xml creation. Will it be possible to use somehow the Robot features in my existing testcases written in Python Unittest library without re-writing these. Please let me know, if its the wrong way to approach this
-
Can you provide us a bit more example of what it is you have today and what is missing? Right now I don't have a good understanding of the current setup.A. Kootstra– A. Kootstra2017-03-22 08:32:08 +00:00Commented Mar 22, 2017 at 8:32
-
I have around 200 testcases written in Python using uinttest framework, with Libraries and job files all in Python. I have modules for generating the xml files and log file for my testcases. But it makes the test files very complex to read, so i wanted to port my testcases to RobotFramework which automatically generates the xml and html. So, i wanted to ask is there any way i can use only the Result Formation of Robot Framework in my existing testcasesrjha– rjha2017-03-22 09:10:37 +00:00Commented Mar 22, 2017 at 9:10
-
I do not think that this should be the expectation from Robot Framework. The following stackoverlflow discussion contains sufficient information to answer this.A. Kootstra– A. Kootstra2017-03-22 15:35:45 +00:00Commented Mar 22, 2017 at 15:35
1 Answer
Yes @rjha, You can use your testcases written in python. Generally in robot framework we will import the libraries which are written in Python. Using the same concept we can use your testcases which are written in Python.
Here I'm using RED Editor in Eclipse, according to my experience to use modules which are created should be imported to your red.xml file and each method name would be your keyword and when you completed running execution from testsuite file, log.html and report.html will be generated which you want for results generation.
For Better testcase execution results import "Logging" module where you can use log.info, log.warn etc., in your testcases which will be displayed in generated html reports