cli
cli copied to clipboard
mdapi:deploy and source:deploy need test results file output
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.
+1 on this. The ability to print a JUnit file in source:deploy is huge for Out of the Box CI/CD test parsing.
I think this is a required feature of the CLI for integration with a CI.
I would like to add that not only should the force:mdapi:deploy
and force:source:deploy
commands have the option to return test resuts, but also their equivilant report
commands as well.
force:mdapi:deploy:report -i ... -f test_results.xml -r junit
force:source:deploy:report -i ... -f test_result.xml -r junit
Without this currently in place, is there a workaround to getting the results after the deploy
command has completed? Or can we only rely on the output of the report command?
+1 on this. The ability to print a JUnit file in source:deploy is huge for Out of the Box CI/CD test parsing.
+1. We need it for validate new code using Sonar Cloud too. Without a proper test report generated from mdapi:deploy -c, if using apex:test:run, we are only able to get test result from code that are already deployed on cloud, which is not reliable.
any update on this topic? we are facing exactly the same issue :(
+1 on this. The ability to print a JUnit file in source:deploy is huge for Out of the Box CI/CD test parsing.
+1. We need it for validate new code using Sonar Cloud too. Without a proper test report generated from mdapi:deploy -c, if using apex:test:run, we are only able to get test result from code that are already deployed on cloud, which is not reliable.
+1
+1
+1
Just wanted to weigh back in here and say, I could still use this feature.
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