- Add package as dependecy to your project
- Create swift class that extends
NSObject
. Example:
import Foundation
import ZebrunnerAgent
public class ObservationConfiguration: NSObject {
public override init() {
ZebrunnerObserver.setUp(baseUrl: "{https://someproj.zebrunner.com}",
projectKey: "XCTestIOS",
refreshToken: "{refreshToken}")
}
}
baseUrl
- URL of your Zebrunner workspace
projectKey
- The possible values can be found in Zebrunner on Projects tab
refreshToken
- Generate it on Account and Profile page on Zebrunner
- In
Info.plist
or Xcode settings of Test Target (Info tab) add Principal class with value{YourTarget}.{YourPrincipalClass}
whereYourTarget
- project target where observation set up class createdYourPrincipalClass
- class name of observation configuration class
Artifact
- you can use static methods from this class to add artifacts and references to test cases and test runsLabel
- you can use static methods from this class to add Labels to test cases and test runsScreenshot
- use when you need attach screenshot to test case
You can assign test maintainer for your test case you'll need to set maintainer's zebrunner username value to testMaintainer
variable in test case:
func testSmth() {
testMaintainer = "dprymudrau"
let app = XCUIApplication()
app.launch()
...
}