Content is user-generated and unverified.

📘 Getting Started with NDC INTEGRATION Automation Script

📘 Overview

This guide explains how to set up and run the automation testing suite using TestNG + Java + SHAFT Engine for [NDC_INTEGRATION_AUTOMATION]. The project currently covers the following functionalities:

🛠 Admin Module

  • Edit supplier
  • Add supplier credential fields
  • Add supplier credentials
  • Create a branch
  • Create an agency
  • Add rule engine configurations:
    • For Agency
    • For Branch
  • Search for flights

🌐 Portal Module

  • Booking a one-way trip
  • Booking a round trip
  • Booking a multi-city trip

⚠ Precautions & Limitations

Please review the following important notes before running the automation scripts:

📌 Limited Test Case Coverage for Supplier Migration

This automation script should not be solely relied upon for full supplier migration testing. It only covers the specific test cases documented in this guide. Any additional edge cases, negative flows, or scenarios outside the listed coverage must be tested manually or through extended automation.

📌 Portal Rule Engine Must Be Configured

Before running any portal-related automation scripts, ensure that a Rule Engine is created for the portal that includes the supplier you want to test.

⚠️ If the rule engine is missing, the search and booking functions will fail or behave unexpectedly.

📌 Avoid Using Suppliers with Production Credentials

The script does not differentiate between staging and production credentials. If used with a supplier configured with production credentials, it will proceed to book real flights without any warning.

Always verify that you are using staging or test credentials before running the script.

📌 Do Not Add Multiple Suppliers to a Branch or Portal

Ensure that only the supplier intended for testing is added to the branch and portal configurations.

⚠️ Adding multiple suppliers may lead to conflicts during rule application, incorrect bookings, or test failures.


🖥️ Prerequisites

Ensure you have the following tools installed:

  • Java version "22.0.2"
  • Maven 3.9.8
  • TestNG plugin (optional for IDE)
  • IntelliJ IDEA / Eclipse
  • Git (to clone the repository)
  • Google Chrome (or other supported browser)

📂 Project Structure

NDC_Automated
│
├── .idea/                        # IntelliJ config files
├── allure-report/               # Allure test reports
├── allure-results/              # Allure raw result files
├── Screenshots/                 # Screenshots captured during test failures
│
├── src/
│   ├── main/
│   └── test/
│       └── java/
│           └── TestPackage/
│               ├── BasePage/
│               ├── Login/
│               │   └── LoginPageTC.java
│               ├── MileStoneOne/
│               │   ├── Branch/
│               │   ├── Supplier/
│               │   ├── End2EndScnario.java
│               │   └── SearchAboutOneWayTripsTC.java
│               ├── MileStoneTwo/
│               │   └── DashBoardModulePageTC.java
│               ├── E2E/
│               └── Utilities/
│
├── resources/
│   └── Reqartion.xml            # TestNG suite configuration file

⚙️ Setup Instructions

1. Clone the repo

bash
git clone https://github.com/muhamedsolliman/NDC.git

2. Install dependencies

bash
mvn clean install

3. Update testng.xml (if needed)

Modify testng.xml to include/exclude desired test cases.


▶️ Running Test Cases

Admin Test Classes

  • AddSupplierPageTC
  • CreateSupplierCredentialFieldTC
  • NewFlightTC (supplier credentials)
  • AddNewBranchTC
  • CreateAGN_TC
  • AddingDiscountTC
  • AddingServiceChargeTC
  • SearchBookingBranchTC

▶️ Run all admin scenarios together:

Use the class: E2EAdmin

Portal Test Classes

  • SearchBookingAgencyTcOneWayNew
  • SearchBookingAgencyRoundTripTC
  • SearchBookingAgencyMultiCitiesTripTC

🧾 Test Data Configuration

Each test case retrieves its test data from a corresponding JSON file stored separately for clarity and reusability.

📂 Admin Tests

Test ClassData File
AddSupplierPageTCSupplierData.json
CreateSupplierCredentialFieldTCSupplierCredentialField.json
NewFlightTCFlightDate.json
AddNewBranchTCNewBranchData.json
CreateAGNAddAgencyData.json
addingDiscountTCDiscountData.json
addingServiceChargeTCServiceChargeData.json
SearchBookingBranchTCsearchBookingBrData.json

📂 Portal Tests

Test ClassData File
SearchBookingAgencyTcOneWayNewSearchBooking.json
SearchBookingAgencyRoundTripTCSearchBooking.json
SearchBookingAgencyMultiCitiesTripTCSearchBooking.json

🔹 Note: The JSON files are typically located under the src/test/resources/testData directory, and are loaded dynamically during test execution.


✅ Test Scenarios Covered by the Automation Script

Below is the list of scenarios automated in this project.

📂 Admin Module

  • Verify that a new supplier can be added successfully
  • Verify that supplier credential fields can be created correctly
  • Verify that a new credential can be created with valid data
  • Verify that a new branch can be added successfully
  • Verify that a new agency (AGN) can be created successfully
  • Verify that a discount can be added to an agency and a branch
  • Verify that a booking can be searched from the branch dashboard

📂 Portal Module

  • Verify that a one-way trip can be booked successfully
  • Verify that a round-trip can be booked successfully
  • Verify that a multi-city trip can be booked successfully

✅ Test Cases – Flight Booking Verification [One Way - Round Trip - Multi Cities]

#Test Case TitleExpected Result
1Verify that the data displayed on the body of the ticket matches the flight details (Airline, Flight number, Cabin Class, Departure Time, Source, Duration, Arrival Time, Destination, Layover)All displayed ticket data matches the original flight details
2Verify that the discount and service charges were applied and calculated correctlyDiscount and service charges are applied and calculated accurately in the total fare
3Verify that the final price on the ticket body equals the final price in the fare detailsFinal price on the ticket matches the final fare shown in the fare details
4Verify that the prices on the fare details are calculated correctly (Base fare, Taxes, Fees, etc.)All fare components are calculated correctly and sum to the expected total
5Verify that flight details on the search page match the flight details in the fare confirmation (Airline, Flight number, Cabin Class, Departure Time, Departure Date, Source, Duration, Arrival Time, Destination, Arrival Airport)Flight details in both locations are identical
6Verify that fare details on the search page match the fare details in the fare confirmationFare breakdown and totals are the same in both search and confirmation
7Verify that the fare breakup on the "Add Passenger Details" page is calculated successfullyFare breakup is displayed and calculated correctly
8Verify that the total amount on the fare breakup page equals the total amount on the ticketTotal fare shown in fare breakup matches the final ticket total
9Verify that the flight details on the ticket are the same as the flight details in the fare confirmationTicket flight details match the fare confirmation exactly
10Verify that the fare breakup on the ticket is calculated correctlyFare components on the ticket are correct and total is accurate
11Verify that a PNR is retrieved and the booking is successfulValid PNR is generated and the booking status is marked as successful

👥 Contributors / Maintainers

RoleNameContact
MaintainerMohamed M. Solimanmohamed.soliman@tildetech.ae
ReviewerAhmed el Tokhiahmed.eltokhi@tildetech.ae
Content is user-generated and unverified.
    NDC Integration Automation Script - User Guide | Claude