From d05f3102a2dc06d53e560ce55d38812be9c26294 Mon Sep 17 00:00:00 2001 From: anshooarora Date: Mon, 17 Dec 2018 11:11:45 -0500 Subject: [PATCH 01/12] fixes #6 - invalid testEndTime and timeTaken --- .../aventstack/extentreports/model/Test.java | 2 +- .../api/TestStartEndDateTimeTest.java | 110 +++++++++++++++--- 2 files changed, 93 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/aventstack/extentreports/model/Test.java b/src/main/java/com/aventstack/extentreports/model/Test.java index 7ded9fb..ac96b32 100644 --- a/src/main/java/com/aventstack/extentreports/model/Test.java +++ b/src/main/java/com/aventstack/extentreports/model/Test.java @@ -282,7 +282,7 @@ public void end() { ? Status.PASS : status; - if (usesManualConfiguration || endTime == null) + if (!usesManualConfiguration) setEndTimeFromChildren(); } diff --git a/src/test/java/com/aventstack/extentreports/api/TestStartEndDateTimeTest.java b/src/test/java/com/aventstack/extentreports/api/TestStartEndDateTimeTest.java index 036425e..83d9c43 100644 --- a/src/test/java/com/aventstack/extentreports/api/TestStartEndDateTimeTest.java +++ b/src/test/java/com/aventstack/extentreports/api/TestStartEndDateTimeTest.java @@ -13,9 +13,9 @@ public class TestStartEndDateTimeTest extends Base { @Test - public void verifyStartTime(Method method) { + public void testStartTimeBoundary(Method method) { Date init = Calendar.getInstance().getTime(); - ExtentTest test = extent.createTest(method.getName()); + ExtentTest test = extent.createTest(method.getName()).pass("pass"); Date end = Calendar.getInstance().getTime(); Assert.assertTrue(test.getModel().getStartTime().getTime() >= init.getTime()); @@ -23,9 +23,9 @@ public void verifyStartTime(Method method) { } @Test - public void verifyEndTime(Method method) { + public void testEndTimeBoundary(Method method) { Date init = Calendar.getInstance().getTime(); - ExtentTest test = extent.createTest(method.getName()); + ExtentTest test = extent.createTest(method.getName()).pass("pass"); Date end = Calendar.getInstance().getTime(); Assert.assertTrue(test.getModel().getEndTime().getTime() >= init.getTime()); @@ -33,11 +33,34 @@ public void verifyEndTime(Method method) { } @Test - public void verifyTimeWithManualSetting(Method method) { - extent.setReportUsesManualConfiguration(true); + public void testEndTimeLogTimeTaken(Method method) throws InterruptedException { + int wait = 200; + Date init = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + Thread.sleep(wait); + test.pass("pass"); + Assert.assertTrue(test.getModel().getEndTime().getTime() >= (init.getTime() + wait)); + } + + @Test + public void testEndTimeNodeTimeTaken(Method method) throws InterruptedException { + int wait = 200; Date init = Calendar.getInstance().getTime(); ExtentTest test = extent.createTest(method.getName()); + ExtentTest node = test.createNode(method.getName()); + Thread.sleep(wait); + node.pass("pass"); + + Assert.assertTrue(test.getModel().getEndTime().getTime() >= (init.getTime() + wait)); + } + + @Test + public void testTimeWithManualSettingBoundary(Method method) { + extent.setReportUsesManualConfiguration(true); + + Date init = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()).pass("pass"); Date end = Calendar.getInstance().getTime(); Assert.assertTrue(test.getModel().getEndTime().getTime() >= init.getTime()); @@ -45,35 +68,86 @@ public void verifyTimeWithManualSetting(Method method) { } @Test - public void verifyEndTimeWithManualSetting(Method method) { + public void testEndTimeWithManualSettingBoundary(Method method) { extent.setReportUsesManualConfiguration(true); Date init = Calendar.getInstance().getTime(); - ExtentTest test = extent.createTest(method.getName()); + ExtentTest test = extent.createTest(method.getName()).pass("pass"); Date end = Calendar.getInstance().getTime(); Assert.assertTrue(test.getModel().getEndTime().getTime() >= init.getTime()); Assert.assertTrue(test.getModel().getEndTime().getTime() <= end.getTime()); } + + @Test + public void testEndTimeWithManualSettingLog(Method method) throws InterruptedException { + int wait = 200; + extent.setReportUsesManualConfiguration(true); + + Date init = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + Thread.sleep(wait); + test.pass("pass"); + + Assert.assertFalse(test.getModel().getEndTime().getTime() >= (init.getTime() + wait)); + } + + @Test + public void testStartTimeWithManualSettingLogSetter(Method method) throws InterruptedException { + int wait = 200; + extent.setReportUsesManualConfiguration(true); + + Date init = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + Thread.sleep(wait); + test.pass("pass"); + test.getModel().setStartTime(test.getModel().getLogContext().getLast().getTimestamp()); + + Assert.assertTrue(test.getModel().getStartTime().getTime() >= (init.getTime() + wait)); + } @Test - public void verifyStartTimeWithLogs(Method method) { + public void testStartTimeWithManualSettingNodeLogSetter(Method method) throws InterruptedException { + int wait = 200; + extent.setReportUsesManualConfiguration(true); + Date init = Calendar.getInstance().getTime(); - ExtentTest test = extent.createTest(method.getName()).pass("pass"); - Date end = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + ExtentTest node = test.createNode(method.getName()); + Thread.sleep(wait); + node.pass("pass"); + test.getModel().setStartTime(test.getModel().getNodeContext().getLast().getEndTime()); - Assert.assertTrue(test.getModel().getStartTime().getTime() >= init.getTime()); - Assert.assertTrue(test.getModel().getStartTime().getTime() <= end.getTime()); + Assert.assertTrue(test.getModel().getStartTime().getTime() >= (init.getTime() + wait)); } @Test - public void verifyEndTimeWithLogs(Method method) { + public void testEndTimeWithManualSettingLogSetter(Method method) throws InterruptedException { + int wait = 200; + extent.setReportUsesManualConfiguration(true); + Date init = Calendar.getInstance().getTime(); - ExtentTest test = extent.createTest(method.getName()).pass("pass"); - Date end = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + Thread.sleep(wait); + test.pass("pass"); + test.getModel().setEndTime(test.getModel().getLogContext().getLast().getTimestamp()); - Assert.assertTrue(test.getModel().getEndTime().getTime() >= init.getTime()); - Assert.assertTrue(test.getModel().getEndTime().getTime() <= end.getTime()); + Assert.assertTrue(test.getModel().getEndTime().getTime() >= (init.getTime() + wait)); + } + + @Test + public void testEndTimeWithManualSettingNodeLogSetter(Method method) throws InterruptedException { + int wait = 200; + extent.setReportUsesManualConfiguration(true); + + Date init = Calendar.getInstance().getTime(); + ExtentTest test = extent.createTest(method.getName()); + ExtentTest node = test.createNode(method.getName()); + Thread.sleep(wait); + node.pass("pass"); + test.getModel().setEndTime(test.getModel().getNodeContext().getLast().getEndTime()); + + Assert.assertTrue(test.getModel().getEndTime().getTime() >= (init.getTime() + wait)); } } From 90b7db8a3f024d67072da19740321068bfdf275a Mon Sep 17 00:00:00 2001 From: anshooarora Date: Wed, 19 Dec 2018 11:21:11 -0500 Subject: [PATCH 02/12] #16 delete LICENSE --- LICENSE | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 59e8af7..0000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -ExtentReports Community Version - -Copyright 2018 AventStack - -The BSD 3-Clause License: http://opensource.org/licenses/BSD-3-Clause - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL aventstack.com BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 8a0bbe7e8c215d080658db06696b3fc952f6c69c Mon Sep 17 00:00:00 2001 From: Anshoo Arora Date: Wed, 19 Dec 2018 11:21:46 -0500 Subject: [PATCH 03/12] closes #16 create LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 43291097ebca057134a8e0a4e9b6264297a07193 Mon Sep 17 00:00:00 2001 From: anshooarora Date: Wed, 19 Dec 2018 16:09:08 -0500 Subject: [PATCH 04/12] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index cb37901..cfea849 100644 --- a/Readme.md +++ b/Readme.md @@ -15,4 +15,4 @@ View [extentreports.com](http://extentreports.com/docs/versions/4/java/) for com ### License -BSD-3 license \ No newline at end of file +Apache-2.0 \ No newline at end of file From 4057d1bf0f041efb5c223808886559b0f2afa9e7 Mon Sep 17 00:00:00 2001 From: anshooarora Date: Mon, 14 Jan 2019 00:02:46 -0500 Subject: [PATCH 05/12] #19 ExtentSparkReporter --- pom.xml | 2 +- .../aventstack/extentreports/ExtentTest.java | 16 +- .../aventstack/extentreports/model/Media.java | 14 + .../extentreports/model/ScreenCapture.java | 2 +- .../aventstack/extentreports/model/Test.java | 4 + .../reporter/ExtentSparkReporter.java | 77 +++ .../ExtentSparkReporterConfiguration.java | 15 + .../extentreports/utils/FileUtil.java | 17 + .../extentreports/view/spark/dashboard.ftl | 548 ++++++++++++++++++ .../extentreports/view/spark/exception.ftl | 101 ++++ .../view/spark/macros/attributes.ftl | 17 + .../extentreports/view/spark/macros/log.ftl | 27 + .../view/spark/macros/recurse_nodes.ftl | 30 + .../view/spark/partials/head.ftl | 9 + .../view/spark/partials/navbar.ftl | 41 ++ .../view/spark/partials/scripts.ftl | 4 + .../view/spark/partials/sidenav.ftl | 42 ++ .../extentreports/view/spark/tag.ftl | 109 ++++ .../extentreports/view/spark/test.ftl | 258 +++++++++ src/main/resources/spark.properties | 15 + 20 files changed, 1338 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/aventstack/extentreports/reporter/ExtentSparkReporter.java create mode 100644 src/main/java/com/aventstack/extentreports/reporter/configuration/ExtentSparkReporterConfiguration.java create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/exception.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/macros/attributes.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/macros/log.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/macros/recurse_nodes.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/partials/head.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/partials/navbar.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/partials/scripts.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/partials/sidenav.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/tag.ftl create mode 100644 src/main/resources/com/aventstack/extentreports/view/spark/test.ftl create mode 100644 src/main/resources/spark.properties diff --git a/pom.xml b/pom.xml index 472dc8a..f64ba93 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.aventstack extentreports - 4.0.6 + 4.0.7-SNAPSHOT extentreports www.extentreports.com diff --git a/src/main/java/com/aventstack/extentreports/ExtentTest.java b/src/main/java/com/aventstack/extentreports/ExtentTest.java index e412e19..a36e634 100644 --- a/src/main/java/com/aventstack/extentreports/ExtentTest.java +++ b/src/main/java/com/aventstack/extentreports/ExtentTest.java @@ -1104,14 +1104,14 @@ public ExtentTest assignAuthor(String... author) { */ public ExtentTest assignDevice(String... device) { Arrays.stream(device) - .filter(StringUtil::isNotNullOrEmpty) - .forEach(x -> { - Device d = new Device(x.replace(" ", "")); - test.setDevice(d); - extent.assignDevice(test, d); - } - ); - return this; + .filter(StringUtil::isNotNullOrEmpty) + .forEach(x -> { + Device d = new Device(x.replace(" ", "")); + test.setDevice(d); + extent.assignDevice(test, d); + } + ); + return this; } @Override diff --git a/src/main/java/com/aventstack/extentreports/model/Media.java b/src/main/java/com/aventstack/extentreports/model/Media.java index 18f83fd..f87ea9e 100644 --- a/src/main/java/com/aventstack/extentreports/model/Media.java +++ b/src/main/java/com/aventstack/extentreports/model/Media.java @@ -4,6 +4,8 @@ import org.bson.types.ObjectId; +import com.aventstack.extentreports.utils.FileUtil; + public class Media implements Serializable { @@ -18,6 +20,7 @@ public class Media private String path; private String base64String; private int seq; + private long fileSize = 0; private MediaType mediaType; @@ -71,12 +74,23 @@ protected String getDescription() { public void setPath(String path) { this.path = path; + setFileSize(FileUtil.getFileSize(path)); + if (getName() == null || getName().isEmpty()) + setName(FileUtil.getFileName(path)); } public String getPath() { return path; } + public long getFileSize() { + return fileSize; + } + + public void setFileSize(long fileSize) { + this.fileSize = fileSize; + } + public void setMediaType(MediaType mediaType) { this.mediaType = mediaType; } diff --git a/src/main/java/com/aventstack/extentreports/model/ScreenCapture.java b/src/main/java/com/aventstack/extentreports/model/ScreenCapture.java index 107f542..1021c4a 100644 --- a/src/main/java/com/aventstack/extentreports/model/ScreenCapture.java +++ b/src/main/java/com/aventstack/extentreports/model/ScreenCapture.java @@ -16,7 +16,7 @@ public String getSourceWithIcon() { return "img"; } - private String getScreenCapturePath() { + public String getScreenCapturePath() { return getPath() != null ? getPath() : getBase64String(); } diff --git a/src/main/java/com/aventstack/extentreports/model/Test.java b/src/main/java/com/aventstack/extentreports/model/Test.java index ac96b32..9ae3719 100644 --- a/src/main/java/com/aventstack/extentreports/model/Test.java +++ b/src/main/java/com/aventstack/extentreports/model/Test.java @@ -348,6 +348,10 @@ public String getHierarchicalName() { return hierarchicalName; } + public boolean hasAttributes() { + return hasAuthor() || hasCategory() || hasDevice(); + } + public AbstractStructure getCategoryContext() { if (category == null) { category = new AbstractStructure<>(); diff --git a/src/main/java/com/aventstack/extentreports/reporter/ExtentSparkReporter.java b/src/main/java/com/aventstack/extentreports/reporter/ExtentSparkReporter.java new file mode 100644 index 0000000..5dd9d43 --- /dev/null +++ b/src/main/java/com/aventstack/extentreports/reporter/ExtentSparkReporter.java @@ -0,0 +1,77 @@ +package com.aventstack.extentreports.reporter; + +import java.io.File; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; + +import com.aventstack.extentreports.ReportAggregates; +import com.aventstack.extentreports.reporter.configuration.ExtentSparkReporterConfiguration; + +import freemarker.template.Template; +import freemarker.template.TemplateException; + +/** + * The ExtentSparkReporter creates a rich standalone spark file. It allows several + * configuration options via the config() method. + */ +public class ExtentSparkReporter extends BasicFileReporter { + + private static final Logger logger = Logger.getLogger(ExtentSparkReporter.class.getName()); + private static final String REPORTER_NAME = "spark"; + private static final String TEST_TEMPLATE_NAME = REPORTER_NAME + "/test.ftl"; + private static final String TAG_TEMPLATE_NAME = REPORTER_NAME + "/tag.ftl"; + private static final String EXCEPTION_TEMPLATE_NAME = REPORTER_NAME + "/exception.ftl"; + private static final String DASHBOARD_TEMPLATE_NAME = REPORTER_NAME + "/dashboard.ftl"; + private static final String[] DEFAULT_CONFIG_FILE_PATH = new String[] { "spark.properties", + "src/main/resources/spark.properties" }; + + private ExtentSparkReporterConfiguration userConfig = new ExtentSparkReporterConfiguration(this); + + public ExtentSparkReporter(String path) { + super(path); + init(DEFAULT_CONFIG_FILE_PATH, config()); + } + + public ExtentSparkReporter(File file) { + super(file); + init(DEFAULT_CONFIG_FILE_PATH, config()); + } + + public ExtentSparkReporterConfiguration config() { + return userConfig; + } + + @Override + public synchronized void flush(ReportAggregates reportAggregates) { + super.flush(reportAggregates); + + if (getTestList().isEmpty()) + return; + + loadUserConfig(); + + try { + Template template = getFreemarkerConfig().getTemplate(TEST_TEMPLATE_NAME); + processTemplate(template, new File(destination + "index.html")); + if (!getCategoryContextInfo().getTestAttributeTestContextList().isEmpty()) { + template = getFreemarkerConfig().getTemplate(TAG_TEMPLATE_NAME); + processTemplate(template, new File(destination + "tag.html")); + } + if (!getExceptionContextInfo().getExceptionTestContextList().isEmpty()) { + template = getFreemarkerConfig().getTemplate(EXCEPTION_TEMPLATE_NAME); + processTemplate(template, new File(destination + "exception.html")); + } + template = getFreemarkerConfig().getTemplate(DASHBOARD_TEMPLATE_NAME); + processTemplate(template, new File(destination + "dashboard.html")); + } catch (IOException | TemplateException e) { + logger.log(Level.SEVERE, "An exception occurred", e); + } + } + + @Override + public String getReporterName() { + return REPORTER_NAME; + } + +} diff --git a/src/main/java/com/aventstack/extentreports/reporter/configuration/ExtentSparkReporterConfiguration.java b/src/main/java/com/aventstack/extentreports/reporter/configuration/ExtentSparkReporterConfiguration.java new file mode 100644 index 0000000..af9da95 --- /dev/null +++ b/src/main/java/com/aventstack/extentreports/reporter/configuration/ExtentSparkReporterConfiguration.java @@ -0,0 +1,15 @@ +package com.aventstack.extentreports.reporter.configuration; + +import com.aventstack.extentreports.reporter.ExtentSparkReporter; + +/** + * Defines configuration settings for the Spark reporter + */ +public class ExtentSparkReporterConfiguration + extends RichViewReporterConfiguration { + + public ExtentSparkReporterConfiguration(ExtentSparkReporter reporter) { + super(reporter); + } + +} diff --git a/src/main/java/com/aventstack/extentreports/utils/FileUtil.java b/src/main/java/com/aventstack/extentreports/utils/FileUtil.java index f9d66e6..44790ef 100644 --- a/src/main/java/com/aventstack/extentreports/utils/FileUtil.java +++ b/src/main/java/com/aventstack/extentreports/utils/FileUtil.java @@ -8,6 +8,16 @@ public class FileUtil { private FileUtil() { } + + public static String getFileName(File f) { + if (f == null || !f.exists()) + return ""; + return f.getName(); + } + + public static String getFileName(String path) { + return getFileName(new File(path)); + } public static String getFileNameWithoutExtension(File f) { String name = f.getName(); @@ -56,4 +66,11 @@ public static Boolean fileExists(String path) { return f.exists() && !f.isDirectory(); } + public static long getFileSize(String path) { + if (path == null) + return 0; + File f = new File(path); + return f.exists() ? f.length() : 0; + } + } diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl new file mode 100644 index 0000000..7c707fb --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl @@ -0,0 +1,548 @@ +<#assign systemAttributeContext=report.getSystemAttributeContext().getSystemAttributeList()> +<#assign authorContext=report.getAuthorContextInfo().getTestAttributeTestContextList()> +<#assign categoryContext=report.getCategoryContextInfo().getTestAttributeTestContextList()> +<#assign deviceContext=report.getDeviceContextInfo().getTestAttributeTestContextList()> +<#assign exceptionContext=report.getExceptionContextInfo().getExceptionTestContextList()> +<#assign config=report.getConfigContext()> +<#assign timeStampFormat = config.getValue('timeStampFormat')> + +<#assign boxsize='col-md-12'> +<#if report.reportStatusStats.childCount!=0> + <#assign boxsize='col-sm-12 col-md-6'> + +<#if (report.analysisStrategy=="BDD") || (report.reportStatusStats.childCount != 0 && report.reportStatusStats.grandChildCount != 0)> + <#assign boxsize='col-sm-12 col-md-4'> + + +<#assign chartWidth="115" chartHeight="90" chartBoxHeight="94"> + +<#assign reportType="" parentHeading="Tests" childHeading="Steps" grandChildHeading="" size=2> +<#if report.analysisStrategy=="SUITE"> + <#assign parentHeading="Suite" childHeading="Tests" grandChildHeading="Tests" size=2> + <#if report.reportStatusStats.grandChildCount!=0> + <#assign childHeading="Classes" grandChildHeading="Tests" size=3> + + +<#if report.analysisStrategy=="BDD"> + <#assign reportType="bdd" parentHeading="Features" childHeading="Scenarios" grandChildHeading="Steps" size=3> + +<#if report.analysisStrategy=="CLASS"> + <#assign parentHeading="Class" childHeading="Methods" grandChildHeading="" size=2> + + + + + <#include "partials/head.ftl"> + +
+
+ <#include "partials/navbar.ftl"> + <#include "partials/sidenav.ftl"> +
+
+
+
+
+
+
+
${parentHeading}
+
+
+
+ +
+
+ +
+
+ <#if report.reportStatusStats.childCount != 0> +
+
+
+
${childHeading}
+
+
+
+ +
+
+ +
+
+ + <#if report.reportStatusStats.grandChildCount != 0> +
+
+
+
${grandChildHeading}
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+

