This means, Xcode runs the full test plan once for each configuration and run destination, resulting in a whole matrix filled with results. For my app, I've also been working on supporting a few more languages, and I've made test plan configurations for each language. And each method will exit with a test result status, either passed, failed, skipped, or expected failure. The test plan runs on each device once with a configuration enabled. And on top of that, let's say I'm running this test plan on three run destinations. So to make sure my app is working as expected, I've created configurations for the languages I want to support, the first being English. Lately, I've been working on supporting many languages in my app. Let's say, we are using the same test plan as I spelled out before. So now that we've covered the basics, let's see how tests, configurations, and run destinations work together. With Xcode Cloud and xcodebuild command, your tests can have multiple run destinations. When running tests in Xcode's IDE, you can select a single run destination. Run destinations are the devices where your tests run. Alongside configurations, there are run destinations. This ensures all elements of your app are reliably working, regardless if it's the first or hundredth time a user has used it. You can even set up your tests to run many times. You can test with code coverage, so you can keep track of the quality and coverage of your code as you continue to develop. For example, you can test your app in varying Languages and Locations, so you can be sure your app works in every part of the world. Configurations tell Xcode how to set up the runtime environment for your tests. Configurations are an important aspect of test plans. And with Test plans, you can set up configurations to efficiently run your tests under several conditions. Test plans contain one or more test bundles, which means a test plan can contain both Unit and UI tests. And at the highest level, there are test plans. For our purposes, let's say, our test bundle contains UI tests. These tests make sure your app truly does what you expect it to. UI tests observe the user-facing behavior of your app. Unit tests are short, simple, and run very quickly. Unit tests help verify a single piece of code, generally a function. Each bundle houses a single type of test, either Unit or UI. Test bundles are composed of one or more test classes. Test classes are groups of test methods and are usually grouped based on the area that's being tested. Test methods are the individual tests or methods which validate your source code and produce test results. After I run through the basics, we will take a look at the test report and explore how it can help you. It's useful to understand the organizing concepts behind the structure of your tests. Before we start exploring the new test report, I'd like to take a step back and define some key terms and concepts related to testing in Xcode. The test report organizes your test results in a way that helps you understand the health of your project, identify problem areas, and ultimately fix failures faster. test runs range from a single test you're running while working on a piece of code to an entire suite with thousands of tests running in CI. The test report is where you go to view results for test runs that happen locally, in Xcode Cloud, or on another machine. And I am thrilled to give you a tour of the new Test Report in Xcode 15. ♪ ♪ Sonu: Hi, my name is Sonu, and I am a human interface designer working on Xcode.
0 Comments
Leave a Reply. |