Skip to content

Commit

Permalink
Added Historical Extent report support with Klov reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
executeautomation committed May 11, 2018
1 parent b97a4fd commit 17f59f3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
20 changes: 10 additions & 10 deletions SpecflowParallelTest/ExtentReport.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<ul id='nav-mobile' class='right hide-on-med-and-down nav-right'>

<a>
<span class='suite-start-time label blue darken-3'>27-04-2018 22:48:24 New Zealand Standard Time</span>
<span class='suite-start-time label blue darken-3'>12-05-2018 00:05:15 New Zealand Standard Time</span>
</a>
<a>
<span class="label blue darken-3">3.1.0</span>
Expand Down Expand Up @@ -173,12 +173,12 @@ <h5>Tests</h5>
<li class='test displayed active has-leaf pass' status='pass' bdd='bdd' test-id='1'>
<div class='test-heading'>
<span class='test-name'>Demo</span>
<span class='test-time'>27-04-2018 22:48:24</span>
<span class='test-time'>12-05-2018 00:05:16</span>
<span class='test-status right pass'>Pass</span>
</div>
<div class='test-content hide'>
<div class='scenario node' test-id='2' status='pass'>
<span class='scenario-duration right label'>00:00:07.1308923</span>
<span class='scenario-duration right label'>00:00:07.4062183</span>
<div class='scenario-desc'>
<b>Scenario</b>
User Details form entry verification
Expand Down Expand Up @@ -218,12 +218,12 @@ <h5>Tests</h5>
<li class='test displayed active has-leaf fail' status='fail' bdd='bdd' test-id='9'>
<div class='test-heading'>
<span class='test-name'>Login</span>
<span class='test-time'>27-04-2018 22:48:37</span>
<span class='test-time'>12-05-2018 00:05:29</span>
<span class='test-status right fail'>Fail</span>
</div>
<div class='test-content hide'>
<div class='scenario node' test-id='10' status='fail'>
<span class='scenario-duration right label'>00:00:04.4741552</span>
<span class='scenario-duration right label'>00:00:04.7149870</span>
<div class='scenario-desc'>
<b>Scenario</b>
Login user as Administrator
Expand Down Expand Up @@ -256,12 +256,12 @@ <h5>Tests</h5>
<li class='test displayed active has-leaf skip' status='skip' bdd='bdd' test-id='15'>
<div class='test-heading'>
<span class='test-name'>User Form</span>
<span class='test-time'>27-04-2018 22:48:47</span>
<span class='test-time'>12-05-2018 00:05:39</span>
<span class='test-status right skip'>Skip</span>
</div>
<div class='test-content hide'>
<div class='scenario node' test-id='16' status='skip'>
<span class='scenario-duration right label'>00:00:06.7742278</span>
<span class='scenario-duration right label'>00:00:06.9689357</span>
<div class='scenario-desc'>
<b>Scenario</b>
User Details form entry verification
Expand Down Expand Up @@ -388,19 +388,19 @@ <h5>Dashboard</h5>
<div class='col s2'>
<div class='card-panel r'>
Start
<div class='panel-lead'>27-04-2018 22:48:24</div>
<div class='panel-lead'>12-05-2018 00:05:15</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
End
<div class='panel-lead'>27-04-2018 22:49:02</div>
<div class='panel-lead'>12-05-2018 00:05:54</div>
</div>
</div>
<div class='col s2'>
<div class='card-panel r'>
Time Taken
<div class='panel-lead'>00:00:37.6070187</div>
<div class='panel-lead'>00:00:38.9804721</div>
</div>
</div>

Expand Down
16 changes: 15 additions & 1 deletion SpecflowParallelTest/Hooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using AventStack.ExtentReports;
using AventStack.ExtentReports.Reporter;
using AventStack.ExtentReports.Gherkin.Model;
using System;

namespace SpecflowParallelTest
{
Expand All @@ -18,6 +19,7 @@ public class Hooks
private static ExtentTest featureName;
private static ExtentTest scenario;
private static ExtentReports extent;
private static KlovReporter klov;

private readonly IObjectContainer _objectContainer;

Expand All @@ -36,7 +38,19 @@ public static void InitializeReport()
htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
//Attach report to reporter
extent = new ExtentReports();
extent.AttachReporter(htmlReporter);
klov = new KlovReporter();

klov.InitMongoDbConnection("localhost", 27017);

klov.ProjectName = "ExecuteAutomation Test";

// URL of the KLOV server
klov.KlovUrl = "http://localhost:5689";

klov.ReportName = "Karthik KK" + DateTime.Now.ToString();


extent.AttachReporter(htmlReporter, klov);
}

[AfterTestRun]
Expand Down

0 comments on commit 17f59f3

Please sign in to comment.