Package allurium.aspects
Class LinkAspects
java.lang.Object
allurium.aspects.LinkAspects
Aspect for enhancing the behavior of the
Link
class by adding Allure reporting capabilities.
This aspect wraps specific methods in the `Link` class to log their execution details as steps in Allure reports. It is designed to improve test reporting by providing visibility into link-related assertions.
Features:
- Wraps the
Link.assertHref(String)
method to log its execution in Allure reports. - Handles success and failure scenarios for assertions with appropriate status updates.
Purpose:
- Enhances the reporting of link assertions in test frameworks.
- Provides detailed logs for `href` validation steps.
Usage Example:
// Using the Link class in tests
Link link = $link("a.example-link");
link.assertHref("https://example.com"); // Automatically logs this assertion in Allure
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
stepAssertHref
(org.aspectj.lang.ProceedingJoinPoint invocation) Wraps the execution ofLink.assertHref(String)
to log it as an Allure step.
-
Constructor Details
-
LinkAspects
public LinkAspects()
-
-
Method Details
-
stepAssertHref
Wraps the execution ofLink.assertHref(String)
to log it as an Allure step.- Parameters:
invocation
- the join point representing the method invocation- Throws:
Throwable
- if the original method throws an exception
-