Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

apextests:trigger --validatepackagecoverage Reports error when overall package coverage is sufficient #1454

Closed
mpaul1 opened this issue Jan 19, 2024 · 1 comment
Labels

Comments

@mpaul1
Copy link

mpaul1 commented Jan 19, 2024

Describe the bug
Running sfp apextests:trigger -u -l RunAllTestsInPackage -n Core --validatepackagecoverage
Fails due to "Error: There are classes that do not satisfy the minimum code coverage of 75%"; even though the overall
package coverage is greater than 75%

=== Test Summary

Name Value
outcome Passed
testsRan 1013
passing 1013
failing
skipped
passRate 100%
failRate 0%
testStartTime Fri Jan 19 2024 3:01:30 AM
testExecutionTime 2729035 ms
testTotalTime 2729035 ms
commandTime 417 ms
hostname https://xxxxxxxx.my.salesforce.com/
orgId xxxxxxxxx
username [email protected]
testRunId 707PV00000AUFJz_707PV00000AUji2
userId 0050z0000083yrNAAQ
packageCoverage 78

Error: There are classes that do not satisfy the minimum code coverage of 75%

sfdx-project config:
"path": "src/Core",
"default": true,
"package": "Core",
"versionNumber": "1.0.68.NEXT",
"type": "source",
"isOptimizedDeployment": false,

Expected behavior
I would expect there would be no error since overall package code coverage was greater than 75%. A warning or informational note would be fine.

Platform Details (please complete the following information):

  • OS: Linux
  • SFP Version: @dxatscale/sfpowerscripts/25.5.3 linux-x64 node-v18.19.0
  • Salesforce CLI(sf cli) Version: @salesforce/cli/2.23.20 linux-x64 node-v18.19.0

Azure Devops Agent Config:
Starting: Initialize job
Agent name: 'linux-release-agent-5d964f6dbf-7tncc'
Agent machine name: 'linux-release-agent-5d964f6dbf-7tncc'
Current agent version: '2.181.2'
Agent running as: 'root'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: NodeTool (0.179.1)
Downloading task: CmdLine (2.178.0)
Downloading task: Bash (3.179.0)
Downloading task: PublishTestResults (2.171.0)
Checking job knob settings.
Finished checking job knob settings.
Start tracking orphan process

@github-actions github-actions bot added the analysis To be decided on how to solution/fix label Jan 19, 2024
@azlam-abdulsalam
Copy link
Contributor

@mpaul1 test coverage is validated individually for each class in the case of source packages

Please check here

https://docs.dxatscale.io/sfpowerscripts/types-of-packaging

@azlam-abdulsalam azlam-abdulsalam added q&a and removed analysis To be decided on how to solution/fix labels Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants