Hello
Actually I'm just plannig an automatic source code generation in order to ease the n-unit tests. Actually I've the follwing situation:
tFrmGLBatchTester.ttpgBatches.dtpDetailDateEffective.Properties.Text = dateConverter.GetDateString(dteX);
The textbox "dtpDetailDateEffective" is a specific text box for the handling of a date value. The Problem ist: The assingment of a date string is not enough because in the normal situation "something happens" and an event will arise in in n-unit this "something" does not happen. On example may be a lost focus which shall arise or in this case it is a Validating-Event.
Actually only the following code works:
tFrmGLBatchTester.ttpgBatches.dtpDetailDateEffective.Properties.Text = dateConverter.GetDateString(dteX);
tFrmGLBatchTester.ttpgBatches.dtpDetailDateEffective.FireEvent("Validating");
The Problem in all this case is: It takes time to see the problem that means to identify that the test is not runnig and to solve to problem that means to finde the proper event and fire it.
The events which are nessessaryly to be fired after such an assignment are described in the yaml files or well known because it is a specificly developed control.
Follwing things can be done:
[]We can implement no automatic code that means that the person who writes the test case has to handle this problem itself.[/:m]
[]We can implement a permanent and automatich firing system[/:m]
[]We can provide a manual interface as it is known in the file sets Example.cs, Example.Designer.cs and Example.ManualCode.cs[/:m][/list:u]
Other problems may be that code sequenzes like
tFrmGLBatchTester.tbbSave.Click();
tFrmGLBatchTester.tbbSave.Click();
will result in a click onto a disabled button and this has no effect on the test.
I think this group of problems shall be solved by such set of automatic generated tester classes too.
If someone has some more ideas ...
Best regards
Wolfgang