GithubHelp home page GithubHelp logo

jakimli / pandaria Goto Github PK

View Code? Open in Web Editor NEW
74.0 9.0 15.0 6.79 MB

Lightweight API testing tool based on cucumber JVM

License: MIT License

Java 78.02% Gherkin 21.96% JavaScript 0.03%
api-testing cucumber-jvm automation-testing automated-testing testing testing-framework graphql-testing

pandaria's Issues

Unable to use a query result in the verification step

Hello!
I'm trying to compare if the value of a property from the response body is equals to a value obtained from the database.

My scenario is very similar to this one below I tried in very different ways to use the verify but it
either it can't be evaluated or is evaluate to null.

Scenario: Compares database and response body
        * uri: http://www.myservice.com/get_something
        * dir: features/queries
        * query: find_something.sql
        # It's finding a single line like [ { id=123, name="SomeName"} ]
        * var: query_result<-'$[0]'
        * send: GET
        # response body {"id": 123, "name": "SomeName"}
        * status: 200
        # some verify usages that I tried 
        * verify: '$.id'=code: ${query_result.id}
        * verify: '$.id'=code: ${query_result.get('id')}
        * verify: '$.id'=${query_result.id}

Did pandaria implemented this kind of step already?

https://app.leanboard.io/board/2888ba13-a6b1-43bd-999f-195766a0cef5

How to use it for changed Bear token

After I reviewed the introduction and code I found the stationary token is saved in application.properties file:
http.headers.Authorization=Bear Token
http.headers.global=globalHeader

http.headers.will_be_overrided=not_overrided
But if the Bear token will be expired after a period, and need to call a custom method to generate a new token, such as call "/tokens/generate?entity-id=" API to generate before test, how can I use the project for cucumber-api testing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.