ACE Foundation Certification

advertisement
Practical integration of TTCN-3
with Robot test automation
framework and Jenkins continuous
integration tool.
TTCN-3 Users Conference
Rajesh Kumar Bathina,
Technical Leader, Wipro Technologies
1
© 2012 WIPRO LTD | WWW.WIPRO.COM
Version 1.0a, 23rd April 2012
Candidate Details
Photo
2
Name
Rajesh Kumar Bathina
Organization
Wipro Technologies
E-Mail ID
kumar.rajesh@wipro.com
Phone number
+49 151 4350 5388
Date of Presentation
13th June’ 2012
© 2012 WIPRO LTD | WWW.WIPRO.COM
Overview
3
© 2012 WIPRO LTD | WWW.WIPRO.COM
Overview
 TTCN-3 provides us various flavours of testing techniques and varied
advantages.
 I will focus on one such implementation which integrates TTCN-3 with Robot test
automation framework and Jenkins continuous integration system to provide Endto-End automation.
 We have practically achieved the interworking of TTCN-3, Robot test automation
framework and Jenkins CI system for one of our vendors.
 I have considered a requirement in which TTCN-3 should interacting with SUT and
at the same time the test case requires to perform some GUI validations
(NMS/EMS) or external interface notifications.
 In such scenarios using TTCN-3 alone might not provided complete automation and
so we might use some thirdparty freeware tools to interwork with our automation
framework to make it complete.
 Subsequent slides will provide the details of our approach to address above issues.
4
© 2012 WIPRO LTD | WWW.WIPRO.COM
TTCN-3 integration with Robot
Above picture shows a practical integration
of TTCN-3 with other free ware tools Robot
test automation framework.
5
© 2012 WIPRO LTD | WWW.WIPRO.COM
TTCN-3 integration with Robot cont..
• Robot and its advantages
 Robot is a keyword driven generic test automation framework built using python widely
used for acceptance testing.
 Robot's testing capabilities can be extended by test libraries implemented either
with Python or Java
 Users can define new keywords from existing ones to implement a wider
functionality.
 The Robot framework includes an external test library named selenium used for
web testing as well Java GUI testing.
• Integration with TTCN-3 server
 In our implementation, the Robot was made to trigger the TTCN-3 test case execution
always and then it gives control to TTCN-3 thus the test case execution continues.
 Above point is achieved by making the Robot login to the TTCN-3 Linux server and
trigger the test case.
 Robot has the luxury to run preamble before the test cases execution at TTCN starts
and then releases the control to TTCN server for further execution.
 Once the control is sent to TTCN-3, the actual execution will take place between the
components and the SUT.
6
© 2012 WIPRO LTD | WWW.WIPRO.COM
Detailed Approach
External Synchronization control send (A)
Web /GUI client
TTCN-3 Tester
Network Element
External Synchronization control receive (B)
 One of the PTC will have an external sync port which has connectivity to the Robot PC
and using this port the TTCN-3 will send control to Robot. Refer to ‘A’ in above diagram.
 On receiving the control Robot can perform any intended GUI/Web validation like
checking for alarms in NMS, setting some parameters in GUI.
 Thus the TTCN-3 PTC will be on wait mode till the external validation or notification is
completed by Robot.
 Soon after the required task is completed by Robot, the control will then be released to PTC
for the rest of the test case execution. Refer to ‘B’ in above diagram.
 Finally Robot gets the control after the TTCN-3 execution completion which will perform
postamble operation.
7
© 2012 WIPRO LTD | WWW.WIPRO.COM
Jenkins integration with Robot and TTCN-3
 Jenkins is an application which monitors executions of repeated jobs, such as building a
software project or jobs run by cron jobs.
 We can integrate Jenkins to build a batch of Robot cases to be executed in parallel on
multiple network setups and to monitor the execution.
 We can create jobs in Jenkins to include multiple test cases and this can be executed as
nightly regression batches
JENKINS PC
Detailed
reporting of
Test Case
execution
and pass
percentage
Robot Case-1
Robot Case-2
Robot Case-3
Robot Case-4
…
…
…
Robot Case-n
TTCN-3 Tester
Web /GUI client
Note: Jenkins can be configured on either Linux or Windows environment
8
© 2012 WIPRO LTD | WWW.WIPRO.COM
Jenkins integration with Robot and TTCN-3 cont..
 Jenkins provides the luxury of configuring e-mails to get real-time notifications on failures at
the end of the regression suite execution.
 We can achieve following advantages by integrating TTCN-3 with Robot and Jenkins:
o Man Machine Language commands required to be sent to the Network Element during
the test case execution or as preamble/postamble.
o NMS/EMS or GUI validation during the TTCN-3 test case execution
o Configuration changes on far end Network elements during execution.
9
© 2012 WIPRO LTD | WWW.WIPRO.COM
Benefits of Integration
 Achieve end-to-end automation which includes GUI validation during the TTCN-3 case
execution.
 Interop testing which requires configuration modifications on far end network element is
possible by using this approach where any configuration changes needed during the
execution that affects the behaviour of SUT can be achieved
 Most of our network testing and system testing will require us to perform some GUI validation
or web based application checking during the case exection
 This can be integrated with existing
 This approach is in use in our project to manage nightly regression execution and reporting via
emails.
10
© 2012 WIPRO LTD | WWW.WIPRO.COM
References
• Robot Test Automation Framework
 http://code.google.com/p/robotframework/
• Jenkins Continuous Integration tool
• http://jenkins-ci.org/
11
© 2012 WIPRO LTD | WWW.WIPRO.COM
Thank You
Rajesh Kumar Bathina
Wipro Technologies
12
© 2012 WIPRO LTD | WWW.WIPRO.COM
Download