Skip to content

TugbaKilic33/EJunkieDemoCucumberTests

Repository files navigation

πŸ§ͺ E-Junkie Cucumber Automation Project

πŸ“Œ Table of Contents


πŸ“„ Project Description

This project automates functional UI tests for the E-Junkie demo shop using Java, Selenium WebDriver, Cucumber, TestNG, and the Page Object Model (POM). The project adopts BDD principles and parallel test execution for scalable automation.

πŸ’ͺ Key Features:

  • Cucumber with Gherkin syntax for human-readable test cases
  • TestNG + XML execution with browser parameterization
  • Thread-safe WebDriver management with ThreadLocal
  • ExtentReports Integration for both HTML and PDF reporting

🏠 Project Structure

E-JunkieDemoShopProject_Cucumber/
β”œβ”€β”€ src/
β”‚   └── test/
β”‚       β”‚
β”‚       β”œβ”€β”€ java/
β”‚       β”‚   β”œβ”€β”€ featureFiles/                # .feature files written in Gherkin
β”‚       β”‚   β”œβ”€β”€ hooks/                       # Cucumber Hooks (Before/After)
β”‚       β”‚   β”œβ”€β”€ pages/                       # Page Object Model classes
β”‚       β”‚   β”œβ”€β”€ runners/                     # TestNG runner classes
β”‚       β”‚   β”‚   └── XML/                     # TestNG XML configuration files
β”‚       β”‚   β”œβ”€β”€ stepDefinitions/             # Cucumber step definitions
β”‚       β”‚   └── utilities/                   # Driver, ConfigReader, ExtentReportManager, etc.
β”‚       └── resources/
β”‚           β”œβ”€β”€ fonts/                       # Fonts used in reports
β”‚           β”œβ”€β”€ extent.properties            # ExtentReports configuration
β”‚           └── pdf-cucumber-report-config.yaml
β”œβ”€β”€ testGifs/                                # GIFs used in reports
β”œβ”€β”€ testReports/                             # Spark & PDF report output (auto-generated)
β”œβ”€β”€ configuration.properties                 # General test configuration
β”œβ”€β”€ pom.xml                                  # Maven build configuration
└── README.md

🧰 Technologies Used

Tool / Library Description
Java JDK 21 Programming Language
Selenium WebDriver 4.31.0 Web Automation Library
Cucumber 7.20.0 BDD Testing Framework
TestNG 7.10.2 Test Execution Engine
ExtentReports + Adapter 1.14.0 Spark + PDF reporting integration
Apache POI 5.2.5 Excel File Handling
Maven Project Build + Dependency Manager
SLF4J + Log4j Logging
Healenium-web Locator catching

πŸš€ Installation

  1. Clone the repository:
    git clone https://github.com/zaferatakli/E-JunkieDemoShopProject_Cucumber.git
  2. Open the project in IntelliJ IDEA or your preferred IDE.
  3. Run:
    mvn clean install

πŸ› οΈ Usage

  • To execute all tests with default configuration:
    mvn test
  • To run specific browser tests:
    • Open singleBrowserTesting.xml or parallelBrowserTesting.xml in the runners/XML/ folder.
    • Right-click and run the XML file.

πŸ“¦ Dependencies

All required dependencies are declared in pom.xml. Ensure Maven updates all packages automatically.

Key dependencies include:

  • Selenium
  • Cucumber Java & TestNG
  • ExtentReports (Spark & PDF)
  • SLF4J + Log4j
  • Healenium-web

🧰 User Stories & Test Scenarios

1️⃣ US_301 - Add eBook to cart & invalid promo code

πŸ“Œ As a customer, I want to add an eBook to the basket and try applying an invalid promo code, so I can check whether the system correctly displays the "Invalid promo code" warning.

βœ… Expected: "Invalid promo code" warning message is displayed after clicking β€œApply.”

βœ… Actual: After adding the eBook to the basket and entering an invalid promo code, the system displayed the warning message "Invalid promo code" upon clicking β€œApply.”

US301_EJunkieAddingEbook.gif

2️⃣ US_302 - Payment attempt with missing information

πŸ“Œ As a customer, I want to attempt payment without entering required fields like email or billing name, so I can confirm that the form validations are triggered.

