کامپیوتر و IT و اینترنتعلوم مهندسی

Java Serial Stream Adapter for IBM / Rational Robot & Test Manager

صفحه 1:
ZYNTAX la Java Serial Stream Adapter for IBM/Rational Robot & Test Manager® Zyntax Consulting BV 1/20 3 2005/03/03 ‏ير‎ JSS Extension

صفحه 2:
2۲۳۲۲۵ ۱۲۲۲ Po Introduction * Java is an established standard ¢ Applications written in Java need testing, too ¢ Messaging between client and server involves passing of objects in a serialized format * Object serialization is via a defined protocol * Robot® generates scripts containing raw binary data; serialization simply unsupported * JSS Extension supports this serialization 3 2005/03/03 ‏ير‎ JSS Extension 2/20

صفحه 3:
es eS Overview Why the JSS Our solution Examples Caveats Future plans Questions ‎JSS Extension 3/20‏ ير ‎ZYNTAX ‎2005/03/03 ‎ ‎ ‎

صفحه 4:
2۲۳۲۲۵ ۱۲۲۲ Po Why the JSS (1) * Robot® scripts have raw data: sock_send ۳ 26600005 5۳۲0615 dcslibrary.DCSRequest~ "heckSumI*0010°m_nRequestActionI* 000d*m_n "java/lang/Object;L* 000f*m_strFunctionIdt "_strLanguageq 007e00024c000e'm_strSessio ۵۲۷۵60۲ ۵0760002460011 m_strStationGroupq ۱007600024600117 751۳۲10620061۵76 0 2005/03/03 ‏ير‎ JSS Extension 4/20

