-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html logger #2103
Merged
Merged
Html logger #2103
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
348fe08
First draft for the Html Logger.
56091eb
Adding the Program.cs for making the unit tests project build
a5fe993
1. Added docs for methods
0ed9a7e
Html logger acceptance Test added
385edf5
Merge remote-tracking branch 'upstream/master' into HtmlLogger
29aed06
incresed the file count in Tesplatform.portable and Testplatform nusp…
49ee322
Adding xlf files
e34d3df
Added installing dotnet-cli in build
203a717
Corrected defaultParamter:Logfile on HtmlLoggerTests
62011ee
Changed the hardcoded folder name of testresults
ff3d43d
Html.xslt is added to dll
ed1fdc9
Changed the file name html.xslt to Html.xslt and Added styling in xslt
b29505c
TestResults changed to TestRunDetails and summary comments corrected
35fcc2a
Added clickability and added test run duration and passing percentage
7fdf5e4
redundant code in xslt is removed and acceptanece test is corrected
df250ee
added failed results
6b81048
code refactoring using resharper
fef0cae
Merge branch 'master' into HtmlLogger
hvinett 4b0a936
Fixed the xslt issues and added comments.\
b5e26c8
Merge from master
c48eca1
Merge branch 'HtmlLogger' of https://github.com/hvinett/vstest into H…
93467b2
unit tests refactored
35067d6
friend.cs added
14e82ee
Days in GetFormattedDurationString is fixed
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ | |
</ItemGroup> | ||
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" /> | ||
</Project> | ||
|
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 |
---|---|---|
|
@@ -132,5 +132,11 @@ public string[] GetFiles(string path, string searchPattern, SearchOption searchO | |
{ | ||
return Directory.GetFiles(path, searchPattern, searchOption); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public void Delete(string path) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change this to TryDelete with bool return, In case file does not exists this API will throw. |
||
{ | ||
File.Delete(path); | ||
} | ||
} | ||
} |
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
62 changes: 62 additions & 0 deletions
62
src/Microsoft.TestPlatform.Extensions.HtmlLogger/Constants.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,62 @@ | ||
// 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.VisualStudio.TestPlatform.Extensions.HtmlLogger | ||
{ | ||
using System; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel; | ||
|
||
public static class Constants | ||
{ | ||
/// <summary> | ||
/// Uri used to uniquely identify the Html logger. | ||
/// </summary> | ||
public const string ExtensionUri = "logger://Microsoft/TestPlatform/HtmlLogger/v1"; | ||
|
||
/// <summary> | ||
/// Alternate user friendly string to uniquely identify the console logger. | ||
/// </summary> | ||
public const string FriendlyName = "Html"; | ||
|
||
/// <summary> | ||
/// The file extension of xml file | ||
/// </summary> | ||
public const string XmlFileExtension = "xml"; | ||
|
||
/// <summary> | ||
/// The file extension of html file | ||
/// </summary> | ||
public const string HtmlFileExtension = "html"; | ||
|
||
/// /// <summary> | ||
/// Property Id storing the TestType. | ||
/// </summary> | ||
public const string TestTypePropertyIdentifier = "TestType"; | ||
|
||
/// <summary> | ||
/// Ordered test type guid | ||
/// </summary> | ||
public static readonly Guid OrderedTestTypeGuid = new Guid("ec4800e8-40e5-4ab3-8510-b8bf29b1904d"); | ||
|
||
/// <summary> | ||
/// Property Id storing the ParentExecutionId. | ||
/// </summary> | ||
public const string ParentExecutionIdPropertyIdentifier = "ParentExecId"; | ||
|
||
/// <summary> | ||
/// Property Id storing the ExecutionId. | ||
/// </summary> | ||
public const string ExecutionIdPropertyIdentifier = "ExecutionId"; | ||
|
||
/// <summary> | ||
/// Log file parameter key | ||
/// </summary> | ||
public const string LogFileNameKey = "LogFileName"; | ||
|
||
public static readonly TestProperty ExecutionIdProperty = TestProperty.Register("ExecutionId", ExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult)); | ||
|
||
public static readonly TestProperty ParentExecIdProperty = TestProperty.Register("ParentExecId", ParentExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult)); | ||
|
||
public static readonly TestProperty TestTypeProperty = TestProperty.Register("TestType", TestTypePropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult)); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/Microsoft.TestPlatform.Extensions.HtmlLogger/Friends.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,10 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
#region Test Assemblies | ||
|
||
[assembly: InternalsVisibleTo("Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] | ||
|
||
#endregion |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be changed.