Repository navigation
Hardcode fixes for uwp - #3280
Jakub Jareš (nohwnd) wants to merge 1 commit into
Conversation
| if (discoveryCriteria.Sources.Except(actualTestSources).Any()) | ||
| { | ||
| discoveryCriteria.Package = discoveryCriteria.Sources.FirstOrDefault(); | ||
| discoveryCriteria.Package = @"C:\ProgramData\DeveloperTools\WinUI-Samples-UITestsVS.Debug_x64.jajares\UITests.build.appxrecipe"; // discoveryCriteria.Sources.FirstOrDefault(); |
There was a problem hiding this comment.
Here the provider provides the local path: "C:\\p\\WinUI-Samples\\x64\\Debug\\UITests\\UITests.build.appxrecipe"; and we send it to the other side in DiscoveryRequest. The recipe path is used to lookup UITests.exe and it cannot find it. So no tests are discovered. If we pass this path (the appxrecipe actuall does not exist on the remote) it allows UITest.exe path to be determined correctly. All tests are discovered but TestWindow can't understand them because they come from an unknown source.
| public static void UpdateDiscoveryCriteria(this DiscoveryCriteria discoveryCriteria, ITestRuntimeProvider testRuntimeProvider) | ||
| { | ||
| var actualTestSources = testRuntimeProvider.GetTestSources(discoveryCriteria.Sources); | ||
| var actualTestSources = new[] { @"UITests.exe" }; // testRuntimeProvider.GetTestSources(discoveryCriteria.Sources); |
There was a problem hiding this comment.
We get UITests.exe here from the real provider as well.
| adapterSourceMap.Add(Constants.UnspecifiedAdapterPath, sources); | ||
| } | ||
|
|
||
| private interface IRemoteSourceProvider |
There was a problem hiding this comment.
Ignore all this.
| } | ||
|
|
||
| this.baseTestDiscoveryEventsHandler = eventHandler; | ||
| if (this.testHostManager.GetType().Name.Contains("Uwp")) |
There was a problem hiding this comment.
Ignore all this, it just allows me to special case this for uwp, and change the responses.
| } | ||
|
|
||
| public void HandleDiscoveredTests(IEnumerable<TestCase> discoveredTestCases) | ||
| { |
There was a problem hiding this comment.
Here we get Source that is the actual remote path, and we need to translate it back to the appxrecipe we got originally. So TestWindow can match it back to the correct source.
| } | ||
| } | ||
|
|
||
| private class ReflectionBasedRemoteTestHostManagerAdapter : ITestRuntimeProvider |
There was a problem hiding this comment.
Ignore this class.
|
/azp run |
|
Pull request contains merge conflicts. |
|
Replaced by #3314 |
Description
Please add a meaningful description for this change.
Ensure the PR has required unit tests.
Related issue
Kindly link any related issues. E.g. Fixes #xyz.