Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running Unit tests by order. #51

Open
hnguyen132 opened this issue Feb 28, 2024 · 1 comment
Open

Support running Unit tests by order. #51

hnguyen132 opened this issue Feb 28, 2024 · 1 comment

Comments

@hnguyen132
Copy link

I'm using this project for testing our Mendix project and it helps us to prevent a lot of issues before we go to production. I'm really glad and thankful to you guys.

When implementing the Unit testing for our project, we were getting trrouble with a defining test. Because our test steps all relate to each others and we require them running in order. To adapt the configuration, we are using the name convension that help us to sort the test steps by our desired order.

The problem is the Unit testing does not run with the correct order sometime and we get failure. It also messed up our database. Then we need to clean up our database manually by the SQL queries. That's dangeruos and annoying.

Please consider to have a way that allow us to sort all UnitTest and all TestSuite before running the UnitTesting.

Thanks.

Screenshot 2024-02-28 075200

@SebastiaandenBoer
Copy link

This would be the perfect use case for using the Setup and TearDown microflows to respectively prepare and clean up any data prerequisite to or generated by your test cases.

Testing best practices would imply your unit tests are independent of each other's result or running order, so I wouldn't expect this to be a feature in the Unit Test module.

Also, this would be quite challenging to implement in the module's current state due to each test being a separate transaction, which is often rolled back at the end of a test run. You would have to move this rollback to the suite level, which would result in unit tests not being able to be rolled back independently.

Although I understand your position, I would not support this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants