Skip to content

reportportal/agent-swift-XCTest

Repository files navigation

XCTest Agent for ReportPortal

CocoaPods Platform Validate Join Slack chat! stackoverflow Build with Love License

Installation

ReportPortalAgent is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ReportPortal'

and install it:

cd <project>
pod install

Report Portal properties

The properties for Report Portal configuration should be set in the Info.plist file of your Test Target. If you Test Target does't have an Info.plist, follow these steps to add:

  1. In your Test Target Folder, create a Property List named Info.plist.
  2. In Test Target Settings, configure 'Info.plist File' with the path TestTargetFolderName/Info.plist.

Now, you can specify the Report Portal properties:

  • ReportPortalURL - URL to API of report portal (exaple https://report-portal.company.com/api/v1).
  • ReportPortalToken - token for authentication which you can get from RP account settings.
  • ReportPortalLaunchName - name of launch.
  • Principal class - use ReportPortalAgent.RPListener from ReportPortalAgent lib. Also you can specify your own Observer which should conform to XCTestObservation protocol.
  • PushTestDataToReportPortal - can be used to switch off/on reporting
  • ReportPortalProjectName - project name from Report Portal
  • ReportPortalTags(optional) - can be used to specify tags, separated by comma.
  • IsFinalTestBundle - use to mark last test target as YES, and all others as NO to allow single launch for them

Example: Alt text

Important Notes

Please be aware that this Report Portal agent is designed to work correctly only when tests are run sequentially. Parallel execution of tests is currently not supported.

Authors

ReportPortal Team, support@reportportal.io

@DarthRumata, stas.kirichok@windmill.ch (Windmill Smart Solutions)

@SergeVKom, sergvkom@gmail.com (original library)

License

Licensed under the Apache 2.0 license (see the LICENSE file).