SlideShare ist ein Scribd-Unternehmen logo
1 von 15
© 2011 LogiGear Corporation. All Rights Reserved
Python Harness inPython Harness in
TestArchitectTestArchitect
Created by: Han Trung TruongCreated by: Han Trung Truong
© 2011 LogiGear Corporation. All Rights Reserved
ContentContent
Introduction of Harness
Python harness installation
Python harness content
Harness working on TestArchitect
Example
Debug Python functions via Eclipse
© 2011 LogiGear Corporation. All Rights Reserved
Introduction of harnessIntroduction of harness
 Interpretation of TestArchitect tests is a task of a "harness"
 A harness is a program or script that is able to interpret and
execute actions
 It can be implemented in a variety of scripting or
programming languages, like Python, Java, C#, C++, etc
 TestArchitect comes with a pre-built harness called
"taplayback.exe", but this is a binary that you can't modify
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
These are steps to setup/install Python harness:
1.Install python-2.6.6.msi
2.Install pywin32-214.win32-py2.6.exe
3.Install pycrypto-2.1.0.win32-py2.6.exe
4.Install MySQL-python-1.2.2.win32-py2.6.exe
5.Add “C:Python26” to “Environment Variables” (System
variables)
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
6. Launch “cmd.exe” window, change directory to “paramiko”
folder, then install “paramiko” using python command
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
7. Extract “harness_CiscoSport.zip” to a folder on your system
(i.e.: C:harness_CiscoSport)
8. Edit the harness directory in “run.bat” file in
“C:harness_CiscoSport”
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
9. Finally point TA automation tool to the “run.bat” file
© 2011 LogiGear Corporation. All Rights Reserved
Python harness installationPython harness installation
Needed items are located in:
Item Location
Eclipse 192.168.170.177Harness trainingeclipse
Harness 192.168.170.177Harness trainingharness_CiscoSport
Python installation 192.168.170.177Harness trainingPython Installation.zip
TestArchitect 6.1.1.7 data-serverLogiGearVNTest Architect buildsTANG Main
BuildsBuild 6.16.1.1.7
Document 192.168.170.177Harness trainingDocument
© 2011 LogiGear Corporation. All Rights Reserved
Python harness contentPython harness content
 Harness Folder contains two main items: “run.bat” file and
“src” folder.
 “run.bat” file is an Automation Tools and specified on the
first run or debugging test.
 “src” folder contains sub folders:
• “Python” including main TA libraries and classes
• “user” consisting of libraries, classes and modules
created by users.
© 2011 LogiGear Corporation. All Rights Reserved
Harness working on TestArchitectHarness working on TestArchitect
 When executing TMs, TA compiles and stores data in text files at:
 C:Documents and SettingsAll UsersApplication DataLogiGearTestArchitectDataSERVERS{TA
project ID}files{TM Name} on XP
 C:UsersPublic LogiGearTestArchitectDataSERVERS{TA project ID}files{TM Name} on Win 7
and Vista
 Theses files contain all actions that we wrote in scripts.
 Harness have to start its execution from main.py file.
 After the execution, name of the executed text file will be displayed
at “test file name” setting of run.dat file (which is located in
C:Documents and SettingsAll UsersApplication
DataLogiGearTestArchitect)
© 2011 LogiGear Corporation. All Rights Reserved
Harness working on TestArchitectHarness working on TestArchitect
© 2011 LogiGear Corporation. All Rights Reserved
ExampleExample
 The py file containing harness actions must have 2 main functions SetActions() and
Divert(actionName). Below is an example of “mod_Actions.py” file.
def SetActions():
module = "actions"
LIBRARY.SetActionScript("enter value", module, 1)
LIBRARY.SetActionScript("check url", module, 1)
def Divert(actionName):
result = True
if actionName == "enter value":
action_entervalue()
elif actionName == "check url":
action_checkurl()
else:
result = False
LIBRARY.ReportError("Don't know action: " + actionName)
return result
 "actions" is name of the module; “enter value” and “check url” are the action name
used in TA
 action_entervalue() and action_checkurl() are two functions created within the
module. If any additional functions are created, their information must be set and
diverted in SetActions() and Divert() functions.
© 2011 LogiGear Corporation. All Rights Reserved
 To debug action via Eclipse we need to compile TM that
contains the action in TA to create file text.
 Open Eclipse and find function that you want to debug, set
breakpoint.
 Open main.py file, right click and select debug as -> python
run
 When Harness run it will stop at the break point.
 Press F5 (go to next function) or F6 (step into function) to
debug line by line and see value return in Eclipse.
Debug Python functions via EclipseDebug Python functions via Eclipse
© 2011 LogiGear Corporation. All Rights Reserved
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Тестирование Spring-based приложений
Тестирование Spring-based приложенийТестирование Spring-based приложений
Тестирование Spring-based приложенийVitebsk Miniq
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16aminmesbahi
 
HTL Compilers and Tooling
HTL Compilers and ToolingHTL Compilers and Tooling
HTL Compilers and ToolingRadu Cotescu
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqelajobandesther
 
Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02Sven Ruppert
 
The Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesThe Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesHaim Yadid
 
Servlets - filter, listeners, wrapper, internationalization
Servlets -  filter, listeners, wrapper, internationalizationServlets -  filter, listeners, wrapper, internationalization
Servlets - filter, listeners, wrapper, internationalizationsusant sahu
 
.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14aminmesbahi
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flaskJeetendra singh
 
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Priyanka Aash
 
Java Libraries You Can't Afford to Miss
Java Libraries You Can't Afford to MissJava Libraries You Can't Afford to Miss
Java Libraries You Can't Afford to MissAndres Almiray
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13aminmesbahi
 
Manual Unpacking Of Upx Packed Executable Using Ollydbg and Importrec
Manual Unpacking Of Upx Packed Executable Using Ollydbg and ImportrecManual Unpacking Of Upx Packed Executable Using Ollydbg and Importrec
Manual Unpacking Of Upx Packed Executable Using Ollydbg and ImportrecIOSR Journals
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12aminmesbahi
 

Was ist angesagt? (20)

Тестирование Spring-based приложений
Тестирование Spring-based приложенийТестирование Spring-based приложений
Тестирование Spring-based приложений
 
Alteryx SDK
Alteryx SDKAlteryx SDK
Alteryx SDK
 
Completable future
Completable futureCompletable future
Completable future
 
.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16.NET Core, ASP.NET Core Course, Session 16
.NET Core, ASP.NET Core Course, Session 16
 
HTL Compilers and Tooling
HTL Compilers and ToolingHTL Compilers and Tooling
HTL Compilers and Tooling
 
Spring hibernate jsf_primefaces_intergration
Spring hibernate jsf_primefaces_intergrationSpring hibernate jsf_primefaces_intergration
Spring hibernate jsf_primefaces_intergration
 
7.Spring DI_2
7.Spring DI_27.Spring DI_2
7.Spring DI_2
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02Proxy Deep Dive JUG Saxony Day 2015-10-02
Proxy Deep Dive JUG Saxony Day 2015-10-02
 
The Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesThe Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFutures
 
Servlets - filter, listeners, wrapper, internationalization
Servlets -  filter, listeners, wrapper, internationalizationServlets -  filter, listeners, wrapper, internationalization
Servlets - filter, listeners, wrapper, internationalization
 
.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14.NET Core, ASP.NET Core Course, Session 14
.NET Core, ASP.NET Core Course, Session 14
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flask
 
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
 
Java Libraries You Can't Afford to Miss
Java Libraries You Can't Afford to MissJava Libraries You Can't Afford to Miss
Java Libraries You Can't Afford to Miss
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
 
Spring AOP
Spring AOPSpring AOP
Spring AOP
 
Manual Unpacking Of Upx Packed Executable Using Ollydbg and Importrec
Manual Unpacking Of Upx Packed Executable Using Ollydbg and ImportrecManual Unpacking Of Upx Packed Executable Using Ollydbg and Importrec
Manual Unpacking Of Upx Packed Executable Using Ollydbg and Importrec
 
.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12.NET Core, ASP.NET Core Course, Session 12
.NET Core, ASP.NET Core Course, Session 12
 
54240326 copy
54240326   copy54240326   copy
54240326 copy
 

Ähnlich wie Python harness fundamental

Python harness exercises
Python harness exercisesPython harness exercises
Python harness exercisesRobin0590
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Edureka!
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologieselliando dias
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryjanet736113
 
Django framework
Django framework Django framework
Django framework TIB Academy
 
Selenium Automation in Java Using HttpWatch Plug-in
 Selenium Automation in Java Using HttpWatch Plug-in  Selenium Automation in Java Using HttpWatch Plug-in
Selenium Automation in Java Using HttpWatch Plug-in Sandeep Tol
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automationsecurityxploded
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC FrameworkBala Kumar
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Pythongturnquist
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
Declare and write your own ta action
Declare and write your own ta actionDeclare and write your own ta action
Declare and write your own ta actionRobin0590
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsIBM UrbanCode Products
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
Extend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsExtend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsDragos_Mihailescu
 
Hybrid automation framework
Hybrid automation frameworkHybrid automation framework
Hybrid automation frameworkdoai tran
 

Ähnlich wie Python harness fundamental (20)

Python harness exercises
Python harness exercisesPython harness exercises
Python harness exercises
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
react-slides.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java ant tutorial
 
Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
 
react-slides.pdf
react-slides.pdfreact-slides.pdf
react-slides.pdf
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react library
 
Django framework
Django framework Django framework
Django framework
 
Selenium Automation in Java Using HttpWatch Plug-in
 Selenium Automation in Java Using HttpWatch Plug-in  Selenium Automation in Java Using HttpWatch Plug-in
Selenium Automation in Java Using HttpWatch Plug-in
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automation
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
Declare and write your own ta action
Declare and write your own ta actionDeclare and write your own ta action
Declare and write your own ta action
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with Plugins
 