${parentHeading}

+

${report.reportStatusStats.parentCount}

+ + + ${report.reportStatusStats.parentPercentagePass?string("#.00")}% + +
+
+ +
+
+
+
+
+ <#if report.reportStatusStats.childCount != 0> +
+
+
+
+
+

${childHeading}

+

${report.reportStatusStats.childCount}

+ + + ${report.reportStatusStats.childPercentagePass?string("#.00")}% + +
+
+ +
+
+
+
+
+ +
+
+
+
+
+

Start

+
${report.startTime?datetime?string["${timeStampFormat}"]}
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+

Duration

+
${report.longRunDuration}
+ +
+
+ +
+
+
+
+
+
+ <#if config.getValue("enableTimeline")=='true'> +
+
+
+
+
Timeline
+
+
+
+ +
+
+
+
+
+ +
+ <#if (authorContext?? && authorContext?size != 0)> +
+
+
+
Author
+
+
+ + + + + + + + + + + + <#list authorContext as author> + + + + + + + + + +
NamePassedFailedOthersPassed %
${author.name}${author.passed}${author.failed}${author.others} + <#if author.size()!=0> + ${(author.passed/author.size())*100}% + <#else> + 0% + +
+
+
+
+ + <#if (categoryContext?? && categoryContext?size != 0)> +
+
+
+
Tags
+
+
+ + + + + + + + + + + + <#list report.categoryContextInfo.testAttributeTestContextList as category> + + + + + + + + + +
NamePassedFailedOthersPassed %
${category.name}${category.passed}${category.failed}${category.others} + <#if category.size()!=0> + ${(category.passed/category.size())*100}% + <#else> + 0% + +
+
+
+
+ + <#if (deviceContext?? && deviceContext?size != 0)> +
+
+
+
Device
+
+
+ + + + + + + + + + + + <#list deviceContext as device> + + + + + + + + + +
NamePassedFailedOthersPassed %
${device.name}${device.passed}${device.failed}${device.others} + <#if device.size()!=0> + ${(device.passed/device.size())*100}% + <#else> + 0% + +
+
+
+
+ + <#if systemAttributeContext?size != 0> +
+
+
+
Environment
+
+
+ + + + + + + + + <#list report.systemAttributeContext.systemAttributeList as sa> + <#if sa?? && sa.name?? && sa.value??> + + + + + + + +
NameValue
${ sa.name }${ sa.value }
+
+
+
+ +
+
+
+
+
+
+ + <#if config.getValue("enableTimeline")=='true'> + + + <#include "partials/scripts.ftl"> + + + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/exception.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/exception.ftl new file mode 100644 index 0000000..e58e9e6 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/exception.ftl @@ -0,0 +1,101 @@ +<#include "../commons/commons-variables.ftl"> + + + +<#include "partials/head.ftl"> + +
+
+ <#include "partials/navbar.ftl"> + <#include "partials/sidenav.ftl"> +
+
+
+
+ +
+
    + <#list exceptionContext as context> +
  • +
    +
    +

    ${context.exceptionInfo.exceptionName}

    +

    ${context.testList?size} tests

    +
    +
    +
    +
    +

    ${context.exceptionInfo.exceptionName}

    +
    + + + + + + + + + + <#list context.testList as test> + + + + + + + +
    StatusTimestampTestName
    +
    + +
    +
    ${test.startTime?string[("HH:mm:ss a")]} + ${test.name} + <#if test.parent??> +
    + ${test.parent.name} +
    + +
    +
    +
  • + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ <#include "partials/scripts.ftl"> + + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/macros/attributes.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/macros/attributes.ftl new file mode 100644 index 0000000..ee9411a --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/macros/attributes.ftl @@ -0,0 +1,17 @@ +<#macro attributes test> + <#if test.hasAuthor()> + <#list test.authorContext.all as author> + ${author.name} + + + <#if test.hasCategory()> + <#list test.categoryContext.all as category> + ${category.name} + + + <#if test.hasDevice()> + <#list test.deviceContext.all as device> + ${device.name} + + + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/macros/log.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/macros/log.ftl new file mode 100644 index 0000000..9cf553d --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/macros/log.ftl @@ -0,0 +1,27 @@ +<#macro log test> + + + + + + + + <#list test.logContext.all as log> + + + + + + + +