βœ… Expected: "Invalid email" and "Invalid billing name" error messages are displayed.

βœ… Actual: When the required fields like email and billing name were left empty, the system triggered the form validations and displayed the error messages "Invalid email" and "Invalid billing name."

US302_DebitCardFaultyPayment.gif

3️⃣ US_303 - Invalid card number payment attempt

πŸ“Œ As a customer, I want to enter a fake card number during payment so I can verify that the system blocks invalid card details.

βœ… Expected: "Your card number is invalid" warning appears.

βœ… Actual: When a fake card number was entered, the system correctly blocked the payment and displayed the warning message "Your card number is invalid."

US303_FailedPaymentCheck.gif

4️⃣ US_304 - Successful payment with valid card

πŸ“Œ As a customer, I want to complete the payment with valid card details so I can receive confirmation of a successful purchase.

βœ… Expected: "Your order has been confirmed. Thank you!" is displayed.

βœ… Actual: The payment was completed successfully with valid card details, and the message "Your order has been confirmed. Thank you!" was displayed.

US304_PaymentCC.gif

5️⃣ US_305 - Can user download the eBook?

πŸ“Œ As a customer, I want to be able to download the eBook immediately after a successful purchase.

βœ… Expected: File download starts and matches the purchased content.

βœ… Actual: The eBook download started immediately after the successful purchase and matched the purchased content.

US305_PaymentProcessApprovalDownload.gif

6️⃣ US_306 - Submit contact form

πŸ“Œ As a customer, I want to send a message through the contact form to get support, and if CAPTCHA is not verified, I should be warned.

βœ… Expected: Positive scenario -> "Message sent successfully" message appears. Negative scenario -> "Recaptcha did not match" error message appears. βœ… Actual: The contact form was submitted successfully, and the message "Recaptcha did not match" appeared.

US306_EJunkie_ContactUs.gif

7️⃣ US_307 - Access main e-junkie page

πŸ“Œ As a customer, I want to navigate from the demo site to the official e-junkie homepage to verify the redirection works correctly.

βœ… Expected: Final URL matches e-junkie.com.

βœ… Actual: Final URL matched e-junkie.com.

US307_EJunkie_Logo.gif

8️⃣ US_308 - Access 'How it works' video

πŸ“Œ As a customer, I want to play the 'How it works' video and ensure it starts, plays for 10 seconds, and closes properly.

βœ… Expected: Video plays and closes after 10 seconds.

βœ… Actual: The video started playing successfully, continued for 10 seconds, and closed as expected without any issues.

US308_EJunkieInformationVideo.gif


🧰 User Stories & Test Scenarios

User Story Description Status
US_301 Add eBook and apply invalid promo code βœ… Passed
US_302 Payment attempt with missing info βœ… Passed
US_303 Payment with fake card βœ… Passed
US_304 Successful payment with valid card βœ… Passed
US_305 eBook download after purchase βœ… Passed
US_306 Contact form captcha validation βœ… Passed
US_307 Logo click navigates to homepage βœ… Passed
US_308 Play and close "How it works" video βœ… Passed

πŸ“Š Test Coverage Table

Scenario Priority
Add to cart + invalid promo Medium
Missing email or name in payment High
Fake card number High
Valid payment and success message High
eBook download available High
Contact form without captcha Medium
Homepage redirection Low
Video functionality Low

πŸ“Š Test Reports

Report Type Description
Spark Report Rich HTML report with steps/screenshots
PDF Report Clean summary with scenario results

Find reports inside:

/testReports/SparkReport/
/testReports/PDFReport/

πŸ“… Bug Reports

Bug reports are tracked in the GitHub Issues section of the repository.

  • No bugs have been found.

πŸ‘₯ Project Team

Name Role User Stories
Zafer AtaklΔ± Project Lead & QA Engineer US_306, US_307
RΔ±fat BatΔ±r QA Engineer US_304, US_305
Azim Korkmaz QA Engineer US_302
Nuri Γ–ztΓΌrk QA Engineer US_308
Tugba Kilic QA Engineer US_301, US_303

πŸ”— GitHub Links

Contributors:


πŸ“œ License

This project is licensed under the MIT License.


πŸ“§ Contact

For any questions or suggestions, please reach out via GitHub or team leads listed above.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors