Questions tagged [xctestplan]

12 questions
14
votes
4 answers

XCode Unit Tests - Cannot find viewcontroller in scope

At some point in my app's development, my Unit Tests and UI Tests lost access to my app's main module: Cannot find type 'FileVacuumViewController' in scope They worked with the xctestplan before. I don't know at what point it happened. I tried…
Mikeumus
  • 3,570
  • 9
  • 40
  • 65
5
votes
1 answer

Xcode 11 test plans don't seem to localize the simulator status bar

I use Xcode 11 test plans new feature to generate my localized screenshots for the app store. As explained during the WWDC19 you can use test plan configurations to play your UI tests generating screenshots in several languages. Unfortunately it…
Zaphod
  • 6,758
  • 3
  • 40
  • 60
4
votes
1 answer

Xcode 11 Export for Localization not working, Include Screenshots feature disabled, and can not find XCUITest screenshot attachments in the test logs

I'm having trouble exporting screenshots using the 'export for localization' feature on Xcode 11. I'm currently working on creating XCUITest suites where I test a certain UI feature of an app, and I want to take screenshots of every page of the app…
kask
  • 43
  • 2
3
votes
0 answers

How can it be known to a build script which .xctestplan will be used at build time?

In Xcode 12, how can it be known at build time which .xctestplan will be used? I have a build script that needs to take a certain action depending on which xctestplan is currently selected in Xcode when the user presses command-U (to start…
CommaToast
  • 11,370
  • 7
  • 54
  • 69
3
votes
0 answers

Xcode 12.3: .xcappdata specified by Test Plans not loading into simulator

I set up a new test target for my app useing Xcode Test Plans to specify an .xcappdata file to use for each target. We run the tests in iPad & iOS Simulators, which get recreated from scratch prior to each test run. However, Xcode never actually…
scaly
  • 509
  • 8
  • 18
2
votes
2 answers

xcodebuild: Tests cannot be run because the test plan “Scheme” could not be read

After converting our tests in one of our schemes "Scheme" to test plans using the "Convert to use Test Plans" function in Xcode 13.4. We cannot run the tests using xcodebuild due to the following error: xcodebuild: error: Failed to build project…
förschter
  • 740
  • 1
  • 7
  • 24
2
votes
1 answer

XCode TestPlan: specify which configuration to use from command line

I have a few configurations in my XCode project's test plan, by default, executing UI tests will execute all configurations, but for some requirement I need to exclude one or two based on certain conditions on CI, I found that I can specify what…
Heuristic
  • 5,087
  • 9
  • 54
  • 94
2
votes
1 answer

Xcode shared Test Plan across schemes causes each target to build

I have a simple Test Plan (with a single configuration) in my Xcode project which I am switching over to because I have multiple schemes for different app targets in my project but the tests are shared (as in they are not specifically limited to one…
shim
  • 9,289
  • 12
  • 69
  • 108
1
vote
2 answers

Xcode 11 XCTestPlan can't export screenshots

In Xcode 11, I created a xctestplan for exporting localized screenshots, but I can't select "Include screenshots" option. Like this image, the warning message is "Screenshot for localization issue." If I check the report of the UI test, then I can…
William Hu
  • 15,423
  • 11
  • 100
  • 121
0
votes
1 answer

How do you reference testPlans using xcodegen?

I'm not managing to reference the testPlans created manually in the xcworkspace file after running xcodegen. It always says: "The flag -testPlan cannot be used since the scheme does not use test plans." The documentation on GitHub doesn't help…
Bruno Cunha
  • 1,680
  • 1
  • 17
  • 15
0
votes
0 answers

Should test configurations show up twice on test results when running on a xcode server bot?

so I've set up an Xcode server for my integration tests. I am using test plans and have set up my bot to run a specific plan. So this works as expected, fine. However, the plan has only one configuration, yet when I run the integration on my bot the…
fmortens
  • 73
  • 1
  • 9
0
votes
1 answer

XCTest sending information from the app (under test) back to XCTests

Situation: Consider an ios/swift/app that is being tested using xcode/XCTests. The app also includes some logging to console (and to Google/Firebase/Crashlytics as nonfatal exceptions: works great!). For this a custom written logging class is being…
HixField
  • 3,538
  • 1
  • 28
  • 54