Skip to main content

Test Driven Development using the AIMMSUnitTest Library

  • April 19, 2019
  • 8 replies
  • 136 views

Patrick
Administrator
Forum|alt.badge.img+6

This article discusses some elements from the popular software methodology Test Driven Development in relation to the AIMMS Library AIMMSUnitTest.

  1. Gather requirements from stakeholders

    • What are small examples?

    • What are the edge cases, including error cases, performance?

  2. Implement requirements as unit tests and see them fail!

  3. Development

    1. Write the code for the functions

    2. Execute tests and see them pass!

    3. Refactor until performance is acceptable.

  4. Repeat

Read more...

8 replies

  • Explorer
  • 5 replies
  • March 24, 2022

Is there common practices to test procedures as well (potentially with cases loaded)?


  • 0 replies
  • March 26, 2022

Hi @benjaminleroy 

Please check out this post best practice post by our colleague @Jan-Willem.  It also contains a reference to our Unit Test Library that is available for all developers of AIMMS applications; we use it for building the SC applications.

 


luispinto
AIMMSian
Forum|alt.badge.img+6
  • Customer Success Manager
  • 66 replies
  • March 30, 2022

We are working on a best practices article that can also help!


  • Explorer
  • 5 replies
  • March 30, 2022

Thanks @luispinto. My team is currently working on building up the automated testing suite for AIMMS, so please feel free to reach out if you want so engagement with the articles even when they’re just drafts.


MarcelRoelofs
AIMMSian
Forum|alt.badge.img+5
  • AIMMSian
  • 107 replies
  • March 30, 2022

Hi @benjaminleroy, you may want to take a look at the unit test project for the Data Exchange library, which is built around the AimmsUnitTest library and uses many of its features in a practical setting. 

You can download it from here: https://documentation.aimms.com/dataexchange/using.html

 

 


  • Explorer
  • 5 replies
  • March 30, 2022

Thanks for the great resources (I’ll need to dig into the breadth of tests in the Data Exchange library). I’m most interested in tools to allow automated testing & automated code coverage. Coming from open source software, it would also be great to see how AIMMS type processing integrates into github actions, etc. 

Also, it’s sometimes hard to see how library based testing can be extended to model based testing (maybe Data Exchange’s tests will help me see this).


Sree
Forum|alt.badge.img+3
  • Enthusiast
  • 13 replies
  • September 23, 2022

Is there a way to generate a code coverage report from log/AimmsUnit.xml? This would be helpful to setup some pre-commit hooks on production code.


MarcelRoelofs
AIMMSian
Forum|alt.badge.img+5
  • AIMMSian
  • 107 replies
  • September 23, 2022

Hi @Sree 

There is no code coverage included in the AimmsUnitTest library, as this would require engine support which is currently not available. 

I would suggest that you use the Ideation section to submit the idea to add code coverage support to the engine.



Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator