I tried to overcome this possibility by making the ScriptFixture class implement StepListener and listened to the events.I also logged in each step event (Step Start and Step End) into a file.
When I recieved a Step Error Event, I wrote the event to the console thereby specifying exactly where the event failed.
This can be ofcourse enhanced if the StepEvent also can contain the Line No.
Is there a problem with this implementation?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The StepRunner would need to keep track of the line number, and the currently active script (scripts may be nested). It only approximates the line in the corresponding xml, since the xml can contain an arbitrary amount of whitespace, but I suppose that might be better than nothing.
When you say you specify where the event failed, what information do you mean?
It might be useful, in addition to the file/line, to include the xml, in case the line numbers *don't* match.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I say "where the event failed", I mean the exact step with the description of the step
for eg:
Step-Failure :Step(Click JButton 1)
something like that along with the script name of the step will be a good idea because any ambiguity with regard to the uniqueness of this step will be solved by the step log that writes the step-start and step-end events along with the ste-error events too.
However I am having a doubt whether this will affect the performance of Abbot because I am writing the details of step execution to a file?
Can this(Writing a Step Log) be made a standard feature of Abbot?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When a script is run through Costello, there is a visual intimation of where the script failed exactly.
However, when a suite is run through a ScriptFixture, there is no intimation of where the script failed.
Is it possible to get this intimation?
I tried to overcome this possibility by making the ScriptFixture class implement StepListener and listened to the events.I also logged in each step event (Step Start and Step End) into a file.
When I recieved a Step Error Event, I wrote the event to the console thereby specifying exactly where the event failed.
This can be ofcourse enhanced if the StepEvent also can contain the Line No.
Is there a problem with this implementation?
The StepRunner would need to keep track of the line number, and the currently active script (scripts may be nested). It only approximates the line in the corresponding xml, since the xml can contain an arbitrary amount of whitespace, but I suppose that might be better than nothing.
When you say you specify where the event failed, what information do you mean?
It might be useful, in addition to the file/line, to include the xml, in case the line numbers *don't* match.
When I say "where the event failed", I mean the exact step with the description of the step
for eg:
Step-Failure :Step(Click JButton 1)
something like that along with the script name of the step will be a good idea because any ambiguity with regard to the uniqueness of this step will be solved by the step log that writes the step-start and step-end events along with the ste-error events too.
However I am having a doubt whether this will affect the performance of Abbot because I am writing the details of step execution to a file?
Can this(Writing a Step Log) be made a standard feature of Abbot?
You can add a StepListener to the StepRunner to provide exactly this functionality.
Assuming no empty lines in the xml files, you can even calculate the original file line number based on the events you get.
In CVS, will be in the next release