Skip to content

andresgranizo/karateChallenge

Repository files navigation

Demoblaze Karate Project

CI

This project is a test automation framework using Karate and Gradle to test the signup and login functionalities of the Demoblaze API.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Java Development Kit (JDK): Version 11 or higher. You can download it from OpenJDK or use a package manager like Homebrew.
  • Gradle: Version 6.0 or higher. You can download it from the Gradle website or use a package manager like Homebrew.

Install Prerequisites on macOS using Homebrew

  1. Install Homebrew (if not already installed):

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install JDK 11:

    brew install openjdk@11
  3. Set JDK 11 as the default:

    Add the following lines to your ~/.zshrc or ~/.bash_profile:

    export JAVA_HOME=/opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home
    export PATH=$JAVA_HOME/bin:$PATH

    Then, reload your shell configuration:

    source ~/.zshrc  # or source ~/.bash_profile
  4. Install Gradle:

    brew install gradle

Install Prerequisites on Windows

  1. Install JDK 11:
    • Download the JDK installer from the OpenJDK website.
    • Run the installer and follow the instructions.
  2. Set JDK 11 as the default:
    • Open Environment Variables:
    • Press Win + X and select System.
    • Click on Advanced system settings.
    • Click on Environment Variables.
  3. Add a new System variable:
    • Variable name: JAVA_HOME
    • Variable value: C:\Program Files\OpenJDK\jdk-11 (adjust based on your installation path)
    • Edit the Path variable and add: %JAVA_HOME%\bin
  4. Install Gradle:
    • Download the Gradle binary from the Gradle website.
    • Extract the downloaded ZIP file to C:\Gradle.
    • Add C:\Gradle\bin to your Path environment variable.

Verify Installation

Verify that Java and Gradle are installed correctly:

java -version
gradle -version

Setup Instructions

  1. Clone the repository:
git clone (https://github.com/andresgranizo/karateChallenge.git)
cd demoblaze-karate
  1. Build the project:
gradle clean build
  1. Run the test:
gradle test

Viewing Test Results

After running the tests, you can view the test results in the generated HTML report:

  1. Navigate to the report directory:
cd build/reports/tests/test
  1. Open the index.html file in a web browser to see the detailed test results.
open index.html  # macOS
xdg-open index.html  # Linux
start index.html  # Windows

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published