Skip to content

Allow for using python code from a separate Python module inside the specification #301

Closed
@camilamaia

Description

@camilamaia

Allow for using python code from a separate Python module inside the ScanAPI specification.

Example:

File tests.py

def status_is_200(**kwargs):
    response = kwargs.get(response)
    return response.status_code == 20

File scanapi.yaml

...
tests:
    - name: status_code_is_200
      assert: ${{ tests.status_is_200 }}

Metadata

Metadata

Assignees

Labels

FeatureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions