Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Sinha <manish.sinha@xamarin.com>2015-05-29 20:04:39 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-06-01 22:13:21 +0300
commit1cbce74fb75cb66eda8c70ef1da3493abfc0e9c7 (patch)
tree98f0aea2c7484ccc8503eae2ebb756b4a2d973c6 /main/tests/UserInterfaceTests/UITestBase.cs
parent5bfd0c7d0b48c95ec235f2031be87be69ef9e533 (diff)
[UITest] Fetch and save the memory usage of each test on the disk
Update makefile uitest target to first delete TestResults folder before running the tests
Diffstat (limited to 'main/tests/UserInterfaceTests/UITestBase.cs')
-rw-r--r--main/tests/UserInterfaceTests/UITestBase.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/tests/UserInterfaceTests/UITestBase.cs b/main/tests/UserInterfaceTests/UITestBase.cs
index 58dee1092f..5cb7a2e191 100644
--- a/main/tests/UserInterfaceTests/UITestBase.cs
+++ b/main/tests/UserInterfaceTests/UITestBase.cs
@@ -29,6 +29,7 @@ using NUnit.Framework;
using MonoDevelop.Components.AutoTest;
using System;
using System.Collections.Generic;
+using Newtonsoft.Json;
namespace UserInterfaceTests
{
@@ -37,6 +38,7 @@ namespace UserInterfaceTests
{
string currentWorkingDirectory;
string testResultFolder;
+ string memoryUsageFolder;
string currentTestResultFolder;
int testScreenshotIndex;
@@ -61,8 +63,9 @@ namespace UserInterfaceTests
public virtual void FixtureSetup ()
{
testResultFolder = Path.Combine (currentWorkingDirectory, "TestResults");
- if (!Directory.Exists (testResultFolder))
- Directory.CreateDirectory (testResultFolder);
+ memoryUsageFolder = Path.Combine (testResultFolder, "MemoryUsage");
+ if (!Directory.Exists (memoryUsageFolder))
+ Directory.CreateDirectory (memoryUsageFolder);
}
[SetUp]
@@ -81,6 +84,8 @@ namespace UserInterfaceTests
public virtual void Teardown ()
{
FoldersToClean.Add (GetSolutionDirectory ());
+ File.WriteAllText (Path.Combine (memoryUsageFolder, TestContext.CurrentContext.Test.FullName),
+ JsonConvert.SerializeObject (Session.MemoryStats, Formatting.Indented));
Ide.CloseAll ();
TestService.EndSession ();