Closed rodolfonoviski closed 6 years ago
Hi @rodolfonoviski,
that command is slightly wrong.
The separator is a slash (e.g. ApexClass/FooTest
) and the --template
(deprecated) respectively -f
expects the path to a package.xml file instead of a folder.
Please iteratively check the output of all parts of the command:
The first part should list the names of your test classes (with a leading ApexClass/
each).
$ force-dev-tool package -f config/deployments/deploy2212/package.xml grep 'ApexClass/*Test'
The next command should strip off the leading ApexClass/
per line.
$ force-dev-tool package -f config/deployments/deploy2212/package.xml grep 'ApexClass/*Test' | cut -d '/' -f 2
If this was all correct, you should be able to put everything together in order to perform the deployment:
$ force-dev-tool package -f config/deployments/deploy2212/package.xml grep 'ApexClass/*Test' | cut -d '/' -f 2 | xargs -0 force-dev-tool deploy -d config/deployments/deploy2212 --runTests
When trying to run the command:
$ force-dev-tool package grep 'ApexClass\*Test' -- template config/deployments/deploy2212 | cut -d '\' -f 2 | xargs -0 force-dev-tool deploy -d config/deployments/deploy2212/ --runTests
is not running any test class