Home >Documents >Capture & Replay

Capture & Replay

Date post:22-Feb-2016
Category:
View:79 times
Download:0 times
Share this document with a friend
Description:
Capture & Replay. TTCN-3 Test Case Generation from arbitrary traces. Bogdan Stanca-Kaposta & Theofanis Vassiliou-Gioles (Testing Technologies). Agenda. The Motivation The Technical Challenges Capture & Replay for TTworkbench Demo Q & A. Motivation(s). TTCN-3 Users. - PowerPoint PPT Presentation
Transcript:

Folie 1

TTCN-3 Test Case Generation from arbitrary tracesCapture & ReplayBogdan Stanca-Kaposta & Theofanis Vassiliou-Gioles (Testing Technologies)Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.1AgendaThe MotivationThe Technical ChallengesCapture & Replay for TTworkbench DemoQ & A2Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Motivation(s)TTCN-3 UsersWe have a TTCN-3 framework, where do the test cases come from?IssuesManual test case creation tedious taskError proneDomain Knowledge requiredNon-TTCN-3 UsersWe see a scenario and we would like to replay it laterIssuesWhat means replay w.r.t. testing?What is the test system? What is the system under test?3The desire to capture observed communication in test scripts suitable for test automationCopyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The Idea 4Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.What is a Trace?5

Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.What is a Trace?

The observed communication is captured (stored) in a trace (file)Trace containsCommunication between two or more entitiesMessage exchangeOne or more protocols

6Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.A Generic Communication Setup7A1A2B1B2......Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The SetupBut Who is Who?A1B1A1SUTSUTB1IOP1IOP2SIM1SIM2Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The Setup From Message to TemplatesA1B1INVITE sip:[email protected] SIP/2.0Call-ID: [email protected]: Content-Disposition: sessionContent-Length: 150Content-Type: application/sdpCSeq: 2 INVITEFrom: "TESTER1" ;tag=1169Max-Forwards: 70To: Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK5704

...template INVITE_Request T1 := { requestLine := { method := INVITE, requestUri := sip:[email protected], sipVersion := SIP/2.0}, msgHeader := { callId := [email protected], contact := , cSeq := 2 INVITE, fromField := "TESTER1 " , toField := , via := ., maxForwards := { fieldName := MAX_FORWARDS_E, forwards := 70 }, .... allow := omit, ...Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The Technical ChallengeIt is somehow easy to generate TTCN-3 templates from each message, butthe challenge is to obtain usable and maintainable test data and test scriptsVariable informationFrom run to run, perhaps unpredictableFrom message to message, perhaps constant perhaps dependendVariable but constant informationShould be configurable before executionWhite noiseLot of information that is potentially irrelevant for a particular test scenario but inevitable for the test execution10Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The Technical ChallengeIt is somehow easy to generate TTCN-3 templates from each message, butthe challenge is to obtain usable and maintainable test data and test scriptsVariable informationFrom run to run, perhaps unpredictableFrom message to message, perhaps constant perhaps dependendVariable but constant informationShould be configurable before executionWhite noiseLot of information that is potentially irrelevant for a particular test scenario but inevitable for the test execution11Protocol and/or domain knowledgehas to be included!Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The SolutionAutomated TTCN-3 Test Generation and Execution12Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Example Scenario13

SIPUser A calls User BUser B accept call

Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Example Scenario14

SIP

Use a common Monitor Tool to capture messages e.g. WiresharkTrace File

Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Example Scenario15

Trace FileTTworkbench

ExecutionPut the Trace File into TTworkbench .Generate the captured Test ScenariosReplay your previously captured Test Scenarios full automaticallyCopyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Example Scenario16

Trace FileTTworkbench

ExecutionPut the Trace File into TTworkbench .Generate the captured Test ScenariosReplay your previously captured Test Scenarios full automatically

Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Know-How IntegrationManual definitions in a configuration file, toExtract existing data and use the same values in the message flow (sequence numbers, call IDs, )Define uninteresting fields for ignoring at matching timeAutomatically extract similar data from templates to create better templates and structuresReuse existingType systems and codecsTest adapters and component definitionsTest functions and Alt-Steps

Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.DEMO!18Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.a 3min demo to show how this works18Key BenefitsSpeed up functional and interoperability testingBy reducing manual taskAutomate testingGenerate your test, instead of implementing it manuallyExecute them full automatically Get your detailed test reportsQuality Optimization Test case analyzer reduces errors in test cases Fast reusability and easy extension of already defined tests

19Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Supported Capturing Sources & RequirementsWireshark The most popular network analysis and capturing toolJpcap Service The remote capturing service provides capturing on remote machinesPcap Files Trace files created beforehandTTworkbench logs (TLZ)Analyze the logs without an SUTCapturing Console Input and Output Capturing of data via serial connections (RS232, USB) SSH, TELNET Local ConsoleWindowsWinPCAP

Linux/UnixLibpcap at least version 1.0

Recommendation: Install WiresharkIncludes the installation of WinPCAP and LibPCAP20Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Further informationTesting Technologiestestingtech.comfacebook.com -> Testing-Technologies Capture & Replaytestingtech.com/products/ttworkbench.phptestingtech.com/download/datasheets/CaptureAndReplay.pdf21Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.Contact22Bogdan Stanca-KapostaTesting [email protected]

Theo VassiliouTesting [email protected] Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.The process23Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.FeaturesDesigned to generate test cases from existing tracesStart your own capture with the Capture & Replay toolOr import trace files created beforehand with other capturing tools, e.g. WiresharkCapture from multiple sources at the same time24Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.BenefitsFast and easy test authoringNo programming skills requiredSupport of multiple capturing sourcesPost-hoc analysis of real world situations via simulation modeFlexible creation of test configurations out of selected scenariosDecide which communication peers shall be testedDecide which ones shall be simulated25Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.On the second thought...User: Wait! How about the variable data?The Manager: Sell consultancy $$$Technical guy:Lets integrate the protocol knowledgeExtract existing data and use the same values in the message flow (e.g. sequence numbers, call IDs)Ignore the uninteresting fields for matchingExtract similar data from templatesUser: I would like to reuse my Test StructureThe Manager: Reuse existing Adaptation, Codecs, Type systems, Components, Functions, Alt Steps

26Copyright Testing Technologies 2012. Confidential Information. All Rights Reserved. More Information at www.testingtech.com.

Popular Tags:

Click here to load reader

Reader Image
Embed Size (px)
Recommended