question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mdapi:deploy and source:deploy need test results file output

See original GitHub issue

My continuous integration process performs a check only deployment to a sandbox and runs all the unit tests. This ensures the code is deployable, and the tests passing before we allow code to be merged into master.

What are you trying to do Generate a junit compatible test results file from a deployment that my CI tool can consume.

Describe the solution you’d like

force:mdapi:deploy ... --testresultsfile test_results.xml --testresultsformat junit
force:source:deploy ... --testresultsfile test_results.xml --testresultsformat junit

Describe alternatives you’ve considered I believe I could use the json format of the deploy command, and write a script to read out the test results into a junit file. If I did this, we would lose the progress updates, and my script would also have to read and print out the other build results for human consumption.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:9

github_iconTop GitHub Comments

5reactions
MGarfOppLoanscommented, Aug 5, 2019

+1 on this. The ability to print a JUnit file in source:deploy is huge for Out of the Box CI/CD test parsing.

2reactions
loganmcommented, May 30, 2022

To anyone following this issue, It looks like this will be implemented in 7.153.0

I still need to test it myself

https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#71530-june-2-2022-stable-rc

Read more comments on GitHub >

github_iconTop Results From Across the Web

mdapi Commands | Salesforce CLI Command Reference
Output JUnit test results. Type: boolean. Aliases for force:mdapi:deploy.
Read more >
Does SFDX force:mdapi:deploy respect .forceignore file?
.forceignore file works only with the source command sfdx force:source:push which is intended to be used with scratch orgs.
Read more >
Metadata API Developer Guide
Deploying and Retrieving Metadata with the Zip File . ... deploy command depending on your development and testing needs.
Read more >
Tasks Reference - CumulusCI 3.71.0 documentation
If set, the namespace tokens in files and filenames are replaced with the ... If True, performs a test deployment (validation) of components...
Read more >
sfdx force:mdapi:deploy - Fig.io
Deploy metadata to an org using Metadata API. ... -l, --testlevel <testlevel>, Deployment testing level ... --verbose, Verbose output of deploy results.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found