StatusTimestampDetails
${log.timestamp?time?string} + <#if log.exceptionInfo??> + + <#else> + ${log.details} + + <#if log.hasScreenCapture()> + ${log.screenCaptureContext.last.source} + +
+ \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/macros/recurse_nodes.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/macros/recurse_nodes.ftl new file mode 100644 index 0000000..b8c58ea --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/macros/recurse_nodes.ftl @@ -0,0 +1,30 @@ +<#include "log.ftl"> + +<#macro recurse_nodes test> +<#if test.hasChildren()> +
+ <#list test.nodeContext.all as node> +
+ + <#if node.hasLog()> +
+
+ <@log test=node /> +
+
+ + <#if node.hasChildren()> + <@recurse_nodes test=node /> + +
+ +
+ + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/partials/head.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/partials/head.ftl new file mode 100644 index 0000000..197f20e --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/partials/head.ftl @@ -0,0 +1,9 @@ + + + + ${config.getValue("documentTitle")} + + + + + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/partials/navbar.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/partials/navbar.ftl new file mode 100644 index 0000000..8c2acc2 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/partials/navbar.ftl @@ -0,0 +1,41 @@ + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/partials/scripts.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/partials/scripts.ftl new file mode 100644 index 0000000..e727c73 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/partials/scripts.ftl @@ -0,0 +1,4 @@ + +<#if config.containsKey("scripts") && config.getValue("scripts")?has_content> +<#include "../commons/commons-inject-js.ftl"> + diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/partials/sidenav.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/partials/sidenav.ftl new file mode 100644 index 0000000..d493c01 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/partials/sidenav.ftl @@ -0,0 +1,42 @@ +
+
+ +
+
diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/tag.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/tag.ftl new file mode 100644 index 0000000..324f950 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/tag.ftl @@ -0,0 +1,109 @@ +<#include "../commons/commons-variables.ftl"> + + + +<#include "partials/head.ftl"> + +
+
+ <#include "partials/navbar.ftl"> + <#include "partials/sidenav.ftl"> +
+
+
+
+ +
+
    + <#list categoryContext as context> +
  • +
    +
    +

    ${context.name}

    +

    ${context.size()} tests

    + + <#if context.passed!=0>${context.passed} + <#if context.failed!=0>${context.failed} + <#if context.skipped!=0>${context.skipped} + +
    +
    +
    +
    +

    ${context.name}

    + <#if context.passed!=0>${context.passed} passed + <#if context.failed!=0>${context.failed} failed + <#if context.skipped!=0>${context.skipped} skipped +
    + + + + + + + + + + <#list context.testList as test> + + + + + + + +
    StatusTimestampTestName
    +
    + +
    +
    ${test.startTime?string[("HH:mm:ss a")]} + ${test.name} + <#if test.parent??> +
    + ${test.parent.name} +
    + +
    +
    +
  • + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ <#include "partials/scripts.ftl"> + + \ No newline at end of file diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/test.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/test.ftl new file mode 100644 index 0000000..9a8df98 --- /dev/null +++ b/src/main/resources/com/aventstack/extentreports/view/spark/test.ftl @@ -0,0 +1,258 @@ +<#include "../commons/commons-variables.ftl"> +<#include "../commons/commons-macros.ftl"> +<#include "macros/attributes.ftl"> +<#include "macros/log.ftl"> +<#include "macros/recurse_nodes.ftl"> + +<#assign isbdd=false pageClass=""> +<#if report.testList?? && report.testList?has_content && report.testList[0].isBehaviorDrivenType()> + <#assign pageClass="bdd-report" isbdd=true> + + + + +<#include "partials/head.ftl"> + + +
