Package com.codeborne.selenide.junit5
Class SoftAssertsExtension
- java.lang.Object
-
- com.codeborne.selenide.junit5.SoftAssertsExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension
public class SoftAssertsExtension extends java.lang.Object implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallbackBy using this extension selenide will collect all failed asserts from "should*" and "waitUntil" methods and throw after test finished.
To use extension extend you test class with it:
@ExtendWith({SoftAssertsExtension.class}
Or register extension in test class:
@RegisterExtension static SoftAssertsExtension softAsserts = new SoftAssertsExtension();- Since:
- 4.12.2
-
-
Constructor Summary
Constructors Constructor Description SoftAssertsExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEach(org.junit.jupiter.api.extension.ExtensionContext context)voidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext context)ErrorsCollectorgetErrorsCollector()
-
-
-
Method Detail
-
getErrorsCollector
public ErrorsCollector getErrorsCollector()
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
afterEachin interfaceorg.junit.jupiter.api.extension.AfterEachCallback
-
-