-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SonarQube Generic Execution Test Data reporter #1738
SonarQube Generic Execution Test Data reporter #1738
Conversation
Nice PR, lacking just a simple changes to approval script for normalization across platforms. As it turns out, I cannot push to your PR branch, so this is the diff diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py
index 148832f..dad2a96 100755
--- a/scripts/approvalTests.py
+++ b/scripts/approvalTests.py
@@ -29,6 +29,7 @@ filelocParser = re.compile(r'''
lineNumberParser = re.compile(r' line="[0-9]*"')
hexParser = re.compile(r'\b(0[xX][0-9a-fA-F]+)\b')
durationsParser = re.compile(r' time="[0-9]*\.[0-9]*"')
+sonarqubeDurationParser = re.compile(r' duration="[0-9]+"')
timestampsParser = re.compile(r'\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}Z')
versionParser = re.compile(r'Catch v[0-9]+\.[0-9]+\.[0-9]+(-develop\.[0-9]+)?')
nullParser = re.compile(r'\b(__null|nullptr)\b')
@@ -138,6 +139,7 @@ def filterLine(line, isCompact):
# strip durations and timestamps
line = durationsParser.sub(' time="{duration}"', line)
+ line = sonarqubeDurationParser.sub(' duration="{duration}"', line)
line = timestampsParser.sub('{iso8601-timestamp}', line)
line = specialCaseParser.sub('file:\g<1>', line)
line = errnoParser.sub('errno', line) |
Codecov Report
@@ Coverage Diff @@
## master #1738 +/- ##
==========================================
- Coverage 87.03% 84.88% -2.15%
==========================================
Files 136 129 -7
Lines 5275 3744 -1531
==========================================
- Hits 4591 3178 -1413
+ Misses 684 566 -118 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1738 +/- ##
==========================================
- Coverage 87.03% 84.88% -2.15%
==========================================
Files 136 129 -7
Lines 5275 3744 -1531
==========================================
- Hits 4591 3178 -1413
+ Misses 684 566 -118 |
@horenmar done! Thank you. |
@sp-dani-garcia is the xml output accepted by SonarQube? I see that in strings there is |
@JoeyGrajciar yes. We have been using this output with SonarQube in our CI for almost a year now with no issues. Could you give an example please? The code was based in the JUnit reporter and I don't see any special treatment there. |
I ended up cherry-picking the commits manually to fix the merge conflict. |
Added a
SonarQube
reporter that createsGeneric Execution Test Data
reportsFor more information check the following documentation: