dotnet / xharness

C# command line tool for running tests on Android / iOS / tvOS devices and simulators
MIT License
155 stars 49 forks source link

[mobile] [infra] Unify reporting of mobile CI testing into a single console log file #1188

Open matouskozak opened 6 months ago

matouskozak commented 6 months ago

Description

Tests run on mobile platforms, don't report all outputs into the console log. This behavior renders using Build Analysis un-reliable for these scenarios because console log doesn't contain all information about the completed test. The full test output can be found inside the device logs.

E.g., console log might contain message "ERROR: WORKLOAD TIMED OUT - Killing user command" but the device log can show more specific errors for the given test.

Possible solutions

  1. Detect error messages from the device log and copy them to the console log
    • Pro: doesn't cause significant increase in console log size
    • Cons: might be difficult to detect all error messages correctly
  2. Include both console and device logs in Build Analysis
    • Pro: reliability, contains all error messages from both console and device log
    • Cons: can significantly increase the strain on Build Analysis (some device log are over 300 MB in size)

TODO:

  1. Collect past log files from mobile devices runs to determine which log files are used for reporting actual test failures.
  2. From the collected log files, determine pattern that can reliably match error messages. Discuss trade-off between false positives and false negatives, i.e., is it worse if a failure is un-matched or if non-error message gets included.
  3. Use the matching pattern from 2. to copy error messages in to the main console log.
dotnet-policy-service[bot] commented 6 months ago

Tagging subscribers to this area: @directhex See info in area-owners.md if you want to be subscribed.