Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

Run dynamic tests

App Automate supports running dynamic (runtime generated) tests if you are using any third-party libraries, for example, XCTest+Gherkin, Cucumberish, etc.

If your XCUI tests are written in a BDD feature file format, they might include certain dynamic tests. Dynamic tests use test data that is discovered during runtime.

Set the capability

Set the dynamicTests parameter to true and specify the fully-qualified test names in the only-testing parameter when running an XCUI test.

Ensure that you use the only-testing parameter when using the dynamicTests parameter in the cURL command, without which the cURL command fails to run.

The following sample cURL command shows the parameters used to run dynamic tests on iPhone 8 Plus with iOS 11.0:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"only-testing": ["testsBundleName/className1/testName1", "className2/testName2"], "dynamicTests": "true", "devices": ["iPhone 8 Plus-11.0"], "app": "<app_id>", "testSuite": "<test_suite_id>"}' \
-H "Content-Type: application/json"

The following table lists the parameters used in a cURL request for running dynamic tests:

Parameter Description Values
only-testing Run specific tests in the build. Specify the fully qualified test names to be executed in the build. Test classes can be static or dynamic.

For example, ["SampleXCUITests/SampleXCUITestsClass/testAlertTest"]
dynamicTests Run dynamic tests in any BDD framework.

Note: This parameter works only when the only-testing parameter is used in a cURL command.
true, false

Default: false
devices Name and OS version of the device to run the test on For example, iPhone 8 Plus-11.0.
Check out the list of devices available in App Automate.
app ID of the application you receive when you upload your application on App Automate. For example, bs://3205774d1560ee3f5acdf
testSuite ID of the test suite you receive when you upload your test suite on App Automate. For example, bs://4205214d1560we3f5acdfe

If you have any queries, contact support.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle