Melvin Grootenboers on September 24, 2015
Testing is a vital component when creating a Mendix application. We get a lot of questions about testing, and that’s why I’m going to show you three tools you can use to test your Mendix applications. And for those of you who may not realize that testing is critical – then we’ll cover that quickly too!
This may seem like a simple question, but here are a couple of reasons why you should not release without first testing. Finding and fixing bugs when your application is in production is a lot more expensive and time-consuming. Solving issues in the early stages of development ensures a more stable product and prevents embarrassment that comes from complaining customers.
And remember, speeding up innovation means releasing more often, and faster. If you wish to maintain speed to market without significantly increasing the time spent on testing, than you need the right testing tools. Using automated tests is essential for maintainability and keeping productivity with Mendix application development constant.
You need to first decide what you are going to test. While you ultimately should focus on the business functionality associated with your Mendix application, there are also other components to test (which I’ve listed below).
But remember, you don’t have to test everything; there is, for example, no need to test the database code because this is handled by the Mendix platform.
Web services are the preferred way of integrating a Mendix application with external systems. To test these web services, you need to create integration tests. An integration test is designed to validate component integrations.
Learn more about testing web services in Mendix using SoapUI here.
Figure 1 – The TestCase editor in SoapUI
Unit testing lets you test small parts or components of an application using test scripts. You can use unit testing tools to specify alternative configuration and mock existing functionality and dependencies (like databases), to isolate the specific code you want to test.
To verify that your Microflows work as expected, you can create unit tests using the UnitTesting module that is available in the Mendix App Store. Using this module you can easily write, manage, and run unit tests. Want to know more about the UnitTesting module? Check out our how-to about testing Microflows using the UnitTesting module.
Tip: Don’t try to test everything. Instead, focus on the most used and complex Microflows.
Figure 2 – The unit test overview page of the UnitTesting module
Acceptance testing means that your application conforms to the required level of quality and functionality the client expects. A great way to define an acceptance test is by looking at the user stories in your project. These usually provides great input for deciding which tests you need to create.
Selenium IDE is a Firefox plug-in that allows you to create acceptance tests by navigating through your application while a plug-in records your actions. Benefits of Selenium IDE include:
Learn more about testing Mendix applications using Selenium IDE here. If you’re looking to create robust, browser-based tests, you should look into using a testing framework with Selenium. Find out which part of Selenium is appropriate for you.
Figure 3 – The first test case in Selenium IDE
The tools above have greatly helped me in my day-to-day work where I rigorously test Mendix applications to find the bugs before you guys do. Hopefully these ideas will also help you with your day-to-day work and your Mendix development!
Do you have any additions to improve testing or know any other good testing tools? Leave a comment!
Receive Mendix platform tips, tricks, and other resources straight to your inbox every two weeks.