forked from saucepleez/taskt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Ping Command and Provided Sample saucepleez#215
- Loading branch information
1 parent
9b5cb34
commit 83ef97e
Showing
5 changed files
with
142 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
taskt/Sample Scripts/3.x Use Case Samples/Ping Command Sample [3.6.0.0].xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Commands> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="CommentCommand" CommandID="1712aaf3-0843-4d3b-acf6-88a789234408" CommandName="CommentCommand" IsCommented="false" SelectionName="Add Code Comment" DefaultPause="0" LineNumber="1" PauseBeforeExeucution="false" v_Comment="Ping Host and Store in variable 'vRes'" CommandEnabled="true" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="PingCommand" CommandID="771db3af-0776-488a-aecf-c330bc950dc2" CommandName="PingCommand" IsCommented="false" SelectionName="Ping Command" DefaultPause="0" LineNumber="2" PauseBeforeExeucution="false" CommandEnabled="true" v_HostName="www.google.com" v_userVariableName="vRes" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="CommentCommand" CommandID="2be07455-d2da-46bd-972b-714221068054" CommandName="CommentCommand" IsCommented="false" SelectionName="Add Code Comment" DefaultPause="0" LineNumber="3" PauseBeforeExeucution="false" v_Comment="Show Raw Ping Reply" CommandEnabled="true" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="MessageBoxCommand" CommandID="01a1f140-dd9f-444f-be16-9a313faa1614" CommandName="MessageBoxCommand" IsCommented="false" SelectionName="Show Message" DefaultPause="0" LineNumber="4" PauseBeforeExeucution="false" CommandEnabled="true" v_Message="Ping Reply: {vRes}" v_AutoCloseAfter="0" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="CommentCommand" CommandID="eaa96062-c718-4077-ad5c-2bef6401f280" CommandName="CommentCommand" IsCommented="false" SelectionName="Add Code Comment" DefaultPause="0" LineNumber="5" PauseBeforeExeucution="false" v_Comment="Check Ping Reply Status" CommandEnabled="true" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="BeginIfCommand" CommandID="c5030ecd-26e4-4e37-a0dc-65e885f57666" CommandName="BeginIfCommand" IsCommented="false" SelectionName="Begin If" DefaultPause="0" LineNumber="6" PauseBeforeExeucution="false" CommandEnabled="true" v_IfActionType="Variable Compare"> | ||
<v_IfActionParameterTable> | ||
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="I6AcPionPara1Table060420.090102" msdata:UseCurrentLocale="true"> | ||
<xs:complexType> | ||
<xs:choice minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="I6AcPionPara1Table060420.090102"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="Parameter_x0020_Name" type="xs:string" minOccurs="0" /> | ||
<xs:element name="Parameter_x0020_Value" type="xs:string" minOccurs="0" /> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:choice> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> | ||
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> | ||
<DocumentElement> | ||
<I6AcPionPara1Table060420.090102 diffgr:id="I6AcPionPara1Table060420.0901021" msdata:rowOrder="0" diffgr:hasChanges="inserted"> | ||
<Parameter_x0020_Name>Value1</Parameter_x0020_Name> | ||
<Parameter_x0020_Value>{vRes => $.Status}</Parameter_x0020_Value> | ||
</I6AcPionPara1Table060420.090102> | ||
<I6AcPionPara1Table060420.090102 diffgr:id="I6AcPionPara1Table060420.0901022" msdata:rowOrder="1" diffgr:hasChanges="inserted"> | ||
<Parameter_x0020_Name>Operand</Parameter_x0020_Name> | ||
<Parameter_x0020_Value>is equal to</Parameter_x0020_Value> | ||
</I6AcPionPara1Table060420.090102> | ||
<I6AcPionPara1Table060420.090102 diffgr:id="I6AcPionPara1Table060420.0901023" msdata:rowOrder="2" diffgr:hasChanges="inserted"> | ||
<Parameter_x0020_Name>Value2</Parameter_x0020_Name> | ||
<Parameter_x0020_Value>0</Parameter_x0020_Value> | ||
</I6AcPionPara1Table060420.090102> | ||
<I6AcPionPara1Table060420.090102 diffgr:id="I6AcPionPara1Table060420.0901024" msdata:rowOrder="3" diffgr:hasChanges="inserted"> | ||
<Parameter_x0020_Name>Case Sensitive</Parameter_x0020_Name> | ||
<Parameter_x0020_Value>No</Parameter_x0020_Value> | ||
</I6AcPionPara1Table060420.090102> | ||
</DocumentElement> | ||
</diffgr:diffgram> | ||
</v_IfActionParameterTable> | ||
</ScriptCommand> | ||
<AdditionalScriptCommands> | ||
<ScriptCommand xsi:type="MessageBoxCommand" CommandID="9efc1e8d-6ac8-484b-ae23-6a2590eef601" CommandName="MessageBoxCommand" IsCommented="false" SelectionName="Show Message" DefaultPause="0" LineNumber="7" PauseBeforeExeucution="false" CommandEnabled="true" v_Message="The ping reply was successful!" v_AutoCloseAfter="0" /> | ||
</AdditionalScriptCommands> | ||
<AdditionalScriptCommands> | ||
<ScriptCommand xsi:type="ElseCommand" CommandID="8b35f960-7890-439f-b262-b9f69d212b78" CommandName="ElseCommand" IsCommented="false" SelectionName="Else" DefaultPause="0" LineNumber="8" PauseBeforeExeucution="false" CommandEnabled="true" /> | ||
</AdditionalScriptCommands> | ||
<AdditionalScriptCommands> | ||
<ScriptCommand xsi:type="MessageBoxCommand" CommandID="284d404e-1266-474c-8ced-830c721e52fe" CommandName="MessageBoxCommand" IsCommented="false" SelectionName="Show Message" DefaultPause="0" LineNumber="9" PauseBeforeExeucution="false" CommandEnabled="true" v_Message="The ping reply failed!" v_AutoCloseAfter="0" /> | ||
</AdditionalScriptCommands> | ||
<AdditionalScriptCommands> | ||
<ScriptCommand xsi:type="EndIfCommand" CommandID="cec7c299-dba8-45a2-8a87-92b0c896da54" CommandName="EndIfCommand" IsCommented="false" SelectionName="End If" DefaultPause="0" LineNumber="10" PauseBeforeExeucution="false" CommandEnabled="true" /> | ||
</AdditionalScriptCommands> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="CommentCommand" CommandID="565acdf5-5b0c-448a-bbca-b72b1a72ddca" CommandName="CommentCommand" IsCommented="false" SelectionName="Add Code Comment" DefaultPause="0" LineNumber="11" PauseBeforeExeucution="false" v_Comment="Extract RoundtripTime using Json Selector" CommandEnabled="true" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="MessageBoxCommand" CommandID="5bdf6b4f-3383-4bf3-8500-8cc7769307a6" CommandName="MessageBoxCommand" IsCommented="false" SelectionName="Show Message" DefaultPause="0" LineNumber="12" PauseBeforeExeucution="false" CommandEnabled="true" v_Message="Round Trip Time (Json Selector): '{vRes => $.RoundtripTime}'" v_AutoCloseAfter="0" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="CommentCommand" CommandID="4e4a192a-155d-407d-905e-47f41c1a8fd1" CommandName="CommentCommand" IsCommented="false" SelectionName="Add Code Comment" DefaultPause="0" LineNumber="13" PauseBeforeExeucution="false" v_Comment="Extract RoundtripTime using Parse Json Command" CommandEnabled="true" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="ParseJsonCommand" CommandID="4051a1a0-9787-4d49-9dbf-a14f5b5cf717" CommandName="ParseJsonCommand" IsCommented="false" SelectionName="Parse JSON Item" DefaultPause="0" LineNumber="14" PauseBeforeExeucution="false" CommandEnabled="true" v_InputValue="{vRes}" v_JsonExtractor="RoundtripTime" v_applyToVariableName="vRoundTripTime" /> | ||
</ScriptAction> | ||
<ScriptAction> | ||
<ScriptCommand xsi:type="MessageBoxCommand" CommandID="9738960d-787d-48a0-b608-a33ab59f40f1" CommandName="MessageBoxCommand" IsCommented="false" SelectionName="Show Message" DefaultPause="0" LineNumber="15" PauseBeforeExeucution="false" CommandEnabled="true" v_Message="Round Trip Time (Parse Json Item Command): {vRoundTripTime}" v_AutoCloseAfter="0" /> | ||
</ScriptAction> | ||
</Commands> | ||
<Variables> | ||
<ScriptVariable> | ||
<VariableName>vRes</VariableName> | ||
<VariableValue xsi:type="xsd:string"></VariableValue> | ||
</ScriptVariable> | ||
<ScriptVariable> | ||
<VariableName>vRoundTripTime</VariableName> | ||
<VariableValue xsi:type="xsd:string"></VariableValue> | ||
</ScriptVariable> | ||
</Variables> | ||
</Script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters