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.
-
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.
Parameters: |
- result_file – A path to a Marionette generated test file.
- sw – Software label.
- cdf – CDF name.
- team – Team name.
- framework – Framework name.
- name – Name of run.
- start – Start time.
- end – End time.
- iterations – Number of iterations.
- user – User name.
- origin – Link to where this run originates from.
- info – Additional info.
- comment – Comment.
- hw – Hardware name.
- imei – IMEI number.
- pp – Product package name.
- git_url – Git url.
- git_sha1 – SHA1 of commit that this run has been executed on.
- app_rev – Decoupled app revision/version.
- 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.
Parameters: |
- pkg – Product package.
- name – Name of the test case.
- result – Result of the test case: ‘error’, ‘failure’ or ‘passed’
- time – Start time.
- info – Additional info.
- log_link – Link to the log.
- comment – Comment.
|
-
get_name()
Returns the name of the case.
Returns: | Name of case as string. |
-
get_result()
Returns the result of the case.
Returns: | One of: ‘error’, ‘failure’ or ‘passed’ |
-
get_tag(origin):
Returns the test case as an xml formatted string.
Parameters: | 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.
Parameters: |
- hw – Hardware name.
- imei – IMEI number.
- pp – Product package name.
- name – Test suite name.
- start – Start time.
- end – End time.
- iterations – Number of iterations.
- log_link – Link to the log.
- info – Additional info.
- comment – Comment.
- git_url – Git url.
- git_sha1 – SHA1 of commit that this run has been executed on.
- app_rev – Decoupled app revision/version.
|
-
add_case(case)
Adds a test case to the suite.
Parameters: | case – Case to add. |
-
get_result()
Returns the result of the suite.
Returns: | One of: ‘error’, ‘failed’ or ‘passed’. |
-
get_case_results()
Returns the number of cases in suite.
-
get_passed()
Returns the total of passed cases in suite.
Returns: | Total passed cases. |
-
get_tag(origin)
Returns the suite as an xml formatted string.
Parameters: | 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.
Parameters: |
- sw – Software label.
- cdf – CDF name.
- team – Team name.
- framework – Framework name.
- name – Name of run.
- start – Start time.
- end – End time.
- iterations – Number of iterations.
- user – User name.
- origin – Link to where this run originates from.
- info – Additional info.
- comment – Comment.
- git_url – Git url.
- git_sha1 – SHA1 of commit that this run has been executed on.
- app_rev – Decoupled app revision/version.
|
-
add_suite(suite)
Adds a test suite to the run.
Parameters: | suite – Suite to add. |
-
get_results()
Returns the number of the total cases defined in run.
-
get_result()
Returns the number of passed cases in run.
-
get_tag()
Returns the run as an xml formatted string.
Returns: | Run as xml formatted string. |