Skip to content

Test Templates #112

@mefellows

Description

@mefellows

When generating pact tests, the output does not always match the existing style, idioms, frameworks and SDK versions as the current project the engineer is working on. For example, the test might generate chai matchers and assertions, for a project that uses Jest.

Additionally, the style of the test may not be consistent with the existing tests.

One way to address this problem, and improve the output, is to allow users to provide their own templates with their existing patterns and style encoded in them, when asking PactFlow to generate tests. PactFlow will use this as a template to inject the test cases into.

  1. Ability to provide a (local) template when generating tests
  2. Ability to pass additional text-based instructions with the template to guide generation
  3. New permission will be created to allow users to specify local templates

In a future capability, we will support a template library within PactFLow:

  1. Ability to upload templates to PactFlow into a template library (via API or UI)
  2. Templates may be associated with the team or no team (follow the secrets model)
  3. UI to manage the templates
  4. Ability to restrict all of the above via RBAC
  5. Permission to allow creating/updating/deleting (managing) and reading existing templates (at the * and team scope)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q1Initiative is planned for a Q1 launch

    Type

    No type

    Projects

    Status

    Shipped 🚀

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions