Sei sulla pagina 1di 7

HTestv0.

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

InHTestwedefinethetermservicesasarepresentationtoeitherJPOSQServerorChannelAdaptor. WhichisbasicallyeitheranISO8583listeningserveroraclient. WhenyoucreateaHTestServiceitisactuallyanabstractrepresentationofseveralxmlfilesthatJPOS Q2utilize.AllthexmlQ2configwhencreatedisstoredinthecfg/isotest/servicedeffolder Iftheuserclicksstart,thefilesaresimplycopiedtothedeploydirectoryandtheJPOSQ2containerwill initializethem. Therequestlistenerscriptwith.bshextentionhandleswhatdotowhenanISOmessagearriveatthe service.Therequestlistenerscriptislocatedatcfg/isotest/servicedef/support

Service Incoming ISOMsg


Logging Queuein space

Request Listener

Destination URL(http XMLPost)

CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2

1. CreatingServices: ServicesinHtestmeanstheServerandClientISO8583connectionandtherequestlistenerthathandles theincomingrequest. YoucaneasilycreateandmodifyservicesinHtestbyusingtheISO8583TestServicesCreateService Menu

Configuration Files Edit


ToCreateaservicejustenterthedesiredservicename, Andfillouttheneededdetails,suchasportnumber,ISOChanneltypeandpackager. OptionallyyoucanalsoincludeahttpurltoposttheincomingISOmessagefromthatservice. Therearetwoservicetypetheserverandclientservice.Ifyouwanttocreateaclientserviceyoualso needtospecifythedestinationhost/ipaddress. Forchanneltypeusethecustomchanneloptionifyourcreating/debugginganewISOchannelthatis notinthestandardJposlibrary.ItisabshscriptablechannelwithHEXDUMPoutputinthelog,helps youprototypeanddebugerrorsmoreeasily.Tocreateanewcustomchanneldoitintheconfigurations menu. CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2

Service Management

2. MonitorServices AccessviaISO8583TestServicesListServices Displaysallthecurrentlyavailableservicesandtheirinfo SendMessage EditConfigurations Usethestart/stoptostartorstopaservice, Ifserviceisactivealltheirconnectionrelatedinfoisdisplayedintheinfotab. TosendanISOMessagethroughthatserviceclickthesendMessagelink

CopyrightHairiAbass2011,HTestv0.3aWebGUIforJPOSQ2

3. SendMessage AccessthismenuviaISO8583TestServiceListServicethenclickonthelinkSendMessageToolfor SendingISOMessagestroughservicesandseingthelogfiles.

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

HTTP INTERCHANGE X CLIENT EXTERNAL HOST

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

Potrebbero piacerti anche