Java Serial Stream Adapter for IBM / Rational Robot & Test Manager
اسلاید 1: 2005/03/03JSS Extension1/20Java Serial Stream Adapter for IBM/Rational Robot & Test Manager©Zyntax Consulting BV
اسلاید 2: 2005/03/03JSS Extension2/20IntroductionJava is an established standardApplications written in Java need testing, tooMessaging between client and server involves passing of objects in a serialized formatObject serialization is via a defined protocolRobot© generates scripts containing raw binary data; serialization simply unsupportedJSS Extension supports this serialization
اسلاید 3: 2005/03/03JSS Extension3/20OverviewWhy the JSSOur solutionExamplesCaveatsFuture plansQuestions
اسلاید 4: 2005/03/03JSS Extension4/20Why 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
اسلاید 5: 2005/03/03JSS Extension5/20Why the JSS (2)Users want a high-level script they can read, modify and replay:jss_data( _string, m_object.m_strSessionId, 71 ) +jss_data( _string, m_object.m_strSessionType, W ) +jss_data( _string, m_object.m_strStationId, W71 ) +jss_data( _ref, m_strErrorCode, NULL ) +
اسلاید 6: 2005/03/03JSS Extension6/20Our solution (1)Requirements:Recording and playbackSimple, easy-to-read scriptsQuick implementationExperiences developing other adaptors:Integration with Robot nice, but hardImpossible to record customer protocol and other protocols simultaneously
اسلاید 7: 2005/03/03JSS Extension7/20Our solution (2)Architecture overviewJSSRaw scriptJSS script
اسلاید 8: 2005/03/03JSS Extension8/20Our solution (3)Interceptionraw dataClientServerHTTPSQLcustomsocket(IP)… client machinenetserver machineprotocol dataScripts are more readable with higher-level data
اسلاید 9: 2005/03/03JSS Extension9/20Our solution (4)JSS “under the hood”JSSRaw scriptJSS scriptGNU FlexJSS parserjava Detects and reassembles Java object streams in VUnon-java
اسلاید 10: 2005/03/03JSS Extension10/20Our solution (5)Stream elements are translated to:jss_begin() / jss_end() delimit streamjss_new() for new objects / classesjss_def() for class / object definition detailsjss_data() for data jss_raw() for unsupported details (mixed mode)During replay, data elements are merged into serialized objects and sent to server
اسلاید 11: 2005/03/03JSS Extension11/20Our solution (6)Example:sock_send jss_begin( “5” ) + jss_new( _object, “obj1”, “” ) + jss_def( _class, “obj1.<name>”, “AllPrim” ) + jss_def( _class, “obj1.<uid>”, “c73a9c3cb013e429” ) + jss_def( _class, “obj1.<flags>”, “SC_SERIALIZABLE” ) + jss_def( _class, “obj1.<num_flds>”, “2” ) + jss_def( _field_p, “obj1.theBool”, “boolean” ) + jss_def( _field_p, “obj1.theFloat”, “float” ) + /* … */ jss_data( _bool, “obj1.theBool”, “TRUE” ) + jss_data( _float, “obj1.theFloat”, “1.23456” ) + jss_end();
اسلاید 12: 2005/03/03JSS Extension12/20Details (1)Supported VU encapsulations:sock_send <rawdata>http_request <request header> <rawdata>http_requests where data is chunked#if 0 <rawdata> #endif
اسلاید 13: 2005/03/03JSS Extension13/20Details (2)NestingArraysjss_new( _class, obj1.theIntArray, [I ) + /* … */jss_data( _int, obj1.theIntArray.<size>, “2 ) +jss_data( _int, obj1.theIntArray[0], “516 ) +jss_data( _int, obj1.theIntArray[1], “781 ) +jss_data( _string, m_object.m_strSessionId, 71 ) +jss_data( _string, m_object.m_strSessionType, W ) +jss_data( _string, m_object.m_strStationId, W71 ) +jss_data( _ref, m_strErrorCode, NULL ) +
اسلاید 14: 2005/03/03JSS Extension14/20Details (3)Referencesto NULL to a previous string / object (0x7e####) Prevents data repeating and infinite loops for linked listsare automatically recalculated on replayjava_data( _string, m_strSessionType, W ) + java_data( _ref , m_strStationGroup, 0x7e0009 ) +
اسلاید 15: 2005/03/03JSS Extension15/20Details (4)Heuristic parser deals with data that is further formatted:Content in ZIP format (standard Java I/O)Nested streams in binary blocksjss_deflate( jss_begin( “order ID: 5” ) + /* … */ jss_end())jss_begin( “5” ) + jss_blocks( 3, 1024, jss_begin( “5” ) + …
اسلاید 16: 2005/03/03JSS Extension16/20Details (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 );/* 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” );
اسلاید 17: 2005/03/03JSS Extension17/20CaveatsScript generation:Manual edits may confuse FLEX moduleNew encapsulations?Use WinDiff when in doubtReplay:Datapool use may change sizes, possibly causing different numbers of packet receives.
اسلاید 18: 2005/03/03JSS Extension18/20Serialization in J2SE 1.5.0 (XML!)Other encapsulations for serial blocks?Similar protocols (RMI,…)Future Plans
اسلاید 19: 2005/03/03JSS Extension19/20ConclusionJSS ExtensionAffordable, Quick to implementandSwitches focus to how application behaves under multi-user load, if it meets requirements, etc.TechnicallyMakes testing possibleAllows understanding what application is doingProvides ability to generate realistic scripts
اسلاید 20: 2005/03/03JSS Extension20/20QuestionsQuestions?Visithttp://www.zyntax.comEmailinfo@zyntax.comCall+31-20-6155033Post a nice letter…PO Box 513361007EH AmsterdamThe Netherland
نقد و بررسی ها
هیچ نظری برای این پاورپوینت نوشته نشده است.