Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dsl variable support for matchers #1290

Merged
merged 6 commits into from
Dec 2, 2021
Merged

Dsl variable support for matchers #1290

merged 6 commits into from
Dec 2, 2021

Conversation

parrasajad
Copy link
Contributor

@parrasajad parrasajad commented Nov 25, 2021

Proposed changes

  • Add variable/payload support to dsl matcher
  • remove dynamicValues field from request struct to avoid data race

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@parrasajad parrasajad marked this pull request as ready for review November 29, 2021 07:44
@Ice3man543
Copy link
Member

@parrasajad we can also add a test for this functionality.

@parrasajad
Copy link
Contributor Author

Example template:

id: dsl-matcher-variable

info:
  name: dsl-matcher-variable
  author: pd-team
  severity: info

requests: 
  - 
    path: 
      - "{{BaseURL}}"
    payloads: 
      VALUES: 
        - This
        - is
        - test
        - matcher
        - text
    matchers: 
      - 
        dsl: 
          - 'contains(body,"{{VALUES}}")'
        type: dsl

@ehsandeep ehsandeep merged commit 0de5688 into dev Dec 2, 2021
@ehsandeep ehsandeep deleted the dsl-variable-support branch December 2, 2021 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic Variable reuse in requests can cause race conditions Matchers / Extractors enhancement
3 participants