SlideShare a Scribd company logo
© 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

More Related Content

What's hot

Тестирование Spring-based приложений
Тестирование Spring-based приложенийТестирование Spring-based приложений
Тестирование Spring-based приложений
Vitebsk Miniq
 
Alteryx SDK
Alteryx SDKAlteryx SDK
Alteryx SDK
James Dunkerley
 
Completable future
Completable futureCompletable future
Completable future
Srinivasan Raghvan
 
.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
aminmesbahi
 
HTL Compilers and Tooling
HTL Compilers and ToolingHTL Compilers and Tooling
HTL Compilers and Tooling
Radu Cotescu
 
7.Spring DI_2
7.Spring DI_27.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 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-02
Sven 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 CompletableFutures
Haim Yadid
 
Servlets - filter, listeners, wrapper, internationalization
Servlets -  filter, listeners, wrapper, internationalizationServlets -  filter, listeners, wrapper, internationalization
Servlets - filter, listeners, wrapper, internationalization
susant 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 14
aminmesbahi
 
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
Jeetendra 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 Miss
Andres 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 13
aminmesbahi
 
Spring AOP
Spring AOPSpring AOP
Spring AOP
Lhouceine OUHAMZA
 
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
IOSR 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 12
aminmesbahi
 

What's hot (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
 

Similar to 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 Extended
Toru 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.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
DayNightGaMiNg
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java ant tutorial
Ashoka Vanjare
 
react-slides.pdf
react-slides.pdfreact-slides.pdf
react-slides.pdf
DayNightGaMiNg
 
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
janet736113
 
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 Automation
securityxploded
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
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
Tim 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 Plugins
IBM UrbanCode Products
 
Spring boot
Spring bootSpring boot
Spring boot
sdeeg
 
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
Dragos_Mihailescu
 
Hybrid automation framework
Hybrid automation frameworkHybrid automation framework
Hybrid automation framework
doai tran
 

Similar to 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
 
Ant tutorial
Ant tutorialAnt tutorial
Ant tutorial
 
Java ant tutorial
Java ant tutorialJava ant tutorial
Java 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
 

Recently uploaded

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

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