MK
Size: a a a
MK
AK
AK
K
def take_screenshot(selenium_driver, request):
file_name=request.function.__name__ + '.png'
selenium_driver.save_screenshot('screenshots/' + file_name)
return('screenshots/' + file_name)
....
allure.attach(take_screenshot(selenium_driver, request), name=request.function.__name__, attachment_type=allure.attachment_type.PNG)
Н
def take_screenshot(selenium_driver, request):
file_name=request.function.__name__ + '.png'
selenium_driver.save_screenshot('screenshots/' + file_name)
return('screenshots/' + file_name)
....
allure.attach(take_screenshot(selenium_driver, request), name=request.function.__name__, attachment_type=allure.attachment_type.PNG)
K
БЛ
RS
AE
AE
БЛ
M
SV
M
SV
VA
МС
M
МС
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import static io.qameta.allure.Allure.
parameter;
@Aspect
public class AllureParametersLogAspect {
@Around("execution(@org.junit.jupiter.params.ParameterizedTest * * (..))")
public Object errorDisplay(ProceedingJoinPoint thisJoinPoint) throws Throwable {
Object[] args = thisJoinPoint.getArgs();
MethodSignature methodSignature = (MethodSignature) thisJoinPoint.getStaticPart().getSignature();
String[] parameterNames = methodSignature.getParameterNames();
if (args.length == parameterNames.length) {
for (int i = 0; i < parameterNames.length; i++) {
parameter(parameterNames[i], args[i]);
}
}
return thisJoinPoint.proceed();
}
}
МС