QA Automation Refresher

Chapter 1: Introduction

  • Project Structure Recap

    • Code, featured file locations discussed.

    • Execution of test cases explained to Jerome and Sato.

  • Running Tests in IntelliJ

    • Use plugins: Cucumber for Java and Harken to read .feature files.

    • Example structure of a feature file discussed.

    • Running feature files using tags was highlighted.

  • Order Creation Scenario

    • Outline scenario: Sending API request to create an order.

    • Process steps include:

      • Generating login token using user credentials.

      • Sending POST request to create order API with required input parameters.

      • Checking the response for parameters like GP status and post status code.

      • Sending GET request to retrieve order details.

  • Feature File Structure Elements

    • Parameters:

      • Fields can be parameterized (pink) or passed directly (blue).

    • Test Case Definitions:

      • Test ID, description, and expected outcomes clearly outlined.

Chapter 2: A Particular Method

  • Step Definition Relation

    • Features contain step definitions that map to code implementations.

    • Background steps are highlighted by mousing over to see links in code.

    • Code examples: Linking features to specific methods in Java.

  • Creating New Step Definitions

    • If a new step is added in the feature file, an option arises to create a needed method in the definition file.

    • Definitions can be created under web common steps or API common steps based on the context of the test.


Chapter 3: Passing Token API

  • Change in Java Version Handling

    • Migration effects from Java 1.8 to Java 11:

      • Previously, empty fields treated as empty strings, now interpreted as null.

    • Method cleanMapData handles null to empty string conversion for API requests.

  • API Class Structure

    • Each API has its class; functions performed on APIs are modularized.

    • Example: Separate classes for CRUD operations like create order and get order.

Chapter 4: Token API Interaction

  • Request Handling

    • Method implementation details of sending a request, capturing parameters passed.

    • Explanation of URL processing and base URL key assignments based on API names.

  • Process Flow of API Methods

    • Each API request involves setting HTTP method, URL, endpoint, and parameters flowing through the code.

    • Role of cleanMapData during request preparation.

Chapter 5: Detailed Token API Request Flow

  • Body Creation for API Requests

    • Creating request body dynamically using parameterized data from client input.

    • Explanation of how headers are added to requests before sending.

  • Response Checking

    • Checking the API response using methods to extract the status code and capture token data.

Chapter 6: Current API Object Updates

  • Reflections on Process Request Method

    • After setting request parameters and sending the request, capturing and checking response data becomes critical.

    • Explanation of token extraction from the API response.

Chapter 7: Conclusion

  • full request-response cycle summary

    • Cycle of defining parameters, sending requests, processing responses was highlighted.

    • Focus on practical understanding and implementation; suggestions given for self-practice with new feature files and API scenarios.