-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making Trx Logger Hierarchical for ordered test and data driven tests (…
…#1330) * making classes internal * Model classes to be consumed by trx logger * initial changes for trx hierarchical * refactoring * fix for hierarchical level more than 1 * removing unnecessary inner resutls count * refactoring * Interfaces refactoring * refactoring * refactoring * Refactoring * refactoring * refactoring * remove debugger * Review comments * Unit tests * concurrent hash map * Fixes * PR comments
- Loading branch information
1 parent
a4b511a
commit d806e80
Showing
31 changed files
with
1,974 additions
and
1,075 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestAggregation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
internal interface ITestAggregation : ITestElement | ||
{ | ||
Dictionary<Guid, TestLink> TestLinks { get; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel | ||
{ | ||
internal interface ITestElement | ||
{ | ||
TestId Id { get; } | ||
string Name { get; set; } | ||
string Owner { get; set; } | ||
string Storage { get; set; } | ||
string Adapter { get; } | ||
int Priority { get; set; } | ||
bool IsRunnable { get; } | ||
TestExecId ExecutionId { get; set; } | ||
TestExecId ParentExecutionId { get; set; } | ||
TestListCategoryId CategoryId { get; set; } | ||
TestCategoryItemCollection TestCategories { get; } | ||
TestType TestType { get; } | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel | ||
{ | ||
|
||
using System; | ||
|
||
internal interface ITestResult | ||
{ | ||
TestResultId Id { get; } | ||
string ResultType { get; set; } | ||
string StdOut { get; set; } | ||
string StdErr { get; set; } | ||
string DebugTrace { get; set; } | ||
string TestResultsDirectory { get; } | ||
string RelativeTestResultsDirectory { get; } | ||
string ErrorMessage { get; set; } | ||
string ErrorStackTrace { get; set; } | ||
string ComputerName { get; } | ||
string[] TextMessages { get; set; } | ||
int DataRowInfo { get; set; } | ||
DateTime StartTime { get; set; } | ||
DateTime EndTime { get; set; } | ||
TimeSpan Duration { get; set; } | ||
TestOutcome Outcome { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestResultAggregation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel | ||
{ | ||
using System.Collections.Generic; | ||
|
||
internal interface ITestResultAggregation : ITestResult | ||
{ | ||
List<ITestResult> InnerResults { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/OrderedTestElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel | ||
{ | ||
using System; | ||
using Microsoft.TestPlatform.Extensions.TrxLogger.Utility; | ||
using Microsoft.TestPlatform.Extensions.TrxLogger.XML; | ||
|
||
/// <summary> | ||
/// Ordered test element. | ||
/// </summary> | ||
internal class OrderedTestElement : TestElementAggregation, IXmlTestStoreCustom | ||
{ | ||
public OrderedTestElement(Guid id, string name, string adapter) : base(id, name, adapter) { } | ||
|
||
string IXmlTestStoreCustom.ElementName | ||
{ | ||
get { return Constants.OrderedTestElementName; } | ||
} | ||
|
||
string IXmlTestStoreCustom.NamespaceUri | ||
{ | ||
get { return null; } | ||
} | ||
|
||
/// <summary> | ||
/// Gets the test type. | ||
/// </summary> | ||
public override TestType TestType | ||
{ | ||
get { return Constants.OrderedTestType; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.