Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
3 JavaJPOSISO8583testingtool
HTest,isajavajposbasedISO8583toolfortestinganddevelopmentpurposes. Itsbasicallyawebfrontendforjposeeq2servicesthatIcreatedanduseformyiso8583testing. Htesthavethefeaturesthatmadeiteasierformetotest,debuganddevelopISO8583paymentsystems FamiliaritywithJPOSlibraryandframeworkisrecommendedtousethistoolbutnotrequired. Itprovidesthefollowingfeatures: o o o TorunHTestyouneedjava1.6installed(Ithink,IcantrememberwetherIused1.3compatibleapi) ItworksonanyOperatingSystemsthathavejavasupport. DownloadandunzipHtest.zip GototheunziipedfolderthentypejavajarHtest.jar Afterthatpointyourbrowsertohttp://localhost:9090/jposee Loginwithusername:admin:password:test FileStructure Intherootfolder Alltheconfigurationfileisincfg/isotest Allthejposq2deploymentdescriptorisindeploy/ CreateandeditISO8583serverandclientconnectionsviawebbasedgui BeanshellscriptableISOchannelthatprovidesrawhexdumpofchannelmessages. AutoconversionfromISOmessagetohttpxmlformatforeasierwebserviceintegration
CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2
GeneralConcepts
HtestService
Server
Client
Q2QServer
Logger
RequestListener (bshscript)
Q2Mux
Q2Channel Adaptor
Request Listener
CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2
Service Management
CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2
ISOMessageisinputtedtothetextfieldintheJPOSXMLformatlikethis <isomsgdirection="incoming"> <fieldid="0"value="0810"/> <!ExampleField,Fillitwithwhateveryouwantyourisomesagetocontain> <fieldid="7"value="12345"/> </isomsg> Theresultingoutputisthendisplayedinthelogoutput. Thelogoutputwillcontaininfoasthetimeofmessagesend,outgoingandincomingmessage,plusthe exceptiongeneratedifany. Thecountvariablesetsthenumberoftimeyouwishtosendthemessagewithdelayisthedelay intervalbetweeneachmessageinms. CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2
4. Interfacing HTestwaswrittentosupportprimarilyISO8583towebservice/httpxmlstyleconnection. SoifyoufilledtheincomingURLfieldwhenyouwerecreatingtheISO8583service,everyincoming ISOMsgispostedtothaturlwithHTTPPOSTmethodandfieldnameisomessage. NowtosendanISO8583messagetoaservice,besidesusingtheJavaSpaceinterface,HTestprovidesthe followinghttpPOSTurl http://yourhost:9090/jposee/isotest/send_post.html?isomessage=xxxxx&servicename=xxxxx Whereservicenamecontainsthenameofyourservice. Ifitisaclientservice,yourisomessagewillbesenttoconnectedserver. Ifitisaserverservice,yourisomessagewillbesenttotheLASTCONNECTEDCLIENT IfyouwanttochainseveralISO8583servicestogetherhereswhatyoudo. SayyouhaveServiceAandServiceB OntheincomingURLparameterofServiceAyouput http://yourhost:9090/jposee/isotest/send_post.html?servicename=ServiceB OntheincomingURLparameterofServiceByoualsoput http://yourhost:9090/jposee/isotest/send_post.html?servicename=ServiceA There,youhaveitanyincomingmsgtoServiceAwillbepassedtoServiceBandviceVersa Andofcourseshouldyoudecidetochangeallofthisthebeanshellscriptisavailableforperousingat Cfg/isotest/servicedef/support/servicename.bsh
ISOMSG SERVER
CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2
5. Configurations Nowontheconfigurationsmenuyoucancreateandeditthecustomchannels,predefinedisomessage andpackagerxmlconfig. ForISOMsgconfigurationsitsjusttheretoletyoucreateandsaveyourisomessagetosavetimeduring yourtesting. Thechannelconfigurationisforthecustomchannels,youcancustomizethesendMessageLength, getMessageLength,sendHeaderandgetHeader. ThesefourfunctionshouldbeenoughformosttcpbasedISO8583connection. Thepackagerconfigurations,isthereforyoutocustomizeyourISO8583fielddefinitions,wetherits LLChar,LLNum,fieldlengthandetcetera. 6. Conclusion Wellthatsprettymuchit,HtestisatoolIvedevelopedtohelpmespeedupmytesting,sinceIusually connecttomanydifferentterminalswithslightlydifferentchannelsandmessagetype. Ihopeitcanbeofusetoallofyoudoingpaymentsystemdevelopment. Contactmeat hairi@msinergi.com
CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2