Unit tests are failing after making SKIP_TESTS=false
manishbansal8843 opened this issue · comments
Describe the bug
Unit tests are failing after making SKIP_TESTS=false
To Reproduce
Steps to reproduce the behavior:
- Edit build.sh and update SKIP_TESTS=false.
- Execute sh build.sh
Getting below error.
Failed tests:
BuildIntervalTest.testBuildInterval0:75 expected:<buildInt[rvl12]> but was:<buildInt[erval]>
BuildInfoTest.testBuildInfo0:80 expected:<sonar_url[]> but was:<sonar_url[21]>
TransitionStatusTest.testupdateQueryValues:168 expected:<...artdate = '1970-01-2[6', enddate='1970-01-0]1', Remarks='remarks...> but was:<...artdate = '1970-01-2[5',enddate='1969-12-3]1', Remarks='remarks...>
ServiceIdentityTest.testOrgInfoNull:31 expected null, but was:<0>Tests run: 357, Failures: 4, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] idpservices 1.0.0 .................................. SUCCESS [ 51.059 s]
[INFO] entities ........................................... FAILURE [ 43.355 s]
[INFO] utils .............................................. SKIPPED
[INFO] dataapi ............................................ SKIPPED
[INFO] businessapi ........................................ SKIPPED
[INFO] restapi ............................................ SKIPPED
[INFO] authservice 1.0.0 .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Expected behavior
Unit tests should not fail. Build should be success.
Screenshots
NA
Desktop (please complete the following information):
- OS: Ubuntu 16.x LTS
- Browser NA
Additional context
NA
SKIP_TEST=false, executes the test cases written.
Hence, if at all there are any failures, it will show the result as failure, which is expected behavior.
In case you want to skip the execution of test cases, value of the parameter should be set to true.
How is build going to be successful if test fails? Test cases are supposed to validate the intended behaviour of the code. Skipping test cases is not the solution. I feel this should be fixed.
@manishbansal8843 Hi Manish, Unit testing framework enhancement is a work in progress. You will get the updates in a while. Thanks for your feedback.