-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial: allows setting timestamp format via config #206
- Loading branch information
1 parent
9adcb1f
commit 1ad3d7e
Showing
11 changed files
with
110 additions
and
27 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
ExtentReports.Tests/Reporter/SparkReporterConcurrentTest.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,34 @@ | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using AventStack.ExtentReports.Model; | ||
using AventStack.ExtentReports.Reporter; | ||
using NUnit.Framework; | ||
using NUnit.Framework.Internal; | ||
|
||
namespace AventStack.ExtentReports.Tests.Reporter | ||
{ | ||
public class SparkReporterConcurrentTest | ||
{ | ||
private ExtentReports _extent; | ||
|
||
[SetUp] | ||
public void Setup() | ||
{ | ||
_extent = new ExtentReports(); | ||
_extent.AttachReporter(new ExtentSparkReporter("SparkReporterConcurrentTest.html")); | ||
} | ||
|
||
[Test] | ||
public void ParallelCreateTestsAndFlush() | ||
{ | ||
var rng = Enumerable.Range(0, 100); | ||
Parallel.ForEach(rng, new ParallelOptions { MaxDegreeOfParallelism = 4 }, x => { | ||
_extent.CreateTest("Test").Info(""); | ||
if (x % 5 == 0) | ||
{ | ||
_extent.Flush(); | ||
} | ||
}); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using AventStack.ExtentReports.Model; | ||
|
||
namespace AventStack.ExtentReports.Reporter.Model | ||
{ | ||
public class SparkReporterTest | ||
{ | ||
public SparkReporterTest(ExtentSparkReporter reporter, Test test) | ||
{ | ||
Reporter = reporter; | ||
Test = test; | ||
} | ||
|
||
public ExtentSparkReporter Reporter; | ||
public Test Test; | ||
} | ||
} |
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