.. default-domain:: py Workspaces ========== ave.report.decibel_marionette_parser ++++++++++++++++++++++++++++++++++++ This scope declares one function, parse. The function is used for parsing/converting a test result generated via the firefox handset function run_marionette_test. The end result is a report of the test result in a format that is readable by Decibel. .. function:: parse(result_path, sw, cdf, team, framework, name, start, end, \ iterations, user, origin, info, comment, hw, imei, pp, git_url, \ git_sha1, app_rev, all_tests) This function parses a test result file generated by Marionette and then converts it to an xml format readable by Decibel. :arg result_file: A path to a Marionette generated test file. :arg sw: Software label. :arg cdf: CDF name. :arg team: Team name. :arg framework: Framework name. :arg name: Name of run. :arg start: Start time. :arg end: End time. :arg iterations: Number of iterations. :arg user: User name. :arg origin: Link to where this run originates from. :arg info: Additional info. :arg comment: Comment. :arg hw: Hardware name. :arg imei: IMEI number. :arg pp: Product package name. :arg git_url: Git url. :arg git_sha1: SHA1 of commit that this run has been executed on. :arg app_rev: Decoupled app revision/version. :arg all_tests: If true passed test cases should be included. ave.report.decibel_marionette_xml_gen +++++++++++++++++++++++++++++++++++++ This scope declares 3 classes: Case, Suite and Run. These classes are utilized by the function ave.report.decibel_marionette_parser.parse. These classes are used as place holders for different parts of a Decibel report when a Mariontte test is parsed and converted to a Decibel report. .. class:: ave.report.decibel_marionette_xml_gen.Case(pkg, name, result, \ time, info, log_link, comment) This class represents a single test case in a test run. :arg pkg: Product package. :arg name: Name of the test case. :arg result: Result of the test case: 'error', 'failure' or 'passed' :arg time: Start time. :arg info: Additional info. :arg log_link: Link to the log. :arg comment: Comment. .. method:: get_name() Returns the name of the case. :returns: Name of case as string. .. method:: get_result() Returns the result of the case. :returns: One of: 'error', 'failure' or 'passed' .. method:: get_tag(origin): Returns the test case as an xml formatted string. :arg origin: Link to where this case originates from. :returns: Case as xml formatted string. .. class:: ave.report.decibel_marionette_xml_gen.Suite(hw, imei, pp, name, \ start, end, iterations, log_link, info, comment, git_url, git_sha1, \ app_rev) This class represents a single suite of test cases. :arg hw: Hardware name. :arg imei: IMEI number. :arg pp: Product package name. :arg name: Test suite name. :arg start: Start time. :arg end: End time. :arg iterations: Number of iterations. :arg log_link: Link to the log. :arg info: Additional info. :arg comment: Comment. :arg git_url: Git url. :arg git_sha1: SHA1 of commit that this run has been executed on. :arg app_rev: Decoupled app revision/version. .. method:: add_case(case) Adds a test case to the suite. :arg case: Case to add. .. method:: get_result() Returns the result of the suite. :returns: One of: 'error', 'failed' or 'passed'. .. method:: get_case_results() Returns the number of cases in suite. :returns: Number of cases. .. method:: get_passed() Returns the total of passed cases in suite. :returns: Total passed cases. .. method:: get_tag(origin) Returns the suite as an xml formatted string. :arg origin: Link to where this suite originates from. :returns: Suit as xml formatted string. .. class:: ave.report.decibel_marionette_xml_gen.Run(sw, cdf, team, framework, \ name, start, end, iterations, user, origin, info, comment, git_url, \ git_sha1, app_rev) This class represents a test run. It contains one or more test suites. :arg sw: Software label. :arg cdf: CDF name. :arg team: Team name. :arg framework: Framework name. :arg name: Name of run. :arg start: Start time. :arg end: End time. :arg iterations: Number of iterations. :arg user: User name. :arg origin: Link to where this run originates from. :arg info: Additional info. :arg comment: Comment. :arg git_url: Git url. :arg git_sha1: SHA1 of commit that this run has been executed on. :arg app_rev: Decoupled app revision/version. .. method:: add_suite(suite) Adds a test suite to the run. :arg suite: Suite to add. .. method:: get_results() Returns the number of the total cases defined in run. :result: Number of cases. .. method:: get_result() Returns the number of passed cases in run. .. method:: get_tag() Returns the run as an xml formatted string. :returns: Run as xml formatted string.