+
+ <#include "partials/navbar.ftl"> + <#include "partials/sidenav.ftl"> +
+
+
+
+
+ +
    + + <#if authorContext?? && authorContext?size != 0> + + + <#if categoryContext?? && categoryContext?size != 0> + + + <#if deviceContext?? && deviceContext?size != 0> + + +
+
+
+
    + <#list report.testList as test> +
  • +
    + +
    +
    +
    +

    ${test.name}

    +

    ${test.runDuration}

    + ${test.startTime?string("HH:mm:ss a")} +
    +
    +
    +
    +
    +
    +
    ${test.name}
    + ${test.startTime?string("MM.dd.yyyy HH:mm:ss")} + ${test.endTime?string("MM.dd.yyyy HH:mm:ss")} + ${test.runDuration} +
    + <#if test.hasAttributes()> +
    + <@attributes test=test /> +
    + + <#if test.description??> +
    + ${test.description} +
    + +
    +
    + <#if !isbdd> + <#if test.hasLog()> +
    + <@log test=test /> +
    + + <#if test.hasScreenCapture()> + + + <#if test.hasChildren()> +
    + <@recurse_nodes test=test /> +
    + + <#else> + <#if test.hasChildren()> +
    + <#list test.nodeContext.all as node> +
    + + <#if node.hasChildren()> +
    +
    + <#list node.nodeContext.all as child> + <#assign cls=""> + <#if child.hasChildren()><#assign cls="ml-3">
    +
    +
    ${child.name}
    +
    + +
    +
    + <#if child.hasLog()> + <#list child.logContext.all as log> + <#if log.exceptionInfo??> + + <#else> + ${log.details} + + <#if log.hasScreenCapture()> + ${log.screenCaptureContext.last.source} + + + +
    + <#if child.hasChildren()> +
    + <#list child.nodeContext.all as gc> +
    ${gc.name}
    +
    + +
    +
    + <#if gc.hasLog()> + <#list gc.logContext.all as log> + <#if log.exceptionInfo??> + + <#else> + ${log.details} + + <#if log.hasScreenCapture()> + ${log.screenCaptureContext.last.source} + + + + +
    + + <#if child.hasChildren()>
    + +
    +
    + +
    + +
    + + +
    +
  • + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ <#include "partials/scripts.ftl"> + + \ No newline at end of file diff --git a/src/main/resources/spark.properties b/src/main/resources/spark.properties new file mode 100644 index 0000000..acb7a9a --- /dev/null +++ b/src/main/resources/spark.properties @@ -0,0 +1,15 @@ +encoding=utf-8 +protocol=https +theme=standard +chartLocation=top +chartVisibilityOnOpen=true +documentTitle=ExtentReports +reportName=ExtentReports +offline=false +cdn=github +timeStampFormat=MMM d, yyyy hh:mm:ss a +enableCategoryView=true +enableExceptionView=true +enableAuthorView=true +enableTestRunnerLogsView=true +enableTimeline=true From 9426dfe597041d4225f691e313c98c775a4a2a7e Mon Sep 17 00:00:00 2001 From: anshooarora Date: Mon, 14 Jan 2019 00:16:56 -0500 Subject: [PATCH 06/12] fixes #24 --- .../extentreports/view/commons/commons-dashboard-scripts.ftl | 2 +- .../com/aventstack/extentreports/view/spark/dashboard.ftl | 2 +- .../com/aventstack/extentreports/view/v3html/v3-html-index.ftl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/com/aventstack/extentreports/view/commons/commons-dashboard-scripts.ftl b/src/main/resources/com/aventstack/extentreports/view/commons/commons-dashboard-scripts.ftl index 0d4ca46..b1d2877 100644 --- a/src/main/resources/com/aventstack/extentreports/view/commons/commons-dashboard-scripts.ftl +++ b/src/main/resources/com/aventstack/extentreports/view/commons/commons-dashboard-scripts.ftl @@ -108,7 +108,7 @@ } })(); }) - <#macro listTestNameDuration testList><#if report.testList??><#list report.testList as t>"${t.name}":${t.runDurationMillis/1000}<#if t_has_next>, + <#macro listTestNameDuration testList><#if report.testList??><#list report.testList as t>"${t.name}":${(t.runDurationMillis/1000)?c?replace(",","")}<#if t_has_next>, var timeline = { <@listTestNameDuration testList=report.testList /> }; diff --git a/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl b/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl index 7c707fb..7b762d3 100644 --- a/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl +++ b/src/main/resources/com/aventstack/extentreports/view/spark/dashboard.ftl @@ -388,7 +388,7 @@ + <#if config.containsKey("scripts") && config.getValue("scripts")?has_content> <#include "../commons/commons-inject-js.ftl"> diff --git a/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-head.ftl b/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-head.ftl index d81b69b..66291af 100644 --- a/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-head.ftl +++ b/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-head.ftl @@ -1,6 +1,3 @@ -<#assign timeStampFormat = config.getValue('timeStampFormat')> -<#assign cdn = config.getValue('cdn')> - @@ -10,7 +7,7 @@ - + ${ config.getValue('documentTitle') } diff --git a/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-index.ftl b/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-index.ftl index b0f6502..824901a 100644 --- a/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-index.ftl +++ b/src/main/resources/com/aventstack/extentreports/view/v3html/v3-html-index.ftl @@ -35,6 +35,13 @@ <#assign parentLabel='suite(s)' childLabel='test(s)' grandChildLabel='method(s)'> + +<#assign timeStampFormat = config.getValue('timeStampFormat')> +<#assign resourceCDN=config.getValue('resourceCDN') cdnURI="cdn.rawgit.com/extent-framework/extent-github-cdn/" csscommit="8644a9c" jscommit="c23457b"> +<#if resourceCDN=="extentreports"> + <#assign cdnURI="extentreports.com/resx" csscommit="" jscommit=""> + + <#include 'v3-html-head.ftl'> @@ -108,7 +115,7 @@ <#if config.getValue('offline')?string == 'true'> <#else> - + <#assign hide=(chartVisibleOnOpen=='true')?then(false, true)> <#if hide> diff --git a/src/main/resources/html.properties b/src/main/resources/html.properties index acb7a9a..55caf1f 100644 --- a/src/main/resources/html.properties +++ b/src/main/resources/html.properties @@ -6,7 +6,7 @@ chartVisibilityOnOpen=true documentTitle=ExtentReports reportName=ExtentReports offline=false -cdn=github +resourceCDN=github timeStampFormat=MMM d, yyyy hh:mm:ss a enableCategoryView=true enableExceptionView=true diff --git a/src/main/resources/spark.properties b/src/main/resources/spark.properties index acb7a9a..55caf1f 100644 --- a/src/main/resources/spark.properties +++ b/src/main/resources/spark.properties @@ -6,7 +6,7 @@ chartVisibilityOnOpen=true documentTitle=ExtentReports reportName=ExtentReports offline=false -cdn=github +resourceCDN=github timeStampFormat=MMM d, yyyy hh:mm:ss a enableCategoryView=true enableExceptionView=true From fdfaa5ad0ab7cd47233df7270822393b145baa87 Mon Sep 17 00:00:00 2001 From: anshooarora Date: Tue, 15 Jan 2019 23:29:28 -0500 Subject: [PATCH 12/12] release 4.0.7 --- pom-nexus.xml | 2 +- pom.xml | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/pom-nexus.xml b/pom-nexus.xml index 692088d..3bca73a 100644 --- a/pom-nexus.xml +++ b/pom-nexus.xml @@ -4,7 +4,7 @@ com.aventstack extentreports - 4.0.6 + 4.0.7 extentreports www.extentreports.com diff --git a/pom.xml b/pom.xml index f64ba93..cbb50d9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.aventstack extentreports - 4.0.7-SNAPSHOT + 4.0.7 extentreports www.extentreports.com @@ -113,25 +113,6 @@ maven-resources-plugin 2.7 - - org.jacoco - jacoco-maven-plugin - 0.7.9 - - - - prepare-agent - - - - report - test - - report - - - -