Skip to content

can't find results with Xcode 11 #39

@bitcoder

Description

@bitcoder

Hi,
i'm running "fastlane test" in a simple example project and using the "trainer" plugin to generate JUnit XML report.
However, whenever I run fastlane it is not able of finding the results.

This is my "fastlane/Fastfile"

default_platform(:ios)

platform :ios do
  desc "Run tests"
  lane :test do
    scan(scheme: "UnitTest-Calculator",
       output_types: "",
       fail_build: false)

    trainer(output_directory: "build/reports/")
  end

end

This is the output obtained:

+----------------------------+-------------------------------------------------------------------------------------------+
|                                                      Lane Context                                                      |
+----------------------------+-------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM           | ios                                                                                       |
| PLATFORM_NAME              | ios                                                                                       |
| LANE_NAME                  | ios test                                                                                  |
| SCAN_DERIVED_DATA_PATH     | /Users/smsf/Library/Developer/Xcode/DerivedData/UnitTest-Calculator-fbcsrzqmxnbtunckthqv  |
|                            | azzqktol                                                                                  |
# This file contains the fastlane.tools configuration
| SCAN_GENERATED_PLIST_FILES | []                                                                                        |
| SCAN_GENERATED_PLIST_FILE  |                                                                                           |
+----------------------------+-------------------------------------------------------------------------------------------+
[12:10:06]: No test result files found in directory '.', make sure the file name ends with 'TestSummaries.plist' or '.xcresult'

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | scan             | 23          |
| 💥   | trainer          | 0           |
+------+------------------+-------------+

[12:10:06]: fastlane finished with errors

[!] No test result files found in directory '.', make sure the file name ends with 'TestSummaries.plist' or '.xcresult'

This is the content of the build directory, under the "DerivedData" default one:

$ ls /Users/smsf/Library/Developer/Xcode/DerivedData/UnitTest-Calculator-fbcsrzqmxnbtunckthqvazzqktol/Logs/Test/
LogStoreManifest.plist                                     Run-UnitTest-Calculator-2019.10.24_12-05-37-+0100.xcresult

The "Run-UnitTest-Calculator-2019.10.24_12-05-37-+0100.xcresult" is not a file but a directory instead.
It does not contain any TestSummaries.plist neither a .xcresult file.

Am I missing something basic in the configuration of fastlane or in the build itself to generate .xresult file? As it seems, XCode 11 is generating a .xcresult directory with many files.
From the trainer code, from my understanding it does not go into .xcresult directories under the DerivedData folder.. but anyway, I don't see a specific .xcresult there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions