Refactor logging for activation key extraction.
Replaces multiline logging with formatted string for clarity and simplicity. Adds key logging to the test scenario context for better traceability.
This commit is contained in:
1 parent
9959fd42b8
commit
ac27aa0623
1 file changed
+5
-3
@@ -101,12 +101,14 @@ public class TempMailAPISteps extends Steps {
|
||||
Matcher matcher = pattern.matcher(email.getHtml());
|
||||
|
||||
if (matcher.find()) {
|
||||
log.info("""
|
||||
String key = """
|
||||
ESET Smart Security activation key found:
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
{}
|
||||
%s
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
""", matcher.group());
|
||||
""".formatted(matcher.group());
|
||||
|
||||
getContext().getScenario().log(key);
|
||||
} else {
|
||||
throw new RuntimeException("Activation key not found");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user