Giter VIP home page Giter VIP logo

robotframework-testrail-reporter's Introduction

robotframework-testrail-reporter

robotframework-testrail-reporter

robotframework-testrail-reporter is a Python library used to publish robotframework test executions to TestRail. It parses the output.xml file and search tests tagged with a specific testcase id, then it retrieves testcases run id from TestRailtest suite run id.

Installation

robotframework-testrail-reporter requires python3+, lxml, and testrail installed and to run. (and robotframework to execute tests)

$ pip3 install robotframework-testrail-reporter
$ rf-tr-reporter -f output.xml -t test-case-id -u https://xxx.testrail.io/ -e [email protected] -k pwd_or_apikey -r runid

Methods

Method Arguments README
find_tests_tagged_by path, tag This method parses the output xml generated by robotframework defined by path and finds all test nodes with starting tag tag.
Returns a list of dictionaries with following keys: ['rf_test_name', 'test_id , 'status_id, 'comment', 'elapsed'] rf_test_name is the robotframework test name
test_id is the numeric value contained in tag
status_id is the conversion of test status to testrail standards
comment is the test status message
elapsed is the test execution time in s, (min 1 second)
Args:
path is the path of robotframework xml output file
tag is the tag to be found in robotframework tests, it must contain a numeric part which specifies testcase run id, example: test_case_id=123
get_comment status This method returns the test execution status message which is the text attribute of test status node in output xml, if no text is found it retuns an empty string. Comment maximum length is defined by comment_size_limit variable.
Args:
status is the status node found via xpath selector with lxml
get_elapsed status This method calculates the elapsed test execution time which is endtime - starttime in test status node of output XML. Returns a string of test execution seconds. Example: '5s'
Args:
status is the status node found via xpath selector with lxml
publish_results api, run_id, results This method publishes robotframework results to a testrail run
Args:
api is an instance of testrail.client.API already logged in
run_id is the id of the run to update
results is a list of dictionaries that contains test results
replace_caseid_with_testid api, results, run_id This method parses all results generated by find_tests_tagged_by method and replace all testcases ids with specific testruns ids in test_id key of each result
Args:
api is an instance of testrail.client.API already logged in
results is a list of dictionaries that contains test results
run_id is the id of the run to update

robotframework-testrail-reporter's People

Contributors

vincenzo-gasparo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.