forcedotcom / ApexUnit

ApexUnit is a powerful continuous integration tool for the Force.com platform
BSD 3-Clause "New" or "Revised" License
71 stars 51 forks source link

Added flag to fail execution when no test classes exist for specified manifest and/or regex only if it's set to true #80

Open lukaszkostrzewa opened 4 years ago

lukaszkostrzewa commented 4 years ago

Currently, when no test class is found for specified manifest and/or regex, then the execution fails. I've added a flag -require.at.least.one.test which doesn't fail the execution in such a scenario unless it's set to true (which is a default value).

Motivation: our case is that we are running tests while validating Pull Requests in our CI/CD pipeline and we are running only these tests which have changed or which source classes have changed, e.g. when MyClassApex has changed, then we are running test MyClassApexTest. We are simply appending 'Test' to the class name (by convention) but not all classes have tests and in such a situation, we don't want to fail the build.

Feel free to merge, maybe someone will have a similar situation to ours :)

salesforce-cla[bot] commented 4 years ago

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Kostrzewa, Lukasz l***@s***.com. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated.

lukaszkostrzewa commented 4 years ago
Expected feature release number in range of 9 to 14, but got: 7

How about adding dist: trusty to .travis.yml?

https://travis-ci.community/t/error-installing-oraclejdk8-expected-feature-release-number-in-range-of-9-to-14-but-got-8/3766/4