Saved Test Cases can be exported and imported. The Import/Export feature is particularly useful when you want to make global changes across all Cases, because you can export the Test Cases, make changes offline using any text editor, and then import them back in.
Exporting Test Cases
Multiple Test Cases can be exported simultaneously.
- To export Test Cases, from the Test Case Library page, select the Test Cases that need to be exported. Click the checkboxes adjacent to the Test Case names.
- Select Action
and then click the Export tab as shown:
- After the required files have been selected, select the Include Data Driven Parameter Values checkbox to include data driven parameter values in the exported file.
- Select the Include Services checkbox to add the Service Library definitions in the exported file.
- Select the Export
Type from the drop-down menu as shown below:
- You can choose to export as a Cyara XML
file, or to HP Quality Center/ALM. For more information, see the Exporting Test Cases to Cyara XML and
Exporting Test Cases to Excel 2003 XML
Spreadsheet sections. Note: Web Test Cases can be exported only as XML files.
- Click Ok to export. A wizard appears to aid the conversion and export to the selected format.
Test Cases you export will include the folder path of the Test Case they were exported from, relative to the root Test Cases folder.
Exporting Test Cases to Cyara XML
When you export Test Cases to the Cyara XML format, it will generate a single file with all selected Test Cases encoded in XML. This format is useful because it allows the Test Cases to be easily processed by other applications or easily transferred.
- When you select the Export to Cyara XML option and click Ok, the XML file is generated. A dialog box appears that allows you to save the file, open the file in an application that can process XML files, or cancel the operation and discard the file.
<?xml version="1.0" encoding="utf-8" ?>
<TestSpecification xmlns="TestSpecification.xsd">
<TestCases>
<TestCase>
<TestCaseName> Welcome Test TTS DTMF</TestCaseName>
<FolderPath />
<Description>Internal Testing</Description>
<PhoneNo>87654321</PhoneNo>
<Notes />
<AlertMsg />
<MinorThresholdCriticalCount>3</MinorThresholdCriticalCount>
<MajorThresholdCriticalCount>1</MajorThresholdCriticalCount>
<DataInputs />
<Steps>
<RingingStep>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MinorThresholdTime>5</MinorThresholdTime>
<MajorThresholdTime>10</MajorThresholdTime>
</RingingStep>
<CallSteps>
<Step>
<StepNo>1</StepNo>
<Description>Welcome</Description>
<ExpectedText>This is a test of the text to speech prompt It will last for only a few seconds But please press 1 or 2</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText>1</ReplyText>
<ReplyExchangeType>DTMF</ReplyExchangeType>
<MinorThresholdTime>1</MinorThresholdTime>
<MajorThresholdTime>2</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>2</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
<Step>
<StepNo>2</StepNo>
<Description>Step 2</Description>
<ExpectedText>The field was filled correctly So lets hangup now with the field</ExpectedText>
<ExpectedExchangeType>Speech</ExpectedExchangeType>
<ReplyText></ReplyText>
<ReplyExchangeType>DTMF</ReplyExchangeType>
<MinorThresholdTime>1.5</MinorThresholdTime>
<MajorThresholdTime>3</MajorThresholdTime>
<MinPauseTime>0</MinPauseTime>
<MaxPauseTime>0</MaxPauseTime>
<MajorConfidenceLevel>50</MajorConfidenceLevel>
<MinorConfidenceLevel>80</MinorConfidenceLevel>
<PostSpeechSilenceTimeout>5</PostSpeechSilenceTimeout>
<BlockPath />
</Step>
</CallSteps>
</Steps>
</TestCase>
</TestCases>
</TestSpecification>
Exporting Test Cases to Excel 2003 XML Spreadsheet
- When you select the Export to
Excel XML Spreadsheet option and click OK, the
XML file is generated. A dialog box will appear allowing you to save the
file, open the file in an application that can process XML files, or
cancel the operation and discard the file. Note: The Excel 2003 XML Spreadsheet format is supported in Excel 2013 and 2016.
Exporting to Quality Center
See the HP Quality Center Integration Chapter for more information.
Importing Test Cases
Multiple Test Cases can be imported simultaneously. The size of a Test Case import file should not exceed 52.4MB.
- To import Test Cases, click the Import
Test Case link and select the file you need imported.
- Select the file to be
uploaded using the
Select File... button.
All Test Cases imported will be created under the Test Cases folder by default. The imported file can be modified to add a folder path to the Test Cases, so that when they are imported, these Test Cases are created under the specified folder. If the specified folder path does not exist in the system, the folder will be created and Test Cases placed in this folder. Any Test Case imported with the same name will overwrite existing Test Cases with the same name. New Test Case names will result in a new Test Case.
There is no need to specify Test Cases in the folder path when editing the file, as the Test Case will be created under the Test Cases folder by default after a successful import. Alternatively, a single backslash (‘\’) may be used to explicitly specify the Test Cases folder.
For example, if the folder path is blank in the imported file, the Test Case will be created under the Test Cases folder. If the folder path is Phase 1, a folder named Phase 1 will be created under the Test Cases folder and the Test Case will be created under the Phase 1 folder.
After the Test Cases are imported successfully, the screen shown below
appears:
The Structure of Test Case XML is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<TestSpecification xmlns="TestSpecification.xsd">
Each Test Case contains mandatory elements and optional elements. These rules apply to the creation of a Test Case in the Cyara Web Portal and are the same as having a mandatory field and an optional one.
A <TestCaseType>
element contains:
-
<TestCaseName>
Mandatory -
<FolderPath>
Mandatory -
<Description>
Optional -
<PhoneNo>
Mandatory -
<Notes>
Optional -
<AlertFrequency>
Optional -
<AlertMsg>
Optional -
<MinorThresholdCriticalCount>
Mandatory -
<MajorThresholdCriticalCount>
Mandatory -
<Steps>
Mandatory <MediaType>
-
<MessageResolver>
Optional
The
<Steps>
element contains the Steps of the call
flow:
-
<RingingStep>
Mandatory -
<CallSteps>
Optional element block containing one or more call Steps.
The
<RingingStep>
contains:
-
<MinorThresholdTime>
Mandatory -
<MajorThresholdTime>
Mandatory -
<MinPauseTime>
Mandatory -
<MaxPauseTime>
Mandatory -
<ExpectTimeOut>
Mandatory
The
<CallSteps>
elements contain one or more
<Step>
elements.
The
<Step>
Element contains:
-
<StepNo>
Mandatory Step number starting from 1 -
<Description>
Mandatory -
<ExpectedText>
Mandatory -
<ExpectedExchangeType>
Optional element defaulted to “Speech” (can either be Speech, MPSR or PESQ). Speech or MPSR are the same. -
<ReplyText>
Optional -
<ReplyExchangeType>
Optional element defaulted to “Speech” (can either be Speech, DTMF, or AudioFile) -
<MinorThresholdTime>
Mandatory -
<MajorThresholdTime>
Mandatory -
<MinPauseTime>
Mandatory -
<MaxPauseTime>
Mandatory -
<PostSpeechSilenceTimeout>
Mandatory -
<BlockPath>
Optional -
<MinConfidenceLevel>
[deprecated] - if present, it will import into both Minor and Major confidence level values. IfMinConfidenceLevel
is present, thenMajorConfidenceLevel
andMinorConfidenceLevel
should not be present. -
<MajorConfidenceLevel>
- Mandatory, if<MinConfidenceLevel>
not present. Imports into Major Confidence Level. If present, thenMinorConfidenceLevel
also has to be present. -
<MinorConfidenceLevel>
- Mandatory, if<MinConfidenceLevel>
not present. Imports into Minor Confidence Level. If present, thenMajorConfidenceLevel
also has to be present.
A message resolver can be added to a Test Case while importing a Test Case XML. In
the following example, Expect is passed the {value} from the
<Expect>
function and the Reply is passed the {value}
from the <Reply>
function.
<MessageResolver>
<Name>Bot</Name>
<Expect><![CDATA[
Contains("div.filament-ai-chat-widget-messageList > div:last-child div.filament-ai-chat-widget-leftMessage","{Value}");]]></Expect>
<Reply><![CDATA[SetValue("textarea.filament-ai-chat-widget-messageInput","{Value}");
PressEnter("textarea.filament-ai-chat-widget-messageInput");]]></Reply>
</MessageResolver>
XML Schema for Web and Voice Test Cases are included in Appendix A - XML Schema for Test Case validation purposes.
Comments
0 comments
Please sign in to leave a comment.