Re: Detecting error condition during scripts

[email protected] Tue, 8 Aug 2006 10:56:27 +0200
Newsgroups gmane.comp.java.tn5250j.general
Message-ID <[email protected]>
Hallo Ken,

the issue you are bumping into is the largest problem in using screen 
scraping for integration purposes and the only reason we stay away from 
using the emulator this way. And why any sane mind should also ...

The only error the emulator can provide you with is problems in the 
protocol. E.g. you try to insert a value in the third field and there is 
no third field. Even, if you implement your script wrongly and use key 
event injection, your script would look like 
'value1[tab]value2[tab]value3[enter]'. Now, what happens if my screen only 
has 2 fields? The result would we that value3 ends up in field 1 and 
value2 in field2. 

On the other hand, to use the emulator as e.g. test script executor and to 
track error conditions in the applications at the 400 side, one would have 
to implement screen recognition functionality to, indeed, detect X-II or 
X-System condition or to detect popped-up windows or other not fore-seen 
screens in the wanted scenario. Note however that those last situations 
you have to implement application specific scenario's because every 
application shall handle those error conditions in different ways.

The solutions: use true API's for integration purposes. My 2 cents worth 
...

HTH,
Wim.





Nicola Ken Barozzi <[email protected]> 
Sent by: [email protected]
08/08/2006 09:23
Please respond to
[email protected]


To
[email protected]
cc

Subject
[Tn5250j-general] Detecting error condition during scripts







Hi, it's quite some time since my last mail, and it's nice to see some 
activity. :-)

Here is my problem.

I have included tn5250j in my Swing app by using the code in the applet 
version and making it in a JComponent. All well. By doing so, I have now 
access to the session in my Java program, and am able to script it from 
there.

My issue is about being able to detect error conditions during the script.

What has happened in a test run is that the script, which inputs about 
30 items in two screens, got an error during the third item, but (of 
course) kept on trying to insert the other items. I'm afraid to put this 
in production, as I fear that in these cases it could start inserting 
wrong things in wrong places.

I found out that some screens prompt the error on a bottom line, some 
also add X - II and some show a "dialog".

What is the best way to detect these error conditions without having to 
use custom tests for each screen?

-- 
Nicola Ken Barozzi                   [email protected]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tn5250j-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tn5250j-general

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Tn5250j-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tn5250j-general