Beta Package Version Creation Failing Due to Apex Test Outside Package Scope
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo il malfunzionamento con la definizione di scratch-org fornita e sf package version create, quindi esegui sf apex run test --class-names MyProfilePageControllerTest --synchronous per confermare il test che fallisce. Analizza il task CI create_package_version e la selezione dei test di package-version; il lavoro è completato quando la creazione della beta non è bloccata dal malfunzionamento di MyProfilePageControllerTest al di fuori del pacchetto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Related to / reopening: #553
This issue was previously closed in #553 but we are still hitting the same behavior. Beta package version creation fails because Salesforce executes Apex tests that exist in the org but are not part of the package, causing the build to fail on tests we have no control over in the package context.
Description
When running sf package version create for a beta release, the command fails with an Apex Test Failure from a test class (MyProfilePageControllerTest) that is not included in the package source/branch. The test runner is picking up org-level tests beyond the package boundary, which makes the beta pipeline unreliable.
Error from CI logs:
[Error]: Package creation failed with error:
Apex Test Failure:
Class.element.MyProfilePageControllerTest.testSave: line 30,
column 1 System.AssertException: Assertion Failed
Exception in task create_package_version
Steps to Reproduce
- Create a scratch org using the following definition file:
{
"orgName": "Scratch Org",
"adminEmail": "<your-email>",
"edition": "Developer",
"features": ["EnableSetPasswordInApi", "Sites", "COMMUNITIES", "StateAndCountryPicklist"],
"settings": {
"apexSettings": {
"enableDisableParallelApexTesting": false
},
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
},
"experienceBundleSettings": {
"enableExperienceBundleMetadata": true
},
"communitiesSettings": {
"enableNetworksEnabled": true,
"enableOotbProfExtUserOpsEnable": true
},
"customAddressFieldSettings": {
"enableCustomAddressField": true
},
"externalClientAppSettings": {
"enableClientSecretInRestApiAccess": true
}
}
}
- Ensure
MyProfilePageControllerTestexists in the org. - Run the test class directly to confirm it fails:
sf apex run test --class-names MyProfilePageControllerTest --synchronous - Observe the test fails due to
MyProfilePageControllerTest.
Expected Behavior
Test should pass
Actual Behavior
The command fails with System.AssertException: Assertion Failed from MyProfilePageControllerTest.testSave (line 30).
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 571
- Fork
- 80
- Merge medio
- 2g 21h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di forcedotcom/cli
-
investigating validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
forcedotcom/cli#3657 · 2 commenti ·
-
`sf agent preview` fails with `AgentApiNotFound` against staging (aws-stage1) orgs — `stage.api.salesforce.com` missing from endpoint fallbackForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:afdx owned by another team
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
forcedotcom/cli#3645 · 2 commenti ·
-
bug investigating validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
forcedotcom/cli#3644 · 6 commenti ·
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShapeForse già presa @konkonrong-lgtm l’ha presa 56 giorni fa. Apertaarea:afdx bug investigating owned by another team validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
forcedotcom/cli#3625 · 4 commenti ·
-
area:afdx bug owned by another team
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
forcedotcom/cli#3608 · 2 commenti ·
Tutte le issue di forcedotcom/cli
Issue simili
-
Help text refers to commands by alias or without the `pulumi` prefix, plus small wording errorsApertaBug pulumi/pulumi
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
andromarces/agent-loops#571 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nano-Collective/nanocoder#1639 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
stripe/stripe-cli#2130 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
HeroForgeAI/vault-mirror#15 ·
I maintainer di solito rispondono entro 1 giorno