Thursday, 10 October 2013

AX and Scrum: Automated testing

Scrum highly encourages you to do automated testing. A common thing I hear is “any (some) automated testing is better than none”. So, my advice is start somewhere.

I am not going to go through all the detail of automated testing that we do but what I will cover is the Unit test framework. The unit test framework is in the MorphX IDE that allows you test your code. A click of a button you could run a whole bunch of automated tests.

Below is a screen shot of an area we test heavily, our forecasting engine. The forecasting engine similar to master planning in standard AX. It recommends what work order should be done and when. eg. Every 100KM a service is required for your car. Or Every 6Month you do an oil change. Or on the 1st of of every month you do an inspection. All sorts of combinations.

2013-08-20_1911.

Below is a simple test for testing calendar days. We document our test cases in a spreadsheet first. Writing what the input is and what the out come is. Then a developer writes a test suite or adds to an existing test suite.

2013-08-20_1918

Writing unit tests is expensive but it is more expensive to not do it. Imagine you make one little change that breaks a number of areas of the system. You will never pick it up manually until a customer runs into it in production. Now that is costly in a number of ways. Now imagine you could automated a number of scenarios and run it in under a minute.

No comments: