You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository holds source code and publishable website for [**`chkware`**](https://github.com/chkware/cli#readme). Please access using https://chkware.github.io.
3
+
This repository holds source code and publishable website for [CHKware](https://github.com/chkware/cli).
This command starts a local development server and opens up a browser window. You can also follow `http://localhost:3000/` URL in any browser.
27
-
28
-
Most changes are reflected live reload without having to restart the server.
29
-
30
-
### Build
31
-
32
-
```
33
-
$ npm run build
34
-
```
35
-
36
-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37
-
38
-
### Guides
39
-
40
-
Learn how to contribute to this website.
41
-
42
-
### Configs
43
-
44
-
All the configs can be found in `docusaurus.config.js`.
45
-
46
-
#### Create a doc page
47
-
48
-
Create a Markdown file, `example.md`, and place it under the `docs` directory. Any markdown file will render into the site without needing any extra configuration. It will be displayed alphabetically on the sidebar.
49
-
50
-
```bash
51
-
root
52
-
├── docs
53
-
│ └── example.md
54
-
├── docusaurus.config.js
55
-
├── ...
56
-
```
57
-
58
-
Markdown documents can use the Markdown front matter metadata fields, enclosed by a line `---` on either side. At the top of the file, you can optionally specify attributes in the front matter, so that Docusaurus will pick them up correctly when generating the site. Accepted fields can be found [here](https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter).
59
-
60
-
#### Create a doc category
61
-
62
-
Creating a `example.md` in a sub folder will create a category in the sidebar.
63
-
64
-
```bash
65
-
root
66
-
├── docs
67
-
│ └── sub-folder
68
-
│ └── example.md
69
-
```
70
-
71
-
To change the category name or other category meta data, an optional file `_category_.json` can be created in the respective sub folder. More [here](https://docusaurus.io/docs/next/sidebar/autogenerated#autogenerated-sidebar-metadata).
72
-
73
-
```json
74
-
{
75
-
"label": "Tutorial"
76
-
}
77
-
```
78
-
79
-
#### Static Assets
80
-
81
-
The Static Assets can be found in the `static` folder. More [here](https://docusaurus.io/docs/next/static-assets).
82
-
83
-
#### Change theme color
84
-
85
-
Generate the variables from [here](https://docusaurus.io/docs/next/styling-layout#styling-your-site-with-infima). Then replace the variables in `src/css/custom.css` with these new variables. Don't forget variables for dark mode.
86
-
87
-
#### Change codeBlock theme
88
-
89
-
Docusaurus uses [Prism React Renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight code blocks. All configuration are in the `prism` object of `docusaurus.config.js`. You can specify a custom theme from the [list of available themes](https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes).
90
-
91
-
#### Syntax highlighting
92
-
93
-
To add syntax highlighting for any of the other [Prism-supported languages](https://prismjs.com/#supported-languages), define it in an array of additional languages. More [here](https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages).
94
-
95
-
#### Change footer
96
-
97
-
You can add logo and a copyright to the footer via `themeConfig.footer`. More [here](https://docusaurus.io/docs/next/api/themes/configuration#footer-1).
98
-
99
-
#### Blog
100
-
101
-
To set up blog, start by creating a `blog` directory. More [here](https://docusaurus.io/docs/next/blog).
102
-
103
-
#### Admonitions
104
-
105
-
In addition to the basic Markdown syntax, Docusaurus use [remark-admonitions](https://github.com/elviswolcott/remark-admonitions) alongside MDX to add support for admonitions. Admonitions are wrapped by a set of 3 colons. More [here](https://docusaurus.io/docs/next/markdown-features/admonitions).
106
-
107
-
#### Update Docusaurus version
108
-
109
-
To update Docusaurus version, manually change the version number in `package.json` to the desired version. Then run `npm run install`.
110
-
111
-
Any required change/depricated message will be shown on the terminal when running the command `npm run start`. More [here](https://docusaurus.io/docs/next/installation#updating-your-docusaurus-version).
112
-
113
-
### Status
114
-
115
-
The current status of the website is **under construction**. Please follow us on Twitter [@chkware](https://twitter.com/chkware) for update. Thank you for your patience.
116
-
117
-
---
118
-
119
-
`chkware` website uses [docusaurus v2.0.0-beta.17](https://github.com/facebook/docusaurus/releases/tag/v2.0.0-beta.17) as CMS backend.
7
+
- Head to [CHKware website](https://chkware.github.io/setup), for documentation, if you want to use *CHKware* in your project.
8
+
- Jump to the [setup for website developer](http://chkware.github.io/setup/setup-site-dev) if you want to contribute to this repository.
The above testcase spec. doc define a request that makes a `POST` call to `https://reqres.in/api/users` URL with a body `{"name": "My Name", "job": "My Job"}`.
37
+
38
+
After the request server responses with following:
- The response code is 201, or the resource was created
45
+
- The response if a map / dictionary
46
+
47
+
Assertion [reference with examples](/references/testcase-reference#assertions) can be found here.
48
+
49
+
### A minimal Testcase with out-file request
50
+
51
+
A http spec. doc can be written on separate file, that does same as above request. Let's call it `same-request.chk`. The http spec. doc by default exposes `$_response` object.
19
52
20
53
```yaml
54
+
# file: same-request.chk
55
+
---
56
+
version: 'default:http:0.7.2'
57
+
58
+
request:
59
+
url: "https://reqres.in/api/users"
60
+
method: POST
61
+
body[json]: {
62
+
'name': My Name,
63
+
'job': My Job,
64
+
}
65
+
```
66
+
67
+
Now we can point out above file to execute before make assertions like below (assuming both file lives on same directory).
Please notice the `$_response` in the testcase doc. This variable is available after the request gets executed as local variable.
83
+
84
+
### A Testcase with out-file request passing data
85
+
86
+
To pass data from a testcase spec. doc to a http spec. doc, we first need to add some variables. These variables can also have some default value. Say in the following case, we defined `name` and `job` variables with default value. So, if no value passed these values will be passed to server as part of request body.
87
+
88
+
```yaml
89
+
# file: same-request.chk
90
+
---
91
+
version: 'default:http:0.7.2'
92
+
24
93
variables:
25
-
Name: 'Morpheus'
26
-
Job: 'leader'
27
-
Response: ~
28
-
Server: https://reqres.in/api/v1
94
+
name: My Name
95
+
job: My Job
29
96
30
97
request:
31
-
url: "{$Server}/users"
98
+
url: "https://reqres.in/api/users"
32
99
method: POST
33
100
body[json]: {
34
-
'name': $Name,
35
-
'job': $Job,
101
+
'name': $name,
102
+
'job': $job,
36
103
}
37
-
return: ~
104
+
```
105
+
106
+
Now we can point out which value we want to pass using `with` statement in `execute` block.
API tests management is not easy to develop, and maintain. It requires multitude of knowledge of programming libraries, business scenarios, infrastructure details, etc - unless you use ***chkware***.
15
+
API quality test, and automation management is not easy to develop, and maintain. It requires multitude of knowledge of programming libraries, business scenarios, infrastructure details, etc - unless you use ***CHKware***.
17
16
18
-
***chkware*** (pronounced as */check:ware/*) helps you write accurate, robust, and expressive feature tests for your API in less time.
17
+
***CHKware*** (pronounced as */tʃek-wer/*, i.e. *check-ware*) is a low-code API quality testing, and automation toolbox. It helps you write accurate, robust, and expressive feature tests for your API in less time than usual.
19
18
20
-
Read [more value propositions](/introduction)here. Find [changelog](https://github.com/chkware/cli/blob/main/docs/CHANGELOG.md) here.
19
+
Read [about the problems](/introduction)*CHKware* addresses. Find [changelog](https://github.com/chkware/cli/blob/main/docs/CHANGELOG.md).
21
20
22
21
### Setup
23
22
24
-
With [**Python 3.10**](https://www.python.org/downloads/) and [**Pipx**](https://pypa.github.io/pipx/installation/#install-pipx) preinstalled, run following in your terminal to get ***chkware*** installed.
23
+
With [**Python 3.11**](https://www.python.org/downloads/) and [**Pipx**](https://pypa.github.io/pipx/installation/#install-pipx) preinstalled, run following in your terminal to get *CHKware* installed.
25
24
26
25
```bash
27
-
$ pipx install chk
26
+
pipx install chk
28
27
```
29
28
30
-
Jump to the [setup guide](/setup) for different ways to install ***chkware***.
29
+
Jump to the [setup guide](/setup) for different ways to install ***CHKware***.
Copy file name to clipboardExpand all lines: docs/introduction.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,19 @@
2
2
title: Introduction
3
3
---
4
4
5
-

5
+

6
6
7
-
**chkware** (pronounced as */check:ware/*) is an API testing tool, a scriptable HTTP client, and a test specification management tool for the API era.
7
+
8
+
*CHKware* (pronounced as */check:ware/*) is a low-code API testing tool, a script-able HTTP client, and an API test automation tool for the API era.
8
9
9
10
It is available as a command-line application. You write test specification files in a [YAML](https://yaml.org/)-based [DSL](https://en.wikipedia.org/wiki/Domain-specific_language). In that specification file you will define some structured configurations to be used for the following purpose:
Afterward, you run those test specification files with **chkware**, and get test results or even reuse them.
15
+
Afterward, you run those test specification files with *CHKware*, and get test results or even reuse them.
15
16
16
17
---
17
-
18
18
### Motivation
19
19
20
20
In today's world, API is one of the key fuels that drive business. It is the way web applications consume services from self-hosted or 3rd-party vendors. Recent technology movements are going to a fluid internet direction, where *vendor_A* have one API, *vendor_B* is another API provider, while we are the consumers (e-commerce, fin-tech) of those vendor APIs. We use those APIs to host our contents based on those APIs. Maybe we are *vendor_U* hosting more complex APIs on top of those. So, with the upcoming complexity of integration we need better tooling for API testing. Testing tools for modularize api testing.
@@ -29,13 +29,13 @@ For these reasons, the solutions are less scaling for actual use-cases. With add
29
29
2. Added complexity of maintaining supporting software stack, so there are side effects
30
30
3. Above all, maintaining test cases based on code is more complex if you don't design your test code architecture well in the early days.
31
31
32
-
So, clearly enough I think this situation needs to be improved. This is the motivation for **chkware**.
32
+
So, clearly enough I think this situation needs to be improved. This is the motivation for *CHKware*.
33
33
34
34
---
35
35
36
36
### Audiences
37
37
38
-
The focused users of **chkware** are everyone involved in an API project, given they have some testing basics.
38
+
The focused users of **CHKware** are everyone involved in an API project, given they have some testing basics.
39
39
40
40
- People with zero programming knowledge need a tool that does not get in their way.
41
41
- We need a tool that is relatively easy to write specifications, expressive, and customizable to the very core.
@@ -44,7 +44,7 @@ The focused users of **chkware** are everyone involved in an API project, given
44
44
In practical cases, software testers / QAs, developers, PM/POs, are the people who should be able to use it rigorously.
45
45
46
46
- This project is particularly helpful if you are developing an API oriented project.
47
-
-Test websites or web interfaces are not in the project focus for now.
47
+
-Writing specification to test websites, or web interfaces are not in the project focus for now.
48
48
- Also, seeding data, validating data in DB is out of this project scope for now.
49
49
50
50
---
@@ -59,9 +59,9 @@ There is no native binary dependency, therefore it is expected on all the platfo
59
59
60
60
### Stability
61
61
62
-
`chkware` is a tool collection. Followings are stability by tools:
62
+
`CHKware` is a tool collection. Followings are stability by tools:
0 commit comments