# MV TEST

# What is it?

MV.TEST is a testing framework for Universe. It allows you to write tests that prove your code works and is fit for use. MV.TEST will run these testing programs and show if each test passes or fails.

# Benefits

There are many benefits to writing tests. Here are a few:

  • Allows you to refactor your code so it looks nicer or runs better and you would have the confidence that you are not breaking anything.
  • It makes large programs more agile. You can add or make changes to huge programs and know with confidence that you did not break something in a different area of your code.
  • A different programmer can have confidence when they need to make a change to your code.
  • It can serve as a sort of documentation of the intended rules of the program.
  • If we upgrade the server, Universe, etc., we will easily know what stopped working.
  • You could (if you prefer) do Test Driven Development (TDD). This is where you write the test first, which would initially fail, and then write the code so that the test passes. Then you are free to refactor your code, so it looks nicer or runs better and you would have the confidence that you are not breaking anything.

# Limitations

As of now, there is no way to test things that require user input. There is also no way to test report output. The current use case for MV.TEST is to test a program or external subroutine that either returns variables or changes the database in some way.

I do have ideas of how to extend this so that it can work with user input. Things like navigating through screens and verifying what is displayed. I think it would have to be a combination of sending inputs to the EXECUTE commands and searching a COMO file.

As for reports, it would need to be able to look at the spooler.

Both of these solutions are just theories and I'm not sure if they are even possible.