Skip to content

Commit

Permalink
Delete HtmlReporter from test suites (#94)
Browse files Browse the repository at this point in the history
* feature/APPS-871: Adjusted existing helper methods and deleted all java docs.

* feature/APPS-871: Adjusted existing methods and deleted java docs

* feature/APPS-871: Ajusted helper methods

* feature/APPS-871: Renamed methods

* feature/APPS-871: Addressed suggestions #1

* feature/APPS-871: Renamed test class

* feature/APPS-delete-html-reporter: delete html reporter listener from each xml test suite

* feature/APPS-delete-html-reporter: deleted also HtmlReporter from share-po-runner-suite.xml
Intentionally changed 2 tests to fail to see if screenshots are taken

* feature/APPS-delete-html-reporter:failed test assertTrashcanLinkIsDisplayed

* feature/APPS-delete-html-reporter: "Fixed" test

* feature/APPS-delete-html-reporter:revert change
  • Loading branch information
araschitor authored Mar 24, 2021
1 parent 0b4d33b commit eed830a
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected void beforeEachTest(ITestContext iTestContext)
{
setApplicationsContext();
webDriver.set(webDriverFactory.createWebDriver());
//setTestContext(iTestContext, webDriver.get());
setTestContext(iTestContext, webDriver.get());

userDashboardPage = new UserDashboardPage(webDriver);
}
Expand Down Expand Up @@ -207,9 +207,9 @@ protected void deleteSitesIfNotNull(SiteModel... sites)
}
}

/*private ITestContext setTestContext(ITestContext iTestContext, WebDriver driver)
private ITestContext setTestContext(ITestContext iTestContext, WebDriver driver)
{
iTestContext.setAttribute("driver", driver);
return iTestContext;
}*/
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.alfresco.share;

import lombok.extern.slf4j.Slf4j;
import org.openqa.selenium.WebDriver;
import org.testng.ITestContext;
import org.testng.ITestListener;
import org.testng.ITestResult;
Expand All @@ -24,8 +25,8 @@ public void onTestSuccess(ITestResult result)
public void onTestFailure(ITestResult result)
{
log.warn("TEST FAILED: {}", result.getMethod().getMethodName());
// WebDriver webDriver = (WebDriver) result.getTestContext().getAttribute("driver");
// captureAndSaveScreenshot(webDriver, result);
WebDriver webDriver = (WebDriver) result.getTestContext().getAttribute("driver");
captureAndSaveScreenshot(webDriver, result);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="SharePoSuite">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.utility.testrail.TestRailExecutorListener"/>
<listener class-name="org.alfresco.utility.testng.OSTestMethodSelector"/>
</listeners>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Admin Tools Test Suite" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="User and Authentication Tests For AIMS" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Content Tests" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Content Tests" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Site Members Tests" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="User Dashboard Tests" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="User and Authentication Tests" parallel="classes" thread-count="3">
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
<listener class-name="org.alfresco.share.RetryListener"/>
</listeners>

Expand Down

0 comments on commit eed830a

Please sign in to comment.