صفحه 5:
ZYNTAX alli Why the JSS (2) ¢ Users want a high-level script they can read, modify and replay: jss_data( string, “m object.m strSessionId", "71" ) + ring, ۳0 object.m_strSessionType", “W" ) + 5 bject.m_strStationId", "71" ( + ‏ا‎ ۵ "NULL" ) + 2005/03/03 ‏ير‎ JSS Extension 5/20

صفحه 6:
2۲۳۲۲۵ ۱۲۲۲ Po Our solution (1) ۰ Requirements: - Recording and playback - Simple, easy-to-read scripts - Quick implementation ¢ Experiences developing other adaptors: - Integration with Robot nice, but hard - Impossible to record customer protocol and other protocols simultaneously 3 2005/03/03 ‏ير‎ JSS Extension 6/20

صفحه 7:
ZYNTAX _—. Our solution (2) ¢ Architecture overview 3 2005/03/03 ‏ير‎ JSS Extension 7/20

صفحه 8:
ZYNTAX ۳۳ " eT Our solution (3) ception sss ita raw _* Inter co “sere SQL custom server machine Scripts are more readable with higher-level data 2005/03/03 ‏ير‎ JSS Extension 8/20

صفحه 9:
2۲۳۲۲۵ ۱۲۲۲ Po Our solution (4) ¢ JSS “under the hood” non-java GNU § Flex WMS ‏وعر‎ ‎parser Detects and reassembles Java object streams in VU 2005/03/03 ‏ير‎ JSS Extension 9/20

صفحه 10:
2۲۳۲۲۵ ۱۲۲۲ Po Our solution (5) * Stream elements are translated to: - jss_begin() / jss_end() delimit stream jss_new() for new objects / classes jss_def() for class / object definition details jss_data() for data jss_raw() for unsupported details (mixed mode) * During replay, data elements are merged into serialized objects and sent to server 2 2005/03/03 ‏ير‎ JSS Extension 10/20

صفحه 11:
ZYNTAX Our solution (6) ¢ Example: sock_send jss_begin( “5” ) + jss_new( object, “obj”, ee jss def( class, “obj1.<name>", “AlLPrim” ) + jss_def( class, “objl.<uid>”, “c73a9c3cb013e429” ) + jss def( class, “objl.<flags>”, | “SC_SERIALIZABLE” ) + jss def( class, “objl.<num flds>", “2” ) + jss_def( _field_p, “objl.theBool”, “boolean” ) + jss_def( field p, “objl.theFloat”, “float” ) + 7 ده 7 jss_data( bool, "۵01.10680017, “TRUE” ( + jss data( float, “objl.theFloat”, “1.23456” ) + jss_end(); 2005/03/03 ‏ير‎ JSS Extension 11/20

صفحه 12:
ZYNTAX 5 1 7 سسا Details (1) ¢ Supported VU encapsulations: - sock_send <rawdata> - http_request <request header> <rawdata> - http_requests where data is chunked - #if 0 <rawdata> #endif 2005/03/03 ‏ير‎ JSS Extension 12/20

صفحه 13:
ZYNTAX Details (2) ¢ Nesting ‎data( string, "mobject.mstrSessionId", "71" ) +‏ دوز ‎jss data( string, “m object.m strSessionType", "W" ) + ‏+ ( "71لا" ‎data( string, "m object.mstrStationId",‏ دوز ‎jss data( ۳۵۴, m_strErrorCode", "NULL" ) + ‎° Arrays ‎jss_new( class, “objl.theIntArray", *]1* ( + ‎ee ‎jss data( int, “objl.theIntArray.<size>", “2" ) + ‎jss_data( int, “objl.theIntArray[0]", 4810۰ ۱ ۴ ‎jss_data( int, “objl.theIntArray[1]", “781" ) + 2005/03/03 = JSS Extension 13/20 ‎ ‎ ‎ ‎ ‎ ‎ ‎

صفحه 14:
ZYNTAX ۲ ۳2 Details (3) ¢ References - to NULL - to a previous string / object (Ox7e####) java data( string, “m strSessionType", “W" ) + java data( ref , “m strStationGroup", "0x7e0009" ) + Prevents data repeating and infinite loops for linked lists - are automatically recalculated on replay 2005/03/03 ‏ير‎ JSS Extension 14/20

صفحه 15:
2۲۳۲۲۵ ۱۲۲۲ Po Details (4) ¢ Heuristic parser deals with data that is further formatted: - Content in ZIP format (standard Java I/O) jss_deflate( jss_begin( “order ID: 5” ) + /* .. */ jss_end() Nested streams in binary blocks jss_begin( “5” ) + jss_blocks( 3, 1024, jss_begin( “5” ) +. 2005/03/03 ‏ير‎ JSS Extension 15/20

صفحه 16:
2۲۳۲۲۵ ۱۲۲۲ Po Details (5) ¢ Multi-connection data often misunder- stood by Robot. JSS re-assembles: http _nrecv [“cmd 001"] 218 ; /* 218 bytes /(unknown response length) */ jss_store( “zyntax_com 3", response ); /* WU code to receive data on different connection */ /* NU code to change back to original connection */ http _nrecv [“cmd @02"] 48 ; jss_store( “zyntax_com 3", response ); full_response = jss_retrieve( “zyntax com 3” ); 2005/03/03 ‏ير‎ JSS Extension 16/20

صفحه 17:
ZYNTAX ۲ ۳2 2 1 Caveats * Script generation: - Manual edits may confuse FLEX module - New encapsulations? - Use WinDiff when in doubt ¢ Replay: - Datapool use may change sizes, possibly causing different numbers of packet receives. 2 2005/03/03 = 2 JSS Extension 1720

صفحه 18:
ZYNTAX 1 rs as 7 Future Plans ¢ Serialization in J2SE 1.5.0 (XML!) * Other encapsulations for serial blocks? ¢ Similar protocols (RMI,...) 2005/03/03 JSS Extension 18/20 = inva

صفحه 19:
ZYNTAX Conclusion * JSS Extension - Affordable, Quick to implement and - Switches focus to how application behaves under multi-user load, if it meets requirements, etc. * Technically - Makes testing possible - Allows understanding what application is doing - Provides ability to generate realistic scripts =: JSS Extension 19/20 2005/03/03 =

صفحه 20:
ZYNTAX ۳ a Questions * Questions? Visit http://www.zyntax.com Email info@zyntax.com Call +31-20-6155033 Post a nice letter... PO Box 51336 1007EH Amsterdam The Netherlands 13 2005/03/03 ‏ير‎ JSS Extension 20/20

Java Serial Stream Adapter for IBM/Rational Robot & Test Manager© Zyntax Consulting BV 2005/03/03 JSS Extension 1/20 Introduction • Java is an established standard • Applications written in Java need testing, too • Messaging between client and server involves passing of objects in a serialized format • Object serialization is via a defined protocol • Robot© generates scripts containing raw binary data; serialization simply unsupported • JSS Extension supports this serialization 2005/03/03 JSS Extension 2/20 Overview Why the JSS Our solution Examples Caveats Future plans Questions 2005/03/03 JSS Extension 3/20 Why the JSS (1) • Robot© scripts have raw data: sock_send "`aced0005`sr`0015`dcslibrary.DCSRequest` "heckSumI`0010`m_nRequestActionI`000d`m_n "java/lang/Object;L`000f`m_strFunctionIdt "_strLanguageq`007e00024c000e`m_strSessio "nTypeq`007e00024c0011`m_strStationGroupq "`007e00024c0011`m_strTimeZoneNameq`007e0 2005/03/03 JSS Extension 4/20 Why the JSS (2) • Users want a high-level script they can read, modify and replay: jss_data( jss_data( jss_data( jss_data( 2005/03/03 _string, _string, _string, _ref, "m_object.m_strSessionId", "m_object.m_strSessionType", "m_object.m_strStationId", "m_strErrorCode", JSS Extension "71" ) + "W" ) + "W71" ) + "NULL" ) + 5/20 Our solution (1) • Requirements: – Recording and playback – Simple, easy-to-read scripts – Quick implementation • Experiences developing other adaptors: – Integration with Robot nice, but hard – Impossible to record customer protocol and other protocols simultaneously 2005/03/03 JSS Extension 6/20 Our solution (2) • Architecture overview Raw script 2005/03/03 JSS JSS Extension JSS script 7/20 Our solution (3) • Interception protocol data raw data HTTP Server Client SQL socket (IP) … custom client machine net server machine Scripts are more readable with higher-level data 2005/03/03 JSS Extension 8/20 Our solution (4) • JSS “under the hood” JSS non-java Raw script GNU Flex java JSS parser JSS script Detects and reassembles Java object streams in VU 2005/03/03 JSS Extension 9/20 Our solution (5) • Stream elements are translated to: – – – – – jss_begin() / jss_end() delimit stream jss_new() for new objects / classes jss_def() for class / object definition details jss_data() for data jss_raw() for unsupported details (mixed mode) • During replay, data elements are merged into serialized objects and sent to server 2005/03/03 JSS Extension 10/20 Our solution (6) • Example: sock_send jss_begin( “5” ) + jss_new( _object, jss_def( _class, jss_def( _class, jss_def( _class, jss_def( _class, jss_def( _field_p, jss_def( _field_p, /* … */ jss_data( _bool, jss_data( _float, jss_end(); 2005/03/03 “obj1”, “obj1.<name>”, “obj1.<uid>”, “obj1.<flags>”, “obj1.<num_flds>”, “obj1.theBool”, “obj1.theFloat”, “” ) + “AllPrim” ) + “c73a9c3cb013e429” ) + “SC_SERIALIZABLE” ) + “2” ) + “boolean” ) + “float” ) + “obj1.theBool”, “obj1.theFloat”, “TRUE” ) + “1.23456” ) + JSS Extension 11/20 Details (1) • Supported VU encapsulations: – sock_send <rawdata> – http_request <request header> <rawdata> – http_requests where data is chunked – #if 0 <rawdata> #endif 2005/03/03 JSS Extension 12/20 Details (2) • Nesting jss_data( jss_data( jss_data( jss_data( _string, _string, _string, _ref, "m_object.m_strSessionId", "m_object.m_strSessionType", "m_object.m_strStationId", "m_strErrorCode", "71" ) + "W" ) + "W71" ) + "NULL" ) + • Arrays jss_new( /* … */ jss_data( jss_data( jss_data( 2005/03/03 _class, "obj1.theIntArray", "[I" ) + _int, _int, _int, "obj1.theIntArray.<size>", "obj1.theIntArray[0]", "obj1.theIntArray[1]", “2" ) + “516" ) + “781" ) + JSS Extension 13/20 Details (3) • References – to NULL – to a previous string / object (0x7e####) java_data( _string, "m_strSessionType", "W" ) + java_data( _ref , "m_strStationGroup", "0x7e0009" ) + Prevents data repeating and infinite loops for linked lists – are automatically recalculated on replay 2005/03/03 JSS Extension 14/20 Details (4) • Heuristic parser deals with data that is further formatted: – Content in ZIP format (standard Java I/O) jss_deflate( jss_begin( “order ID: 5” ) + /* … */ jss_end() ) – Nested streams in binary blocks jss_begin( “5” ) + jss_blocks( 3, 1024, jss_begin( “5” ) + … 2005/03/03 JSS Extension 15/20 Details (5) • Multi-connection data often misunderstood by Robot. JSS re-assembles: http_nrecv [“cmd_001"] 218 ; /* 218 bytes /(unknown response length) */ jss_store( “zyntax_com_3", _response ); /* VU code to receive data on different connection */ /* VU code to change back to original connection */ http_nrecv [“cmd_002"] 48 ; jss_store( “zyntax_com_3", _response ); full_response = jss_retrieve( “zyntax_com_3” ); 2005/03/03 JSS Extension 16/20 Caveats • Script generation: – Manual edits may confuse FLEX module – New encapsulations? – Use WinDiff when in doubt • Replay: – Datapool use may change sizes, possibly causing different numbers of packet receives. 2005/03/03 JSS Extension 17/20 Future Plans • Serialization in J2SE 1.5.0 (XML!) • Other encapsulations for serial blocks? • Similar protocols (RMI,…) 2005/03/03 JSS Extension 18/20 Conclusion • JSS Extension – Affordable, Quick to implement and – Switches focus to how application behaves under multi-user load, if it meets requirements, etc. • Technically – Makes testing possible – Allows understanding what application is doing – Provides ability to generate realistic scripts 2005/03/03 JSS Extension 19/20 Questions • Questions? Visit http://www.zyntax.com Email info@zyntax.com Call +31-20-6155033 Post a nice letter… PO Box 51336 1007EH Amsterdam The Netherlands 2005/03/03 JSS Extension 20/20

51,000 تومان