Skip to content

Commit

Permalink
Merge pull request #15 from binario200/master
Browse files Browse the repository at this point in the history
adding code to retrieve report output from the container
  • Loading branch information
ksqartechinc authored Feb 2, 2018
2 parents 4ae5e21 + 2937738 commit a9adf48
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ADD target/libs $BASE_DIR/libs
ADD basic-flow-module.xml $BASE_DIR/basic-flow-module.xml

# Command line to execute the test
ENTRYPOINT ["/usr/bin/java", "-cp", "/usr/share/tag/container-test.jar", "org.testng.TestNG", "/usr/share/tag/basic-flow-module.xml"]
ENTRYPOINT ["/usr/bin/java", "-cp", "/usr/share/tag/container-test.jar", "org.testng.TestNG", "-d", "/usr/share/tag/test-output", "/usr/share/tag/basic-flow-module.xml"]
53 changes: 53 additions & 0 deletions src/main/resources/extent-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<extentreports>
<configuration>
<!-- document encoding -->
<!-- defaults to UTF-8 -->
<encoding>UTF-8</encoding>

<!-- protocol for script and stylesheets -->
<!-- defaults to https -->
<protocol>https</protocol>

<!-- title of the document -->
<documentTitle>ExtentReports 2.0</documentTitle>

<!-- report name - displayed at top-nav -->
<reportName>Fame UAT Automation Report</reportName>

<!-- report headline - displayed at top-nav, after reportHeadline -->
<reportHeadline></reportHeadline>

<!-- global date format override -->
<!-- defaults to yyyy-MM-dd -->
<dateFormat>yyyy-MM-dd</dateFormat>

<!-- global time format override -->
<!-- defaults to HH:mm:ss -->
<timeFormat>HH:mm:ss</timeFormat>

<!-- custom javascript -->
<scripts>
<![CDATA[
$(document).ready(function() {
});
]]>
</scripts>

<scripts>
<![CDATA[
$(document).ready(function() {
$('.dashboard-view').click();
});
]]>
</scripts>

<!-- custom styles -->
<styles>
<![CDATA[
]]>
</styles>
</configuration>
</extentreports>
12 changes: 9 additions & 3 deletions src/test/java/com/infolob/container/test/BasicFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.Platform;


public class BasicFlow {
// extent-report
public ExtentReports extent;
Expand All @@ -62,10 +64,14 @@ public class BasicFlow {
@BeforeSuite
public void setUp(){
try {
String workingDir = System.getProperty("user.dir");

extent = new ExtentReports(workingDir+"/Test_Execution_Report.html", true);
extent.loadConfig(new File(workingDir+"/extent-config.xml"));

//String workingDir = System.getProperty("user.dir");
//System.out.println("Current working directory : " + workingDir);

// We need to find a Way to specify where we want this report been created
extent = new ExtentReports("/Test_Execution_Report.html", true);
extent.loadConfig(BasicFlow.class.getResource("/extent-config.xml"));
extent.addSystemInfo("Environment","SIT");

/*
Expand Down

0 comments on commit a9adf48

Please sign in to comment.