Skip to content
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

BCPT Test Report #619

Merged
merged 137 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 120 commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
78e6dfb
test deploy failure
freddydk Jul 18, 2023
a316135
add bcptline
freddydk Jul 18, 2023
e0fddc5
bcpt
freddydk Jul 19, 2023
d51bee0
test settings
freddydk Jul 20, 2023
b2f4016
Merge branch 'microsoft:main' into bcptreport
freddydk Jul 20, 2023
415c1f3
Add bcpt test analyzer
freddydk Jul 23, 2023
98966e0
sb
freddydk Jul 23, 2023
d8016fc
ave
freddydk Jul 23, 2023
99de5d3
ps5 support
freddydk Jul 23, 2023
8816ff5
vars
freddydk Jul 24, 2023
3a84ebc
TODOs
freddydk Jul 24, 2023
0818399
collect
freddydk Jul 24, 2023
9be367e
display operation name if codeunit or suite change
freddydk Jul 24, 2023
effdfa0
add tests
freddydk Jul 24, 2023
7fa0b49
tests
freddydk Jul 25, 2023
8a55ea7
add .md tests
freddydk Jul 26, 2023
aa79886
tests + issue errors and warnings
freddydk Jul 26, 2023
32a6cd9
move function
freddydk Jul 26, 2023
cfff324
remove codeunitno
freddydk Jul 26, 2023
0f5d4d2
temp
freddydk Jul 26, 2023
7a63ec3
use heavy checkmark
freddydk Jul 26, 2023
2301c25
use skipped when N/A
freddydk Jul 26, 2023
3914ec4
use question for skip
freddydk Jul 26, 2023
a4d7ba6
only for scenarios
freddydk Jul 26, 2023
ef467bf
expect no err+warn
freddydk Jul 27, 2023
a452d24
set failuresSummaryMD
freddydk Jul 27, 2023
bb658fe
different threshold
freddydk Jul 27, 2023
6465183
fix tests
freddydk Jul 27, 2023
6b9a932
Merge branch 'main' into bcptreport
freddydk Jul 31, 2023
e44a2bc
Add UTF8 encoding on SUMMARY
freddydk Jul 31, 2023
362ea9b
release notes
freddydk Jul 31, 2023
fcc42f0
Merge branch 'main' into bcptreport
freddydk Aug 4, 2023
efe9b40
Merge branch 'main' into bcptreport
freddydk Aug 9, 2023
31942b2
move
freddydk Aug 9, 2023
a3a70c6
add columns
freddydk Aug 9, 2023
ae44922
format
freddydk Aug 9, 2023
d676bf8
bold
freddydk Aug 9, 2023
ce81606
other formatting
freddydk Aug 9, 2023
c992cd1
format
freddydk Aug 9, 2023
7af00ed
settings
freddydk Aug 9, 2023
8f5a2d6
fix tests
freddydk Aug 10, 2023
42c2fe3
test
freddydk Aug 10, 2023
897ec58
fix tests
freddydk Aug 10, 2023
ff0856f
fix review
freddydk Aug 10, 2023
bbca5d6
errs and warnings
freddydk Aug 10, 2023
e52c117
move ms to header
freddydk Aug 10, 2023
17fc35d
add baseline text
freddydk Aug 10, 2023
a230378
Merge branch 'main' into bcptreport
freddydk Aug 17, 2023
39bc5a2
Merge branch 'main' into bcptreport
freddydk Aug 22, 2023
d8e04a0
Merge branch 'main' into bcptreport
freddydk Aug 26, 2023
5ddacd3
Merge branch 'main' into bcptreport
freddydk Sep 7, 2023
4298bea
Merge branch 'main' into bcptreport
freddydk Sep 7, 2023
f8fc0dd
fix PSSA
freddydk Sep 7, 2023
e370a9d
PSSA
freddydk Sep 7, 2023
c37c97c
Test failure
freddydk Sep 8, 2023
d957fba
Merge branch 'main' into bcptreport
freddydk Sep 8, 2023
e4f9a13
Merge branch 'main' into bcptreport
freddydk Sep 13, 2023
001624a
Merge branch 'main' into bcptreport
freddydk Sep 15, 2023
82c2b19
Add thresholds file
freddydk Sep 19, 2023
bed8e4c
dump using
freddydk Sep 19, 2023
1c2345c
thresholds
freddydk Sep 19, 2023
cbd32c1
5 and 10
freddydk Sep 19, 2023
e1b850e
fix tests
freddydk Sep 19, 2023
558d19c
dumps
freddydk Sep 19, 2023
2dd0b12
ordered
freddydk Sep 19, 2023
6a685f6
remove dumps
freddydk Sep 19, 2023
f01ba63
Merge branch 'main' into bcptreport
freddydk Sep 20, 2023
ee458cd
Merge branch 'main' into bcptreport
freddydk Sep 23, 2023
d484373
Merge branch 'main' into bcptreport
freddydk Sep 27, 2023
0c0a392
Merge branch 'main' into bcptreport
freddydk Sep 28, 2023
ed72557
Merge branch 'main' into bcptreport
freddydk Sep 29, 2023
9b0799f
Merge branch 'main' into bcptreport
freddydk Sep 29, 2023
b7297b5
Merge branch 'main' into bcptreport
freddydk Sep 30, 2023
9830d21
Merge branch 'main' into bcptreport
freddydk Oct 2, 2023
08a4074
Merge branch 'main' into bcptreport
freddydk Oct 17, 2023
2e26378
Merge branch 'main' into bcptreport
freddydk Oct 26, 2023
666f1de
Merge branch 'main' into bcptreport
freddydk Nov 28, 2023
38476cb
spaces
freddydk Dec 5, 2023
9955450
Merge branch 'main' into bcptreport
freddydk Dec 5, 2023
800af5b
use local containerhelper
freddydk Dec 5, 2023
b94fb8f
Merge branch 'bcptreport' of https://github.com/freddydk/AL-Go into b…
freddydk Dec 5, 2023
bacf6c1
summary
freddydk Dec 5, 2023
5df4b8a
return empty
freddydk Dec 5, 2023
9e978a3
do not add bcpt section
freddydk Dec 6, 2023
7f944e6
Merge branch 'main' into bcptreport
freddydk Dec 9, 2023
b0789ae
move
freddydk Dec 9, 2023
10f98f2
move
freddydk Dec 9, 2023
d05c83d
Merge branch 'main' into bcptreport
freddydk Dec 11, 2023
6fb8db5
Merge branch 'main' into bcptreport
freddydk Dec 11, 2023
6488d63
Merge branch 'main' into bcptreport
freddydk Dec 12, 2023
08afe3f
Merge branch 'main' into bcptreport
freddydk Dec 12, 2023
880e917
Merge branch 'main' into bcptreport
freddydk Dec 14, 2023
1f5be04
do not use special naming
freddydk Dec 15, 2023
50c3a61
Merge branch 'bcptreport' of https://github.com/freddydk/AL-Go into b…
freddydk Dec 15, 2023
c1a27cc
nuget test
freddydk Dec 16, 2023
cb4fb8d
fix
freddydk Dec 16, 2023
19fe9d7
remove nuget fix
freddydk Dec 16, 2023
fc61cdf
remove nuget fox
freddydk Dec 16, 2023
eef7835
dup
freddydk Dec 16, 2023
c951150
get 100 branches for direct AL-Go
freddydk Dec 16, 2023
1c7a6f9
Merge branch 'main' into bcptreport
freddydk Jan 24, 2024
0a6c2e6
Merge branch 'main' into bcptreport
freddydk Jan 26, 2024
5362b26
Merge branch 'main' into bcptreport
freddydk Feb 20, 2024
46f1d83
Merge branch 'main' into bcptreport
freddydk Feb 21, 2024
d2eeed8
Merge branch 'main' into bcptreport
freddydk Apr 13, 2024
274ec66
release notes
freddydk Apr 13, 2024
102b220
Merge branch 'main' into bcptreport
freddydk May 14, 2024
6a3fe1a
release notes
freddydk May 14, 2024
bc4a60d
bcptThresholds setting
freddydk May 14, 2024
90d75e0
use hashtable
freddydk May 14, 2024
970f390
Merge branch 'main' into bcptreport
freddydk May 15, 2024
0868f63
Merge branch 'main' into bcptreport
freddydk May 16, 2024
2d534b9
default
freddydk May 16, 2024
640592f
Merge branch 'bcptreport' of https://github.com/freddydk/AL-Go into b…
freddydk May 16, 2024
5a4c4b6
doc
freddydk May 16, 2024
a576434
documentation
freddydk May 16, 2024
6420e7e
line
freddydk May 16, 2024
5c3aff1
note
freddydk May 16, 2024
e620abe
doc
freddydk May 16, 2024
06f5a3a
scenario
freddydk May 16, 2024
7f4e00c
review
freddydk May 16, 2024
63db447
Update Scenarios/AddAPerformanceTestApp.md
freddydk May 16, 2024
cb10c89
parameter name
freddydk May 16, 2024
cc0fb64
Merge branch 'bcptreport' of https://github.com/freddydk/AL-Go into b…
freddydk May 16, 2024
bc1e51e
review
freddydk May 28, 2024
a96cd3f
Merge branch 'main' into bcptreport
freddydk May 28, 2024
e2210c2
Update Scenarios/AddAPerformanceTestApp.md
freddydk Jun 3, 2024
fdaa280
Merge branch 'main' into bcptreport
freddydk Jun 5, 2024
4b7de6f
Merge branch 'main' into bcptreport
freddydk Jun 7, 2024
61cbaa7
move
freddydk Jun 7, 2024
1627b2b
merge error
freddydk Jun 17, 2024
6336435
Merge branch 'main' into bcptreport
freddydk Jun 18, 2024
954bfda
Update Tests/AnalyzeTests.Test.ps1
freddydk Jun 20, 2024
082a94c
check appname
freddydk Jun 20, 2024
f1dfe50
syntax err
freddydk Jun 20, 2024
831529a
review
freddydk Jun 21, 2024
f974b9e
Merge branch 'main' into bcptreport
freddydk Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,12 @@ function ReadSettings {
"buildModes" = @()
"useCompilerFolder" = $false
"pullRequestTrigger" = "pull_request_target"
"bcptThresholds" = [ordered]@{
"DurationWarning" = 10
"DurationError" = 25
"NumberOfSqlStmtsWarning" = 5
"NumberOfSqlStmtsError" = 10
}
"fullBuildPatterns" = @()
"excludeEnvironments" = @()
"alDoc" = [ordered]@{
Expand Down
46 changes: 31 additions & 15 deletions Actions/AnalyzeTests/AnalyzeTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[Parameter(HelpMessage = "Specifies the parent telemetry scope for the telemetry signal", Mandatory = $false)]
[string] $parentTelemetryScopeJson = '7b7d',
[Parameter(HelpMessage = "Project to analyze", Mandatory = $false)]
[string] $project
[string] $project = '.'
)

$telemetryScope = $null
Expand All @@ -17,25 +17,41 @@ try {
. (Join-Path -Path $PSScriptRoot 'TestResultAnalyzer.ps1')

$testResultsFile = Join-Path $ENV:GITHUB_WORKSPACE "$project\TestResults.xml"
if (Test-Path $testResultsFile) {
$testResults = [xml](Get-Content "$project\TestResults.xml")
$testResultSummary = GetTestResultSummary -testResults $testResults -includeFailures 50
$testResultsSummaryMD, $testResultsfailuresMD, $testResultsFailuresSummaryMD = GetTestResultSummaryMD -path $testResultsFile

Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "TestResultMD=$testResultSummary"
Write-Host "TestResultMD=$testResultSummary"
$settings = $env:Settings | ConvertFrom-Json
Write-Host "thresholds type: $($settings.bcptThresholds.GetType().FullName)"
freddydk marked this conversation as resolved.
Show resolved Hide resolved
$bcptTestResultsFile = Join-Path $ENV:GITHUB_WORKSPACE "$project\bcptTestResults.json"
$bcptBaseLineFile = Join-Path $ENV:GITHUB_WORKSPACE "$project\bcptBaseLine.json"
$bcptThresholdsFile = Join-Path $ENV:GITHUB_WORKSPACE "$project\bcptThresholds.json"
freddydk marked this conversation as resolved.
Show resolved Hide resolved
$bcptSummaryMD = GetBcptSummaryMD `
-path $bcptTestResultsFile `
-baseLinePath $bcptBaseLineFile `
-thresholdsPath $bcptThresholdsFile `
-bcptThresholds ($settings.bcptThresholds | ConvertTo-HashTable)

Add-Content -path $ENV:GITHUB_STEP_SUMMARY -value "$($testResultSummary.Replace("\n","`n"))`n"
# If summary fits, we will display it in the GitHub summary
if ($testResultsSummaryMD.Length -gt 65000) {
# If Test results summary is too long, we will not display it in the GitHub summary, instead we will display a message to download the test results
$testResultsSummaryMD = "<i>Test results summary size exceeds GitHub summary capacity. Download **TestResults** artifact to see details.</i>"
}
else {
Write-Host "Test results not found"
# If summary AND BCPT summary fits, we will display both in the GitHub summary
if ($testResultsSummaryMD.Length + $bcptSummaryMD.Length -gt 65000) {
# If Combined Test Results and BCPT summary exceeds GitHub summary capacity, we will not display the BCPT summary
$bcptSummaryMD = "<i>Performance test results summary size exceeds GitHub summary capacity. Download **BcptTestResults** artifact to see details.</i>"
}

$bcptTestResultsFile = Join-Path $ENV:GITHUB_WORKSPACE "$project\BCPTTestResults.json"
if (Test-Path $bcptTestResultsFile) {
# TODO Display BCPT Test Results
# If summary AND BCPT summary AND failures summary fits, we will display all in the GitHub summary
if ($testResultsSummaryMD.Length + $testResultsfailuresMD.Length + $bcptSummaryMD.Length -gt 65000) {
# If Combined Test Results, failures and BCPT summary exceeds GitHub summary capacity, we will not display the failures details, only the failures summary
$testResultsfailuresMD = $testResultsFailuresSummaryMD
}
else {
#Add-Content -path $ENV:GITHUB_STEP_SUMMARY -value "*BCPT test results not found*`n`n"

Add-Content -Encoding UTF8 -path $ENV:GITHUB_STEP_SUMMARY -value "## Test results`n`n"
Add-Content -Encoding UTF8 -path $ENV:GITHUB_STEP_SUMMARY -value "$($testResultsSummaryMD.Replace("\n","`n"))`n`n"
Add-Content -Encoding UTF8 -path $ENV:GITHUB_STEP_SUMMARY -value "$($testResultsfailuresMD.Replace("\n","`n"))`n`n"
if ($bcptSummaryMD) {
Add-Content -Encoding UTF8 -path $ENV:GITHUB_STEP_SUMMARY -value "## Performance test results`n`n"
Add-Content -Encoding UTF8 -path $ENV:GITHUB_STEP_SUMMARY -value "$($bcptSummaryMD.Replace("\n","`n"))`n`n"
}

TrackTrace -telemetryScope $telemetryScope
Expand Down
Loading
Loading