diff --git a/docs/src/docs/best-practices/html-elements.adoc b/docs/src/docs/best-practices/html-elements.adoc index 6c8fcf1e68..47b5158a6d 100644 --- a/docs/src/docs/best-practices/html-elements.adoc +++ b/docs/src/docs/best-practices/html-elements.adoc @@ -11,12 +11,12 @@ Since radio buttons share the same name, as the following example shows ---- It's not a good practice to select it `By.name`. -Its better to select both options separately. +It's better to select both options separately. [source,java] ---- // Good practice -PreparedLocator locator = LOCATE.prepare("//input[@name='%s' and @value='%s']").unique(); +PreparedLocator locator = LOCATE.prepare("//input[@name='%s' and @value='%s']"); UiElement teeOption = find(locator.with("beverage", "tee")); UiElement coffeeOption = find(locator.with("beverage", "coffee")); diff --git a/docs/src/docs/guielement/guielement-creation.adoc b/docs/src/docs/guielement/guielement-creation.adoc index 083a67cb7b..bf03824f53 100644 --- a/docs/src/docs/guielement/guielement-creation.adoc +++ b/docs/src/docs/guielement/guielement-creation.adoc @@ -195,13 +195,13 @@ UiElement empty = createEmpty(Locator); All interactive operations on this element will do nothing, all wait methods will be false and all assertions will fail. -== Sensible Data +== Sensitive Data -Sensible data, such as passwords, can be displayed obfuscated in the logs during the actions type and sendKeys. +Sensitive data, such as passwords, can be displayed obfuscated in the logs during the actions type and sendKeys. [source,java] ---- -UiElement sensibleElement = findById("secret").sensibleData(); +UiElement sensitiveElement = findById("secret").sensitiveData(); ---- Only the placeholder * is logged in the report instead of the real value. diff --git a/docs/src/docs/reports.adoc b/docs/src/docs/reports.adoc index cf2f1f2b96..9aa1a6fb78 100644 --- a/docs/src/docs/reports.adoc +++ b/docs/src/docs/reports.adoc @@ -7,6 +7,7 @@ include::reports/testdetails.adoc[leveloffset=+1] include::reports/failure-aspects.adoc[leveloffset=+1] include::reports/log-view.adoc[leveloffset=+1] include::reports/threads-view.adoc[leveloffset=+1] +include::reports/timings-view.adoc[leveloffset=+1] include::reports/teststeps.adoc[leveloffset=+1] include::reports/prioritymessages.adoc[leveloffset=+1] include::reports/layout-check.adoc[leveloffset=+1] diff --git a/docs/src/docs/reports/overview.adoc b/docs/src/docs/reports/overview.adoc index bb6fb091c0..ad76aced67 100644 --- a/docs/src/docs/reports/overview.adoc +++ b/docs/src/docs/reports/overview.adoc @@ -8,6 +8,7 @@ A report generated with `Report-NG` consists of these different views: * Failure Aspects - a summary of the different types of failures * Logs - a panel that contains detailed logging information * Threads - a graphical view of the thread activities during the parallel test execution +* Timings - a detailed overview of the execution time of test cases and loading time of sessions image::report-ng-01.png[align="center", alt="Report-NG Dashboard"] diff --git a/docs/src/docs/reports/threads-view.adoc b/docs/src/docs/reports/threads-view.adoc index 35730d7688..e772d7564f 100644 --- a/docs/src/docs/reports/threads-view.adoc +++ b/docs/src/docs/reports/threads-view.adoc @@ -1,17 +1,19 @@ = Threads View -The Threads View displays all activities on the individual worker threads in a gantt chart. For details hover over a testcase to view a tooltip showing the name, its Run-Index, Start- and End-time and the duration. +The Threads View displays all activities on the individual worker threads in a gantt chart. +The y-axis delineates the thread names, while the x-axis portrays the timeline. +Test cases are visualized within the respective threads where they were executed. +For details hover over a test case to view a tooltip showing the name, its Run-Index, Start- and End-time and the duration. Navigation: * Use the mouse wheel to zoom in or out on the time axis. * Click the left button while moving the mouse to scroll horizontally. * Use the scroll bar on the right to scroll vertically. -* Use the zoom bar at the bottom to zoom into a specific area by moving the start and end of the slider or drawing on an area by holding and releasing left click on the slider bar. You can then move the slider along the time axis by dragging it. Filter: -* Use the status filter to focus on all testcases with the selected status. -* Use the method input field to zoom in on a specific testcase. +* Use the status filter to focus on all test cases with the selected status. +* Use the method input field to zoom in on a specific test case. image::report-ng-threads-view.png[align="center", alt="Threads View"] diff --git a/docs/src/docs/reports/timings-view.adoc b/docs/src/docs/reports/timings-view.adoc new file mode 100644 index 0000000000..664615d72b --- /dev/null +++ b/docs/src/docs/reports/timings-view.adoc @@ -0,0 +1,35 @@ += Timings View + +== Tests tab pane +All executed test cases are included in a bar chart, grouped in ranges by their execution time. +By hovering over a bar the methods within this range are listed in a tooltip. + +It is possible to adjust the number of method ranges by selecting a value of 5, 10, 15 or 20 in the corresponding drop-down menu. +This way you can adjust the resolution of the chart. + +You can also search for a specific method by entering the name of the test case in the searchbar. +The corresponding bar is then highlighted. + +By default, only the test methods themselves are included. +However, it is possible to incorporate the configuration methods by toggling the switch located in the top right corner of the view. + +image::report-ng-timings-view_tests.png[align="center", alt="Tests"] + +== Sessions tab pane +In the scatter chart you can see every session that was started in the test execution. +On the x-axis, the starting time of session is indicated, while the loading duration is represented on the y-axis. + +When hovering over any of the dots, a tooltip appears providing details regarding the browser and its version, the session name and ID, along with the test cases executed within that session. + +If a base URL is configured, the load duration and timestamp of the base URL are also displayed. +In this scenario, the two dots are linked, as the base URL is consistently loaded at session startup. +Note that setting up a base URL is optional. +If both dots exist, the hover effect will clarify which base URL dot corresponds to each session dot. + +Navigation: + +* Use the mouse wheel to zoom in or out on the y-axis. +* Move the mouse while holding the left button to scroll vertically. +* It is also possible to use the buttons in the upper right corner to zoom into a specific area, reset the zoom and restore the chart. + +image::report-ng-timings-view_sessions.png[align="center", alt="Sessions"] diff --git a/docs/src/images/report-ng-16.png b/docs/src/images/report-ng-16.png index 8bec9f3be8..d25e6e68ea 100644 Binary files a/docs/src/images/report-ng-16.png and b/docs/src/images/report-ng-16.png differ diff --git a/docs/src/images/report-ng-timings-view_sessions.png b/docs/src/images/report-ng-timings-view_sessions.png new file mode 100644 index 0000000000..89842a11df Binary files /dev/null and b/docs/src/images/report-ng-timings-view_sessions.png differ diff --git a/docs/src/images/report-ng-timings-view_tests.png b/docs/src/images/report-ng-timings-view_tests.png new file mode 100644 index 0000000000..c8ada52139 Binary files /dev/null and b/docs/src/images/report-ng-timings-view_tests.png differ diff --git a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/GuiElement.java b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/GuiElement.java index c0c6c2b0b1..ecb1f86353 100644 --- a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/GuiElement.java +++ b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/GuiElement.java @@ -32,10 +32,10 @@ import eu.tsystems.mms.tic.testframework.logging.Loggable; import eu.tsystems.mms.tic.testframework.pageobjects.internal.DefaultLocator; import eu.tsystems.mms.tic.testframework.pageobjects.internal.UiElementFactory; -import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.LegacyGuiElementAssertWrapper; import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.DefaultUiElementAssertion; import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.GuiElementAssert; import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.GuiElementAssertDescriptionDecorator; +import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.LegacyGuiElementAssertWrapper; import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.PerformanceTestGuiElementAssert; import eu.tsystems.mms.tic.testframework.pageobjects.internal.asserts.UiElementAssertion; import eu.tsystems.mms.tic.testframework.pageobjects.internal.core.AbstractGuiElementCore; @@ -49,12 +49,6 @@ import eu.tsystems.mms.tic.testframework.report.Report; import eu.tsystems.mms.tic.testframework.testing.WebDriverManagerProvider; import eu.tsystems.mms.tic.testframework.webdriver.WebDriverFactory; -import java.awt.Color; -import java.io.File; -import java.util.List; -import java.util.function.Consumer; -import java.util.function.Predicate; -import java.util.stream.Collectors; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.Point; @@ -62,6 +56,13 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; +import java.awt.Color; +import java.io.File; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Predicate; +import java.util.stream.Collectors; + /** * GuiElement is the access point for most tests and is an extension of WebElement. *

