unit testing - date-dependent automated tests in mainframe context -
As a former Java person with sound test background, I am now in touch with mainframe / cobol stuff in the financial industry. / P>
I need an automated test, but knowing that in our context it's really difficult to implement, so I will ask for advice here.
1) My plan executes Java-based test-driver to call cobol stuff through stored-processes, MQ or similar and to check actual results in different DB2 tables Will do There is no problem with MPOV.
2) The difficult thing is the reference / data and here especially the date:
- Currently the test is done manually.
- The global "current date" is an important test-parameter and it is set manually (and it affects lot of other programs), so anyone else Such tests can not be touched during the system
- Because manually tested, this lock of the global context can be easily tracked: like mail "No touching on 12.12.2013 Do, I'm testing Not! "
- Automatically, this manual is no longer possible for the "global test globular lock" approach.
= & gt; How can we avoid this single locking? How can the global current date or current exchange rates be easily synthesized?
(Current thoughts are about cloning the entire context on a daily, weekly, monthly basis, still lock the given context. But I can not use "locking" or "owner" I dislike the idea completely.)
This is a trick thing with any automated unit test - Even junit tests
The answer is that you have to pass in the dates. Read the rappers "read the current date and set it to" add to the parameter list ", but your unit exams call the module that receives the date.
The only way your tests are stale in any language or environment is the only way.
Comments
Post a Comment