Skip to content

Pratishthan/test-data-accelerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Certainly! Below is a comprehensive, developer-ready specification based on our discussion:


Project Specification: Automated API Testing from Excel Scenarios

Objective

To automate the process of translating Excel-based scenario data into API calls and BDD specifications, enabling seamless integration with Jenkins for regular testing.

Requirements

  1. Input Handling

    • Accept Excel files containing business operation names and structured data.
    • Use notes or comments in the first cell of each table to define table type (denormalized or related tables).
    • Map business operation names to API endpoints using vendor extensions in the OpenAPI spec.
  2. Data Structure Interpretation

    • Support both denormalized tables and multiple related tables for nested data.
    • Indicate child tables within parent tables through specific column markers; link child tables back to parent columns.
  3. Column Name Mapping

    • Maintain mappings between business column names (in Sentence Case) and technical column names using vendor extensions.
    • Default conversion from camelCase to Sentence Case if no mapping is found.
  4. Validation Mechanism

    • Compare actual API responses against expected results defined in similar structured Excel tables.
    • Use notes/comments in the first cell of result tables for validation commands.
  5. Reporting & Feedback

    • Generate summary reports detailing pass/fail status, discrepancies, and errors encountered during execution.
  6. Execution Environment

    • Integrate with Jenkins 'Sanity pipeline' for automated execution as part of CI/CD workflow.

Architecture Choices

  • Utilize OpenAPI Generator or Swagger Codegen to generate client libraries that can be extended for reading Excel files and making API requests.
  • Implement a script that reads scenarios from Excel, generates test scripts based on OpenAPI spec definitions, integrates them into a BDD framework like Cucumber/Behave/SpecFlow without manual coding intervention beyond initial setup scripts.

Data Handling Details

  • Use Apache POI (Java) or openpyxl (Python) libraries to parse Excel files programmatically.
  • Ensure consistent interpretation of denormalized vs related table formats by checking indicators/comments in the first cell of each table.

Error Handling Strategies

  • Implement logging mechanisms within generated code/scripts to capture errors during file parsing, request generation/execution, response validation stages—ensuring detailed logs are available for debugging purposes if needed post-execution via Jenkins reporting tools/plugins integration options provided natively therein too!

 Testing Plan

  1. Develop unit tests covering:    - Parsing logic correctness    - Accurate mapping between business operations & endpoints    - Proper handling/conversion rules applied consistently across different input formats/scenarios

  2. Conduct integration tests validating end-to-end functionality:    a) Scenario translation accuracy    b) Successful execution against live/staging environments where applicable

3 . Regularly review/update test cases/scenarios ensuring alignment with evolving requirements/specifications over time!


This specification provides all necessary details required by developers starting implementation immediately while maintaining flexibility/adaptability throughout project lifecycle phases ahead!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •