Merge pull request #1498 from jlewin/1.6.0
Explicitly set working directory for automation tests
This commit is contained in:
commit
2eb2bc7c8c
1 changed files with 13 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(.2);
|
||||
testRunner.Type(make);
|
||||
|
||||
testRunner.ClickByName(manufacturer, 2);
|
||||
testRunner.Type("{Enter}");
|
||||
|
||||
testRunner.ClickByName("Select Model", 2);
|
||||
|
||||
|
|
@ -354,12 +354,24 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
QueueTemplate queueItemFolderToAdd = QueueTemplate.None,
|
||||
int overrideWidth = -1, int overrideHeight = -1)
|
||||
{
|
||||
// Walk back a step in the stack and output the callers name
|
||||
StackTrace st = new StackTrace(false);
|
||||
Debug.WriteLine("\r\n ***** Running automation test: {0} {1} ", st.GetFrames().Skip(1).First().GetMethod().Name, DateTime.Now);
|
||||
|
||||
if (staticDataPathOverride == null)
|
||||
{
|
||||
// Popping one directory above MatterControl, then back down into MatterControl ensures this works in MCCentral as well and MatterControl
|
||||
staticDataPathOverride = TestContext.CurrentContext.ResolveProjectPath(5, "MatterControl", "StaticData");
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
string outputDirectory = "Debug";
|
||||
#else
|
||||
string outputDirectory = "Release";
|
||||
#endif
|
||||
|
||||
Environment.CurrentDirectory = TestContext.CurrentContext.ResolveProjectPath(5, "MatterControl", "bin", outputDirectory);
|
||||
|
||||
#if !__ANDROID__
|
||||
// Set the static data to point to the directory of MatterControl
|
||||
StaticData.Instance = new FileSystemStaticData(staticDataPathOverride);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue