Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tests can be written either in Java or Kotlin.

Requirements

  • gradle 5.6
  • android Android SDK (e.g. v28)
  • JDK
  • (optional) Android Studio

Description

For this tutorial, we'll use a basic Espresso example project provided by Google, with minor updates as tracked in this fork.

...

The code related to the previous activites activities can be found here.

The project contains 2 tests, implemented both in Java and in Kotlin (thus, overall 4 tests although 2 "duplicated"). 

...

After running the tests and generating the JUnit XML report(s) (e.g., result TEST-Pixel_XL_API_29(AVD) - 10-app-.xml), it can be imported to Xray (either by the REST API , or by using one of the CI plugins or through Import Execution Results action within the Test Execution).

...

A Test Execution will be created containing information about the executed scenarios.

Image RemovedImage Added


Each scenario is test is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the name of the specification class concatenated with the scenario method name of the corresponding automated test.

The Execution Details of the Generic Test contains information about the "Test Suite" (as per JUnit format), which in this case corresponds to the scenario name with a prefixfirst test full classpath.


Image RemovedImage Added


Notes

,.You can also import local unit tests. Note that you'll have a JUnit XML file per test class. You may use junit-merge utility in case you want to merge all these reports to a single JUnit XML report.

References

...