How to ignore failing test #1700
-
Hi, so once you are getting into the Al:Go groove you quickly read and feel about his abilities how to get moving things smarter/smoother/better. This also includes automated Tests. As this is a thing going for a while now, it is still - at least not for all - a "natural" thing to write good test code. that means while a lot of effort is now put into writing those it is quite likely that the test fails "for no purpose/upsi didn't know it has to be written like this". So I am curious if there is a "proceed with errors" we could potentially use in a condition such that we are ok with running but failing tests. I know I can add a "doNotRunTests" ... but that is not what I want. Maybe more a "errors as warnings" .. I know, I know. that is definitely what it should be on a regular well oiled machine. But especially in the beginning with a lot of "trial and error" waiting x amount of minutes just to get told, well, the test failed because the developer, building tests around working code missed the return the value .... is exhausting :) while thinking about it, i don't even want that as well, as I want to see a diff between error and warning... I just don't want to care about it :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, @KristofKlein You wish is a bit against the concept of tests: to ensure certain quality. If a test fails, the quality isn't met. I can only suggest disabling the test. The way we do it in BCApps is by adding a RunTestsInBcContainer override: https://github.com/microsoft/BCApps/blob/main/build/scripts/RunTestsInBcContainer.ps1 |
Beta Was this translation helpful? Give feedback.
-
Multiple things you can do... You can create a file called DisabledTests.json and place this in your AL-Go project folder.
wildcards are supported. You can also disable all tests for CI/CD in the beginning (using doNotRunTests in workflow settings for CICD) and then run Test Current every night to run the tests and get the test failures. But the thing you probably are looking for is a setting called failOn, which is error by default - but you should be able to set it to None. and then the pipeline doesn't fail on test failures. |
Beta Was this translation helpful? Give feedback.
Multiple things you can do...
You can create a file called DisabledTests.json and place this in your AL-Go project folder.
format should be:
wildcards are supported.
You can also disable all tests for CI/CD in the beginning (using doNotRunTests in workflow settings for CICD) and then run Test Current every night to run the tests and get the test failures.
But the thing you probably are looking for is a setting called failOn, which is error by default - but you should be able to set it to None. and then the pipeline doesn't fail on test failures.