Using Sabre Red 360 Software Development Kit Sandbox Mode
Sabre Red 360 Software Development Kit Sandbox Mode is a feature that allows running and testing a Red App in isolated environment – without connectivity to Sabre infrastructure or real Sabre credentials. It may be useful as a temporary approach when your Sabre credentials are not set up yet and wanting to test the Sabre Red 360 Software Development Kit prior to develop a real Red App, or when you need to test your Red App in specifically hard to reproduce on real environment scenarios. Sandbox Mode allows you to emulate any Host response as well as any Sabre Web Service response. In Sandbox Mode you configure Agent Profile information (like ID, language, email address).
Sabre Red 360 Software Development Kit Sandbox Mode setup
Prerequisites
-
com.sabre.edge.platform.optional.sandbox
plugin needs to be added to your Target Platform and Run Configuration.
Run Configuration
Follow all steps for regular configuration and add the following:
-Dredapp.fake.session=true
to VM arguments section on Arguments tab.
Credentials
As there is no connection to Sabre infrastructure, no credentials are needed. However, you still will see login screen when running Platform in Sandbox Mode. To get pass it simply, enter any 6-digit Agent ID, non-empty password and any 4-character PCC.
First run
First run is required to extract sample XML file with sets of commands and responses. It will be located in your run configuration workspace in:
.metadata\.plugins\com.sabre.edge.platform.optional.sandbox\resources\default_emulator.xml.
Your run configuration workspace is by default in the same folder as your eclipse workspace.
Sample command set file
Sabre Red 360 Software Development Kit comes with a set of sample command/response test cases that you can change and extend providing responses that you expect for certain command. Command sets file contains 3 sections: one for host communication (both emulator and direct), one for SWS and one for agent profile data.
Host communication
<host-configuration>
<commandset id="001">
<command content="1KRKDFW">
<response>
<content>SIGN IN A</content>
</response>
<response delay="5000">
<content>SECOND RESPONSE</content>
</response>
</command>
</commandset>
</host-configuration>
Communication with Host is defined in this section. All commands should be defined in the same <commandset> tag. Currently, only one commandset tag is supported. Responses are defined within <content> tag. You can define one or many responses for a command. If delay attribute is defined for response it will be delivered after provided number of milliseconds. Multiple responses will be delivered in order they appear in the file.
SWS communication
<sws-configuration>
<actionset id="001">
<action content="OTA_AirAvailLLSRQ">
<response>
<content>
<![CDATA[
<test>TEST SWS RESPONSE</test>
]]>
</content>
</response>
</action>
</actionset>
</sws-configuration>
SWS communication is based on actions. You can define one XML answer for each action. Response is defined in <content> tag. Remember to put your xml content in <![CDATA[ ]]> tag.
Agent profile information
<profile-configuration>
<agent-id>AGENT_ID</agent-id>
<agency-name>AGENCY NAME</agency-name>
<pcc>PCC</pcc>
<language>LANGUAGE</language>
<country>COUNTRY</country>
<region>REGION</region>
<username>USERNAME</username>
<email>fake@email.com</email>
</profile-configuration>
In this section you can provide agent information that would be available with IAgentProfileService.