Last active
May 24, 2016 06:29
-
-
Save vkosuri/f74a82c178198f33add86a0d1287907e to your computer and use it in GitHub Desktop.
Running Robotframework from within python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Documentation This example evaluate a JSON data | |
*** Test Cases *** | |
EvalDict | |
${post_dict}= Evaluate {u'name': 'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu', u'enabled': True} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
''' | |
$ pabot --loglevel TRACE --splitlog --log log.html --report report.html --debugfile robot_log.log eval_dict.robot | |
Which equvalent is | |
$python robot_run.py | |
============================================================================== | |
Eval Dict :: This example evaluate a JSON data | |
============================================================================== | |
EvalDict | PASS | | |
------------------------------------------------------------------------------ | |
Eval Dict :: This example evaluate a JSON data | PASS | | |
1 critical test, 1 passed, 0 failed | |
1 test total, 1 passed, 0 failed | |
============================================================================== | |
Debug: /home/vkosuri/documents/robot_log.log | |
Output: /home/vkosuri/documents/output.xml | |
Log: /home/vkosuri/documents/log.html | |
Report: /home/vkosuri/documents/report.html | |
''' | |
from robot import run | |
run( | |
'eval_dict.robot', | |
splitlog=True, | |
log='log.html', | |
report='report.html', | |
loglevel='TRACE', | |
debugfile='robot_log.log' | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment