CI/CD pipeline for Unit testing apis

0
I am encountering an issue related to UnitTesting Apis are enabled or not. In a pipeline using MxBuild I have built a mda file of my app . I am running it in a container right now, but getting a bad request 404 . I have set constant UnitTesting.RemoteApiEnabled and UnitTesting.RemoteApiPassword , still when I run that app in container it's not working . Help me figuring out this issue. 
asked
2 answers
1

Hi Parag, yes, you're absolutely right UnitTesting.Enabled = true is a required constant to activate the UnitTesting module in Mendix.

Even if UnitTesting.RemoteApiEnabled and UnitTesting.RemoteApiPassword are set, the unittests endpoint won’t work unless UnitTesting.Enabled is also set to true. This flag ensures the module is initialized and its APIs are registered at runtime.

 

Unit tests to run in a container or CI pipeline, make sure all three are set:

UnitTesting.Enabled = true

UnitTesting.RemoteApiEnabled = true

UnitTesting.RemoteApiPassword = <your_password>

 

Also, ensure the app is not running in Production mode (DTAPMode should be T or A).

 

Thanks for pointing this out, it’s a crucial step!

 

answered
0

So Figuring this out to enable unit tests there is another constant named UnitTesting.Enabled that needs to be set as true to run the tests in above scenario.

answered