I have implemented CI/CD Process and its working fine but taking 13 minutes in each org ( because currently i have implemented run all test classes )

So I want an idea from you guys which can be implemented in such a way that i can run specific test classes only which i need.

I am using salesforce cli , jenkins , bitbucked , vs code.

One idea is on my mind is :- We have put all test classes names in one xml file and when ever we make a test class we can keep adding names in that file & call those in my shell script with a specific test run command , i dont know if its a good idea . So i need these kind of ideas or links , please share

Thanks in advance.

  • I would suggest using sfdx force:apex:test:run --classnames "TestA,TestB" --resultformat tap --codecoverage in Terminal of VS Code or check the following links - salesforce.stackexchange.com/questions/266576/…, salesforce.stackexchange.com/questions/271570/… Sep 15, 2020 at 10:44
  • 1
    Right but my question was how i can do this via pipeline , with these command we need to manually put our test classes always which wont be possible right ? Is there any way to do it automatically? I guess you know , how its works is :- first validation will happen , a validation id will be generated ....so we cannot deploy the id because we need to first run test classes & then deploy ( this process have been automated by me via pipeline ) But with run all test classes which is taking time... Sep 15, 2020 at 13:38


You must log in to answer this question.

Browse other questions tagged .