@@ -76,8 +77,8 @@ public class GuiElement implements UiElement, NameableChild, Loggable /** * Get lazy initialized by {@link #asserts()} * Is one of: - * {@link #collectableAssert} - * {@link #instantAssert} + * {@link #collectableAssert} + * {@link #instantAssert} */ private GuiElementAssert defaultAssert; /** @@ -104,10 +105,10 @@ public class GuiElement implements UiElement, NameableChild, Loggable private final GuiElementData guiElementData; /** * This facade contains - * {@link #core} - * {@link GuiElementCoreSequenceDecorator} - * {@link UiElementLogger} - * {@link DelayActionsGuiElementFacade} + * {@link #core} + * {@link GuiElementCoreSequenceDecorator} + * {@link UiElementLogger} + * {@link DelayActionsGuiElementFacade} */ private GuiElementCore decoratedCore; private GuiElementWait decoratedWait; @@ -150,7 +151,7 @@ protected GuiElement(GuiElementData data, GuiElementCore core) { */ GuiElement(GuiElementCore core) { this.core = core; - AbstractGuiElementCore realCore = (AbstractGuiElementCore)core; + AbstractGuiElementCore realCore = (AbstractGuiElementCore) core; guiElementData = realCore.guiElementData; guiElementData.setGuiElement(this); createDecorators(); @@ -213,7 +214,6 @@ private void createDecorators() { * Different filters can be applied in conjunction (and). * * @param filter Filters to be applied - * * @return The same GuiElement * @deprecated Use {@link DefaultLocator} instead */ @@ -227,7 +227,6 @@ public GuiElement withWebElementFilter(Predicate filter) { * Add a Decorator to log every action performed on this element with addition to a short description of it. * * @param description A very short description of this GuiElement, for example "Continue Shopping Button" - * * @deprecated Use {@link #setName(String)} instead */ @Deprecated @@ -241,7 +240,6 @@ public GuiElement setDescription(String description) { * given locator. It does not wait for the subelement if the parent has been found! * * @param by Locator of new element. - * * @return GuiElement */ @Deprecated @@ -253,9 +251,8 @@ public GuiElement getSubElement(By by) { * Get sub element by locator. Using this executes a find on the parent element and the parent.findElement for the * given locator. It does not wait for the subelement if the parent has been found! * - * @param by Locator of new element. + * @param by Locator of new element. * @param description Description for GuiElement - * * @return GuiElement */ @Deprecated @@ -267,7 +264,7 @@ public GuiElement getSubElement(By by, String description) { @Deprecated public GuiElement getSubElement(Locator locator) { - return (GuiElement)find(locator); + return (GuiElement) find(locator); } @Override @@ -292,6 +289,7 @@ public UiElement scrollToElement() { decoratedCore.scrollToElement(); return this; } + @Deprecated public UiElement scrollToElement(int yOffset) { decoratedCore.scrollToElement(yOffset); @@ -343,10 +341,8 @@ public UiElement sendKeys(CharSequence... charSequences) { // } /** - * @deprecated - * This method is no longer acceptable as a part of GuiElement. + * @deprecated This method is no longer acceptable as a part of GuiElement. * Use {@link eu.tsystems.mms.tic.testframework.webdrivermanager.DesktopWebDriverUtils#clickAbsolute()} instead - * */ @Override public UiElement clear() { @@ -355,10 +351,8 @@ public UiElement clear() { } /** - * @deprecated - * This method is no longer acceptable as a part of GuiElement. + * @deprecated This method is no longer acceptable as a part of GuiElement. * Use {@link eu.tsystems.mms.tic.testframework.webdrivermanager.DesktopWebDriverUtils#mouseOverAbsolute2Axis()} instead - * */ @Override public InteractiveUiElement hover() { @@ -439,15 +433,14 @@ public UiElementList list() { } /** - * @deprecated - * This method is no longer acceptable as a part of GuiElement. + * @deprecated This method is no longer acceptable as a part of GuiElement. * Use {@link eu.tsystems.mms.tic.testframework.webdrivermanager.DesktopWebDriverUtils#mouseOverJS()} instead - * */ @Deprecated public String getCssValue(String cssIdentifier) { return decoratedCore.getCssValue(cssIdentifier); } + @Deprecated public UiElement mouseOver() { decoratedCore.mouseOver(); @@ -531,10 +524,8 @@ public UiElement rightClick() { } /** - * @deprecated - * This method is no longer acceptable as a part of GuiElement. + * @deprecated This method is no longer acceptable as a part of GuiElement. * Use {@link eu.tsystems.mms.tic.testframework.webdrivermanager.DesktopWebDriverUtils#doubleClickJS()} instead - * */ @Override public UiElement contextClick() { @@ -549,6 +540,7 @@ public File takeScreenshot() { /** * Sets the abstract parent + * * @param parent {@link UiElement} or {@link PageObject} */ public UiElement setParent(Nameable parent) { @@ -558,6 +550,7 @@ public UiElement setParent(Nameable parent) { /** * Retrieves the nameable parent. + * * @return Can be {@link UiElement} or {@link PageObject} */ @Override @@ -580,14 +573,31 @@ public WebDriver getDriver() { return getWebDriver(); } + /** + * @deprecated Use {@link GuiElement#hasSensitiveData()}} instead + */ @Deprecated public boolean hasSensibleData() { - return guiElementData.hasSensibleData(); + return guiElementData.hasSensitiveData(); } + public boolean hasSensitiveData() { + return guiElementData.hasSensitiveData(); + } + + /** + * @deprecated Use {@link GuiElement#sensitiveData()}} instead + */ + @Deprecated @Override public GuiElement sensibleData() { - guiElementData.setHasSensibleData(true); + guiElementData.setHasSensitiveData(true); + return this; + } + + @Override + public GuiElement sensitiveData() { + guiElementData.setHasSensitiveData(true); return this; } @@ -624,7 +634,6 @@ public GuiElementAssert asserts() { * instead of the technical cause like an isDisplayed error. * * @param errorMessage Cause returned on assertion error. - * * @return GuiElementAssert object for functional assertions */ @Deprecated @@ -642,7 +651,7 @@ public GuiElementAssert asserts(String errorMessage) { */ @Deprecated public GuiElementAssert nonFunctionalAsserts() { - if (nonFunctionalAssert==null) { + if (nonFunctionalAssert == null) { OptionalAssertion assertion = Testerra.getInjector().getInstance(OptionalAssertion.class); nonFunctionalAssert = createAssertDecorators(assertion); } @@ -665,7 +674,6 @@ private GuiElementAssert createAssertDecorators(Assertion assertion) { * given as cause, instead of the technical cause like an isDisplayed error. * * @param errorMessage Cause returned on assertion error. - * * @return GuiElementAssert object for non-functional assertions * @deprecated Use {@link #optionalAsserts(String)} instead */ @@ -689,7 +697,9 @@ private GuiElementAssert instantAsserts() { * Provides access to optional assert methods */ @Deprecated - public GuiElementAssert optionalAsserts() { return nonFunctionalAsserts(); } + public GuiElementAssert optionalAsserts() { + return nonFunctionalAsserts(); + } /** * Provides access to optional assert methods @@ -707,7 +717,7 @@ public GuiElementAssert optionalAsserts(String errorMessage) { */ @Deprecated public GuiElementAssert assertCollector() { - if (collectableAssert==null) { + if (collectableAssert == null) { CollectedAssertion assertion = Testerra.getInjector().getInstance(CollectedAssertion.class); collectableAssert = createAssertDecorators(assertion); } @@ -719,7 +729,6 @@ public GuiElementAssert assertCollector() { * instead of the technical cause like an isDisplayed error. * * @param errorMessage Cause returned on assertion error. - * * @return GuiElementAssert object for functional assertions */ @Deprecated @@ -730,7 +739,7 @@ public GuiElementAssert assertCollector(String errorMessage) { @Deprecated public List getList() { - return list().stream().map(uiElement -> (GuiElement)uiElement).collect(Collectors.toList()); + return list().stream().map(uiElement -> (GuiElement) uiElement).collect(Collectors.toList()); } @Deprecated @@ -771,7 +780,7 @@ public String createXPath() { do { String elementPath = XPath.byToXPath(guiElementData.getLocate().getBy()); if (guiElementData.getIndex() >= 0) { - elementPath += "["+guiElementData.getIndex()+"]"; + elementPath += "[" + guiElementData.getIndex() + "]"; } sb.insert(0, elementPath); guiElementData = guiElementData.getParent(); diff --git a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/UiElement.java b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/UiElement.java index e7eec61554..426297bdcf 100644 --- a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/UiElement.java +++ b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/UiElement.java @@ -21,27 +21,25 @@ package eu.tsystems.mms.tic.testframework.pageobjects; import eu.tsystems.mms.tic.testframework.common.IProperties; -import eu.tsystems.mms.tic.testframework.common.PropertyManager; import eu.tsystems.mms.tic.testframework.enums.CheckRule; -import eu.tsystems.mms.tic.testframework.internal.Nameable; import eu.tsystems.mms.tic.testframework.pageobjects.internal.core.UiElementBase; import eu.tsystems.mms.tic.testframework.webdriver.WebDriverRetainer; /** * GuiElement with new fluent API support + * * @author Mike Reiche */ public interface UiElement extends - UiElementBase, + UiElementBase, InteractiveUiElement, PageObject, WebDriverRetainer, - UiElementFinder -{ + UiElementFinder { enum Properties implements IProperties { @Deprecated DEFAULT_ASSERT_IS_COLLECTOR("tt.guielement.default.assertcollector", false), - DELAY_BEFORE_ACTION_MILLIS("tt.delay.before.guielement.action.millis",0), + DELAY_BEFORE_ACTION_MILLIS("tt.delay.before.guielement.action.millis", 0), DELAY_AFTER_ACTION_MILLIS("tt.delay.after.guielement.action.millis", 0), CHECK_RULE("tt.guielement.checkrule", CheckRule.IS_DISPLAYED.name()), ELEMENT_TIMEOUT_SECONDS("tt.element.timeout.seconds", 8), @@ -68,6 +66,14 @@ public Object getDefault() { } UiElementList list(); + UiElement shadowRoot(); + + /** + * @deprecated Use {@link UiElement#sensitiveData()}} instead + */ + @Deprecated UiElement sensibleData(); + + UiElement sensitiveData(); } diff --git a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/core/GuiElementData.java b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/core/GuiElementData.java index d386bdd6e6..84bff3c25d 100644 --- a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/core/GuiElementData.java +++ b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/core/GuiElementData.java @@ -32,12 +32,12 @@ /** * Contains the intersecting information of {@link GuiElement} and {@link GuiElementCore} * required for communication or creating new elements. + * * @todo We don't need that actually, when we can have everything in the core */ public class GuiElementData implements - Nameable, - WebDriverRetainer -{ + Nameable, + WebDriverRetainer { private final DefaultLocator locate; private final WebDriver webDriver; private GuiElementData parent; @@ -45,7 +45,7 @@ public class GuiElementData implements private GuiElement guiElement; private String name; private boolean shadowRoot = false; - private boolean sensibleData = false; + private boolean sensitiveData = false; private boolean isFrame = false; /** @@ -92,7 +92,7 @@ public GuiElementData getParent() { @Override public boolean hasOwnName() { - return name!=null; + return name != null; } public DefaultLocator getLocate() { @@ -113,12 +113,12 @@ public GuiElementData setHasShadowRoot(boolean shadowRoot) { return this; } - public boolean hasSensibleData() { - return sensibleData; + public boolean hasSensitiveData() { + return sensitiveData; } - public GuiElementData setHasSensibleData(boolean sensibleData) { - this.sensibleData = sensibleData; + public GuiElementData setHasSensitiveData(boolean sensitiveData) { + this.sensitiveData = sensitiveData; return this; } @@ -141,7 +141,7 @@ public String getName(boolean detailed) { if (!hasName || detailed) { sb.append("(").append(locate); if (index != -1) { - sb.append("[").append(index+1).append("]"); + sb.append("[").append(index + 1).append("]"); } sb.append(")"); } @@ -162,6 +162,7 @@ public String getName() { public int getIndex() { return index; } + public boolean isFrame() { return isFrame; } diff --git a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/facade/UiElementLogger.java b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/facade/UiElementLogger.java index 54ad95770c..77b7bffdfd 100644 --- a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/facade/UiElementLogger.java +++ b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/pageobjects/internal/facade/UiElementLogger.java @@ -19,12 +19,13 @@ * under the License. * */ - package eu.tsystems.mms.tic.testframework.pageobjects.internal.facade; +package eu.tsystems.mms.tic.testframework.pageobjects.internal.facade; import eu.tsystems.mms.tic.testframework.logging.Loggable; import eu.tsystems.mms.tic.testframework.pageobjects.GuiElement; import eu.tsystems.mms.tic.testframework.pageobjects.internal.core.AbstractGuiElementCoreDecorator; import eu.tsystems.mms.tic.testframework.pageobjects.internal.core.GuiElementCore; + import java.util.Arrays; import java.util.stream.Collectors; @@ -40,13 +41,13 @@ public UiElementLogger( this.guiElement = guiElement; } - protected void beforeDelegation(String method, Object ... params) { - log().info(method + "("+ Arrays.stream(params).map(Object::toString).collect(Collectors.joining(", "))+") on " + this.guiElement.toString(false)); + protected void beforeDelegation(String method, Object... params) { + log().info(method + "(" + Arrays.stream(params).map(Object::toString).collect(Collectors.joining(", ")) + ") on " + this.guiElement.toString(false)); } @Override public void type(String text) { - beforeDelegation("type", "\""+(guiElement.hasSensibleData()?"*****************":text)+"\""); + beforeDelegation("type", "\"" + (guiElement.hasSensitiveData() ? "*****************" : text) + "\""); decoratedCore.type(text); afterDelegation(); } diff --git a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/GuiElementAdditionalTests.java b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/GuiElementAdditionalTests.java index 9ffbe83c3a..1144191790 100644 --- a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/GuiElementAdditionalTests.java +++ b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/GuiElementAdditionalTests.java @@ -54,17 +54,19 @@ public void testT01_Upload() { input.sendKeys(absoluteFilePath); } - /** Needs pretest {@link GuiElementAdditional2Tests#testGuiElement_Create_SensibleData}. */ + /** + * Needs pretest {@link GuiElementAdditional2Tests#testGuiElement_Create_SensitiveData}. + */ @Test - public void testT02_SensibleData() { - final String searchStringSensibleData = "facade.UiElementLogger - type(\"*****************\") on UiElement(By.id: 1)"; - final String searchStringNotExisits = "type \"testT02_SensibleData\" on By.id: 1"; + public void testT02_SensitiveData() { + final String searchStringSensitiveData = "facade.UiElementLogger - type(\"*****************\") on UiElement(By.id: 1)"; + final String searchStringNotExists = "type \"testT02_SensitiveData\" on By.id: 1"; - List foundEntries = LOG_4_J_FILE_READER.filterLogForString(searchStringSensibleData); - Assert.assertEquals(foundEntries.size(), 1, String.format("Log should contains string '%s'", searchStringSensibleData)); + List foundEntries = LOG_4_J_FILE_READER.filterLogForString(searchStringSensitiveData); + Assert.assertEquals(foundEntries.size(), 1, String.format("Log should contains string '%s'", searchStringSensitiveData)); - foundEntries = LOG_4_J_FILE_READER.filterLogForString(searchStringNotExisits); - Assert.assertEquals(foundEntries.size(), 0, String.format("Log should not contain string '%s'", searchStringNotExisits)); + foundEntries = LOG_4_J_FILE_READER.filterLogForString(searchStringNotExists); + Assert.assertEquals(foundEntries.size(), 0, String.format("Log should not contain string '%s'", searchStringNotExists)); } @Test diff --git a/integration-tests/src/test/java/io/testerra/test/pretest_guielement/GuiElementAdditional2Tests.java b/integration-tests/src/test/java/io/testerra/test/pretest_guielement/GuiElementAdditional2Tests.java index fe757ba2bc..25a436880d 100644 --- a/integration-tests/src/test/java/io/testerra/test/pretest_guielement/GuiElementAdditional2Tests.java +++ b/integration-tests/src/test/java/io/testerra/test/pretest_guielement/GuiElementAdditional2Tests.java @@ -15,14 +15,14 @@ public class GuiElementAdditional2Tests extends AbstractTestSitesTest { @Test - public void testGuiElement_Create_SensibleData() { + public void testGuiElement_Create_SensitiveData() { final WebDriver driver = getWebDriver(); - GuiElement input = new GuiElement(driver, By.id("1")).sensibleData(); + GuiElement input = new GuiElement(driver, By.id("1")).sensitiveData(); input.assertThat().displayed().is(true); - Assert.assertTrue(input.hasSensibleData()); + Assert.assertTrue(input.hasSensitiveData()); - input.type("testT02_SensibleData"); + input.type("testT02_SensitiveData"); } }