220 likes | 452 Views
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.
E N D
Capture & Replay TTCN-3 Test Case Generation fromarbitrarytraces BogdanStanca-Kaposta & Theofanis Vassiliou-Gioles (Testing Technologies)
Agenda • The Motivation • The Technical Challenges • Capture & Replay for TTworkbench • Demo • Q & A
Motivation(s) TTCN-3 Users Non-TTCN-3 Users We see a scenario and we would like to replay it later Issues What means replayw.r.t. testing? What is the test system? What is the system under test? We have a TTCN-3 framework, where do the test cases come from? • Issues • Manual test case creation tedious task • Error prone • Domain Knowledge required The desire to capture observed communication in test scripts suitable for test automation
What is a Trace? • The observed communication is captured (stored) in a trace (file) • Trace contains • Communication between two or more entities • Message exchange • One or more protocols
A Generic Communication Setup A1 B1 . . . . . . A2 B2
The SetupBut Who is Who? A1 B1 A1 SUT SUT B1 IOP1 IOP2 SIM1 SIM2
The Setup From Message to Templates A1 B1 template INVITE_Request T1 := { requestLine := { method := “INVITE”, requestUri := “sip:dbo@192.168.89.76”, sipVersion := “SIP/2.0”}, msgHeader := { callId := “6929@127.0.0.1”, contact := …, cSeq := “2 INVITE”, fromField := "TESTER1 …" , toField := <sip:d@192.168.89.76>, via := …., maxForwards := { fieldName:= MAX_FORWARDS_E, forwards:= 70 }, .... allow := omit, ... INVITE sip:dbo@192.168.89.76 SIP/2.0 Call-ID: 6929@127.0.0.1 Contact: <sip:dbo1@127.0.0.1:5061;transport=UDP> Content-Disposition: session Content-Length: 150 Content-Type: application/sdp CSeq: 2 INVITE From: "TESTER1" <sip:dbo1@testingtech.de>;tag=1169 Max-Forwards: 70 To: <sip:d@192.168.89.76> Via: SIP/2.0/UDP 127.0.0.1:5061;branch=z9hG4bK5704 ...
The Technical Challenge • It is somehow easy to generate TTCN-3 templates from each message, but • the challenge is to obtain usable and maintainable test data andtest scripts • Variable information • From run to run, perhaps unpredictable • From message to message, perhaps constant perhaps dependend • Variable but constant information • Should be configurable before execution • White noise • Lot of information that is potentially irrelevant for a particular test scenario but inevitable for the test execution
The Technical Challenge • It is somehow easy to generate TTCN-3 templates from each message, but • the challenge is to obtain usable and maintainable test data and test scripts • Variable information • From run to run, perhaps unpredictable • From message to message, perhaps constant perhaps dependend • Variable but constant information • Should be configurable before execution • White noise • Lot of information that is potentially irrelevant for a particular test scenario but inevitable for the test execution Protocol and/or domain knowledge has to be included!
The Solution Automated TTCN-3 Test Generation and Execution
Example Scenario User A calls User B User B accept call SIP
Example Scenario Use a common Monitor Tool to capture messages e.g. Wireshark SIP Trace File
Example Scenario Put the Trace File into TTworkbench …. Generate the captured Test Scenarios… Execution Trace File TTworkbench Replay your previously captured Test Scenarios full automatically
Example Scenario Put the Trace File into TTworkbench …. Generate the captured Test Scenarios… Execution Trace File TTworkbench Replay your previously captured Test Scenarios full automatically
Know-How Integration • Manual definitions in a configuration file, to • Extract existing data and use the same values in the message flow (sequence numbers, call IDs, …) • Define uninteresting fields for ignoring at matching time • Automatically extract similar data from templates to create “better” templates and structures • Reuse existing • Type systems and codecs • Test adapters and component definitions • Test functions and Alt-Steps
Key Benefits • Speed up functional and interoperability testing • By reducing manual task • Automate testing • Generate your test, instead of implementing it manually • Execute them full automatically • Get your detailed test reports • Quality Optimization • Test case analyzer reduces errors in test cases • Fast reusability and easy extension of already defined tests
Supported Capturing Sources & Requirements • Wireshark • The most popular network analysis and capturing tool • JpcapService • The remote capturing service provides capturing on remote machines • Pcap Files • Trace files created beforehand • TTworkbench logs (TLZ) • Analyze the logs without an SUT • Capturing Console Input and Output • Capturing of data via serial connections (RS232, USB) • SSH, TELNET • Local Console • Windows • WinPCAP • Linux/Unix • Libpcapat least version 1.0 • Recommendation: InstallWireshark • IncludestheinstallationofWinPCAPandLibPCAP
Furtherinformation • Testing Technologies • testingtech.com • facebook.com-> Testing-Technologies • Capture & Replay • testingtech.com/products/ttworkbench.php • testingtech.com/download/datasheets/CaptureAndReplay.pdf
Contact Bogdan Stanca-Kaposta Testing Technologies stanca@testingtech.com Theo Vassiliou Testing Technologies vassiliou@testingtech.com