Skip to content

Example of how to use QuizTrain with Unit Tests and UI Tests on iOS

License

Notifications You must be signed in to change notification settings

isabella232/QuizTrainExample

 
 

Repository files navigation

Example

This is an example iOS project showing how you can integrate QuizTrain with your unit tests and user interface tests.

License

The Example project is open source software released under the MIT License. See the LICENSE file for details.

Prerequisites

Setup

Before building and running tests there are some placeholder values you must update in code marked with Swift #error macros. After updating them comment out the macros.

  • TestManager.swift
    • Update let objectAPI = QuizTrain.ObjectAPI(...) with valid credentials and other info for your TestRail instance.
    • Update QuizTrainProject.populatedProject(...) with a projectId from your TestRail instance.
  • ExampleTests.swift
    • Update all of the placeholder case IDs with real case IDs for your project.
  • ExampleUITests.swift
    • Update all of the placeholder case IDs with real case IDs for your project.

If you'd like you can create a temporary project on your TestRail instance and use that to test with. Select Use multiple test suites to manage cases when creating the project and then add 16 test cases.

Building and Testing

cd ../Example
carthage checkout --use-submodules
open Example.xcodeproj

Select the Example scheme and type Command-U to build Example and run unit tests and user interface tests. If everything goes well you should see a URL in the console to a closed test plan (one for unit tests, another for user interface tests) containing your results on TestRail. You should also see them appear as QuizTrain Test Results under Test Runs & Results in your project.

About

Example of how to use QuizTrain with Unit Tests and UI Tests on iOS

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%