dotnet/maui · error · Exception
UI Test application path not specified.
Error message
UI Test application path not specified.
What it means
Thrown by the Catalyst (macOS) UI test setup when GetTestApplications returns no app bundle for the given app/device/config/tfm/rid inputs. The test app (.app bundle for Catalyst/HostApp) could not be located, so the UI test launcher cannot proceed.
Source
Thrown at eng/devices/catalyst.cake:123
$"--set-env=\"TestFilter={category}\" ")
};
});
}
void ExecuteUITests(string project, string app, string device, string resultsDir, string binDir, string config, string tfm, string rid, string toolPath)
{
// Setup environment for UI tests
Information("Starting UI Tests...");
var testApp = GetTestApplications(app, device, config, tfm, rid).FirstOrDefault();
Information($"Testing Device: {device}");
Information($"Testing App Project: {app}");
Information($"Testing App: {testApp}");
Information($"Results Directory: {resultsDir}");
if (string.IsNullOrEmpty(testApp))
{
throw new Exception("UI Test application path not specified.");
}
// Launch the app so it can be found by the test runner
StartProcess("chmod", $"+x {testApp}/Contents/MacOS/Controls.TestCases.HostApp");
var p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = true;
p.StartInfo.FileName = "open";
p.StartInfo.Arguments = testApp;
p.Start();
Information("Build UITests project {0}", project);
var name = System.IO.Path.GetFileNameWithoutExtension(project);
var binlog = $"{binDir}/{name}-{config}-mac.binlog";
var resultsFileName = SanitizeTestResultsFilename($"{name}-{config}-catalyst-{testFilter}");
var appiumLog = $"{binDir}/appium_mac_{resultsFileName}.log";
View on GitHub (pinned to f377ff1c5e)
Solutions
- Build Controls.TestCases.HostApp for the maccatalyst runtime identifier with the same configuration and TFM first.
- Pass the correct --app / ANDROID-style app path or ensure rid matches (e.g. maccatalyst-x64).
- Verify config, tfm, and rid align between the build and the test invocation.
Defensive patterns
Strategy: validation
Validate before calling
var apps = GetTestApplications(app, device, config, tfm, rid);
if (!apps.Any())
throw new Exception($"No Catalyst test app found for app='{app}', config='{config}', tfm='{tfm}', rid='{rid}'. Build HostApp for maccatalyst first.");
var testApp = apps.First(); Prevention
- Build Controls.TestCases.HostApp for the maccatalyst rid before the UI test step.
- Pass an explicit app path to avoid discovery ambiguity.
- Keep config/tfm/rid identical between build and test steps.
When it happens
Trigger: GetTestApplications(app, device, config, tfm, rid).FirstOrDefault() returns null/empty — no built Catalyst app bundle matches the supplied inputs.
Common situations: The HostApp was not built for the Catalyst runtime identifier before the test step; rid/config/tfm mismatch; the app path argument points at a stale or wrong directory; building for iossimulator instead of maccatalyst.
Related errors
- UI Test application path not specified.
- No application was found in the specified directories.
- Error: Building dotnet-samples with NativeAOT is only suppor
- Some tests failed. Check the logs or test results.
- No test assembly found.
AI-assisted analysis of dotnet/maui@f377ff1c5e (2026-08-13).
Data as JSON: /api/errors/71604caee57f49c3.
Report an issue: GitHub.