reportportal / reportportal

Main Repository. ReportPortal starts here - see readme below.
http://reportportal.io
Apache License 2.0
1.74k stars 467 forks source link

Actionable Pattern Analysis (aka Categorize based on partial text matching) #1709

Open aprabh001c opened 2 years ago

aprabh001c commented 2 years ago

We have tried integrating TestCafe with reportportal. Whenever a failure occurs with TestCafe automation log sent to reportportal looks as mentioed in below example. Is there a way we can just match partial text of failure log and categorize it. Instead of matching entire text, if log contains "AssertionError: pageobjects, verifyPageUrl:" then categories it.

Example Failure Log:

AssertionError: pageobjects, verifyPageUrl: expected urlSegment approval did not match actual url xxxx: expected false to be truthy
Browser: Chrome 99.0.4844.84 / Linux 0.0
Screenshot: /app/automation/reports/screenshots/2022-03-28_08-54-03/test-65/run-3/Chrome_99.0.4844.84_Linux_0.0/errors/1.png
   32 |        };
   33 |        return false;
   34 |    });
   35 |    const getLocation = ClientFunction(() => document.location.href);
   36 |    await t.expect(checkUrlSegment(urlSegment))
 > 37 |        .ok(WebUiActions, verifyPageUrl: expected urlSegment ${urlSegment} did not match actual url ${await getLocation()});
   38 |};
   39 |_

any help here would be great

DzmitryHumianiuk commented 10 months ago

@aprabh001c, we offer a functionality as https://reportportal.io/docs/analysis/PatternAnalysis/ that can identify matching text in failed logs or even partial text matches.

Currently, it highlights the pattern present in the failed test only.

I believe the implementation of Actionable Pattern Analysis might address this concern. If a pattern matches, we can initiate actions such as: