Skip to content

Instantly share code, notes, and snippets.

@vkosuri
Last active May 24, 2016 06:29
Show Gist options
  • Save vkosuri/f74a82c178198f33add86a0d1287907e to your computer and use it in GitHub Desktop.
Save vkosuri/f74a82c178198f33add86a0d1287907e to your computer and use it in GitHub Desktop.
Running Robotframework from within python
*** Settings ***
Documentation This example evaluate a JSON data
*** Test Cases ***
EvalDict
${post_dict}= Evaluate {u'name': 'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu', u'enabled': True}
#!/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