https://github.com/imega/graphql-tester
Graphql tester - Tool for testing GraphQL
https://github.com/imega/graphql-tester
version-0-0-8
Last synced: about 1 year ago
JSON representation
Graphql tester - Tool for testing GraphQL
- Host: GitHub
- URL: https://github.com/imega/graphql-tester
- Owner: iMega
- License: mit
- Created: 2018-04-24T07:21:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-12T10:44:40.000Z (about 8 years ago)
- Last Synced: 2025-05-24T20:02:07.639Z (about 1 year ago)
- Topics: version-0-0-8
- Language: Go
- Homepage:
- Size: 927 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphql tester - Tool for testing GraphQL
[](https://travis-ci.org/iMega/graphql-tester)
### Motivation
in progress
### Usage
```
docker run -v `pwd`/github_api:/data imega/graphql-tester:0.0.1 -H 'Authorization: Bearer ' -u https://api.github.com/graphql /data
```
token - [Creating a personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
### Referense
#### The test case
The test case specification in the data part is composed by a series of test blocks.
Each test block usually corresponds to a single test case, which has a title,
an optional description, and a series of data sections. The structure of a test block
is described by the following template.
```
# Title suite test
=== Test 1.
--- query
query {
viewer {
id
login
}
}
--- query_var
{
"variables": {
"input": {
"login": "blah-blah-blah"
}
},
"operationName": "GetLogin"
}
--- expected_response
{
"data": {
"viewer": {
"login": "iMega"
}
}
}
--- assert_not_empty
data.viewer.login
--- assert_empty
data.viewer.id
--- set_vars_from_response
@login = data.viewer.login
```
### Examples
See folder github_api
### Conditions
jq retuns json value from request, accept arg []byte
equal returns error if values not equal
has retuns error if array not exists value
!equal see equa;
!has