Spring boot
Spring bootSpring boot
Spring boot
 
Extend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsExtend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation steps
 
Hybrid automation framework
Hybrid automation frameworkHybrid automation framework
Hybrid automation framework
 

Kürzlich hochgeladen

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Python harness fundamental

  • 1. © 2011 LogiGear Corporation. All Rights Reserved Python Harness inPython Harness in TestArchitectTestArchitect Created by: Han Trung TruongCreated by: Han Trung Truong
  • 2. © 2011 LogiGear Corporation. All Rights Reserved ContentContent Introduction of Harness Python harness installation Python harness content Harness working on TestArchitect Example Debug Python functions via Eclipse
  • 3. © 2011 LogiGear Corporation. All Rights Reserved Introduction of harnessIntroduction of harness  Interpretation of TestArchitect tests is a task of a "harness"  A harness is a program or script that is able to interpret and execute actions  It can be implemented in a variety of scripting or programming languages, like Python, Java, C#, C++, etc  TestArchitect comes with a pre-built harness called "taplayback.exe", but this is a binary that you can't modify
  • 4. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation These are steps to setup/install Python harness: 1.Install python-2.6.6.msi 2.Install pywin32-214.win32-py2.6.exe 3.Install pycrypto-2.1.0.win32-py2.6.exe 4.Install MySQL-python-1.2.2.win32-py2.6.exe 5.Add “C:Python26” to “Environment Variables” (System variables)
  • 5. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation
  • 6. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation 6. Launch “cmd.exe” window, change directory to “paramiko” folder, then install “paramiko” using python command
  • 7. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation 7. Extract “harness_CiscoSport.zip” to a folder on your system (i.e.: C:harness_CiscoSport) 8. Edit the harness directory in “run.bat” file in “C:harness_CiscoSport”
  • 8. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation 9. Finally point TA automation tool to the “run.bat” file
  • 9. © 2011 LogiGear Corporation. All Rights Reserved Python harness installationPython harness installation Needed items are located in: Item Location Eclipse 192.168.170.177Harness trainingeclipse Harness 192.168.170.177Harness trainingharness_CiscoSport Python installation 192.168.170.177Harness trainingPython Installation.zip TestArchitect 6.1.1.7 data-serverLogiGearVNTest Architect buildsTANG Main BuildsBuild 6.16.1.1.7 Document 192.168.170.177Harness trainingDocument
  • 10. © 2011 LogiGear Corporation. All Rights Reserved Python harness contentPython harness content  Harness Folder contains two main items: “run.bat” file and “src” folder.  “run.bat” file is an Automation Tools and specified on the first run or debugging test.  “src” folder contains sub folders: • “Python” including main TA libraries and classes • “user” consisting of libraries, classes and modules created by users.
  • 11. © 2011 LogiGear Corporation. All Rights Reserved Harness working on TestArchitectHarness working on TestArchitect  When executing TMs, TA compiles and stores data in text files at:  C:Documents and SettingsAll UsersApplication DataLogiGearTestArchitectDataSERVERS{TA project ID}files{TM Name} on XP  C:UsersPublic LogiGearTestArchitectDataSERVERS{TA project ID}files{TM Name} on Win 7 and Vista  Theses files contain all actions that we wrote in scripts.  Harness have to start its execution from main.py file.  After the execution, name of the executed text file will be displayed at “test file name” setting of run.dat file (which is located in C:Documents and SettingsAll UsersApplication DataLogiGearTestArchitect)
  • 12. © 2011 LogiGear Corporation. All Rights Reserved Harness working on TestArchitectHarness working on TestArchitect
  • 13. © 2011 LogiGear Corporation. All Rights Reserved ExampleExample  The py file containing harness actions must have 2 main functions SetActions() and Divert(actionName). Below is an example of “mod_Actions.py” file. def SetActions(): module = "actions" LIBRARY.SetActionScript("enter value", module, 1) LIBRARY.SetActionScript("check url", module, 1) def Divert(actionName): result = True if actionName == "enter value": action_entervalue() elif actionName == "check url": action_checkurl() else: result = False LIBRARY.ReportError("Don't know action: " + actionName) return result  "actions" is name of the module; “enter value” and “check url” are the action name used in TA  action_entervalue() and action_checkurl() are two functions created within the module. If any additional functions are created, their information must be set and diverted in SetActions() and Divert() functions.
  • 14. © 2011 LogiGear Corporation. All Rights Reserved  To debug action via Eclipse we need to compile TM that contains the action in TA to create file text.  Open Eclipse and find function that you want to debug, set breakpoint.  Open main.py file, right click and select debug as -> python run  When Harness run it will stop at the break point.  Press F5 (go to next function) or F6 (step into function) to debug line by line and see value return in Eclipse. Debug Python functions via EclipseDebug Python functions via Eclipse
  • 15. © 2011 LogiGear Corporation. All Rights Reserved Thank you