This repository contains integration tests of the Expedia Group XAP Java SDK.
The following instructions apply if you want to run the integration tests locally.
- Ensure you have a valid API key and secret from Expedia Group. Check Getting started with XAP for more info.
- Java 1.8 or higher
- Maven
- Clone the repository.
- Navigate to the project directory
integrations
. - Run
mvn clean install
to build the project and install the dependencies including the XAP SDK.
- Navigate to the test class you want to run
- Right-click on the class name and select
More Run/Debug
->Modify Run Configuration
- Check the
Modify options
->Add VM options
and add the following VM options:Replace-Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" -Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}"
{API_KEY}
and{API_SECRET}
with your actual API key and secret.Note: If you are running the tests for Vrbo, you would need the following VM options instead:
-Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" -Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}"
The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your account manager.
- Click
OK
and then run the test class.
Run the following command to run all integration tests:
mvn failsafe:integration-test \
-Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" \
-Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" \
-Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" \
-Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}" \
-f pom.xml
If your key is enabled for both Expedia and Vrbo brands, you may use the same key and secret pair for the placeholders. Otherwise, you may run the tests separately by providing only the required key and secret. For example:
mvn failsafe:integration-test \
-Dit.test=TestClassName#testMethodName \
-Dcom.expediagroup.xapjavasdk.apikey="{API_KEY}" \
-Dcom.expediagroup.xapjavasdk.apisecret="{API_SECRET}" \
-f pom.xml
Replace TestClassName
and testMethodName
with the actual test class name and method name,
and {API_KEY}
and {API_SECRET}
with your actual API key and secret.
If
#testMethodName
is omitted, all test methods in the class will be executed.
If you are running the tests for Vrbo, you should use the following command instead:
mvn failsafe:integration-test \
-Dit.test=TestClassName#testMethodName \
-Dcom.expediagroup.xapjavasdk.vrbokey="{VRBO_KEY}" \
-Dcom.expediagroup.xapjavasdk.vrbosecret="{VRBO_SECRET}"
-f pom.xml
The key you use must be enabled for Vrbo brand. If you are not sure, please reach out to your account manager.
This project is licensed under the Apache License v2.0 - see the LICENSE for details.