Changes

Jump to: navigation, search

Community:SummerOfCode14:Brainstorming

20 bytes added, 19:29, 10 February 2014
Automation & Tools
|-
| Add structured logging to mochitest
| Traditionally at Mozilla, test harnesses have written test results as arbitrary strings to stdout. Other tools that want to gather data about test runs are forced to parse the entire logfile produced by capturing stdout, and using a set of regex's regexes on each line in order to identify test results, test summaries, and other items of interest.
We'd like to replace this very inefficient approach to test logging with a more robust mechanism: "structured logging". In this approach, a test harness writes a file containing data in JSON format for each test event that needs to be logged, as well as producing human-readable data on stdout. Other tools can then easily parse the JSON data when they want to know what happened during the test run.
We'd like to replace this very inefficient approach to test logging with a more robust mechanism...have developed the structured logging. In this approachformat, and started using a test harness would write to Python implementation for a file structured data in JSON for each test event that needed to be logged, in addition to the current approach small subset of spewing everything to stdout. Other tools can then easily iterate over this structure when they want to know what happened during the test run. We've already implemented this approach for our xpcshell harnesstests. Now, we want to apply this would like to use it with our Mochitest harness. The harness should utilize structured logging , which is used for running many regression tests for both test events generated in the JavaScript Gecko browser engine. This harness that's has external Python components and Javascript components running in-the browser, and also the Python test runner. The harness should accept structured logging data from both sources and of which need to write them structured log messages to the same file in (approximately) chronological order. Mochitests running When run in continuous integration should upload their , the structured log files file must be uploaded at the end of the test run as a test artifact.
| JavaScript, Python
| Jonathan Griffin
Confirm
79
edits

Navigation menu