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
Copy file name to clipboardExpand all lines: docs/quick-start.md
+30-67Lines changed: 30 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,101 +3,64 @@ title: Quick Start
3
3
---
4
4
5
5
:::note
6
-
-**Prerequisite**: First, [setup **chkware**](/setup) to continue
6
+
-**Prerequisite**: First, [setup **CHKware**](/setup) to continue
7
7
- Find [More `http` examples](/examples/http-examples) here
8
8
:::
9
9
10
-
Let's call an API that returns current bitcoin price in USD. Please do following:
10
+
### Sample
11
11
12
-
- Create a file called `bitcoin-usd.chk`
13
-
- Open `bitcoin-usd.chk` file, and add following data
12
+
Let's call an API that returns current bitcoin price in USD, and test it. Please do as following:
13
+
14
+
- Create a file called `bitcoin-usd-testcase.chk` in any of your workspace. This file name has not special significance. File name can be anything ending `.chk` extension.
15
+
16
+
Open `bitcoin-usd-testcase.chk` file, and add following:
We call this `bitcoin-usd-testcase.chk` a spec or specification file. The content that you put was a [testcase specification](/references/testcase-reference).
89
57
90
-
- now we will use `jq` json parser to get price data. [jq website](https://stedolan.github.io/jq/) here.
58
+
Let us look into the content and see what we wrote.
22981.487132414983 # <-- depends on the current value
95
-
```
96
-
---
97
-
We just fetched a live API. You can use `chk http` as your scriptable http client like this :rocket::star2:.
60
+
On 1st line we wrote document version with `version:` same as we do on other config files i.e. terraform, ansible, etc. This is not all too important now.
98
61
99
-
Going further you can customize different parameters for `request` block, [see here](/examples/http-examples), and write testcases [see here](/examples/testcase-examples).
62
+
On 2nd line, we wrote a `request:` block, which define how to sent the request to server. More on this block on [http specification](/references/http-reference).
100
63
101
-
Based on your workflow, you should save these `.chk` files in git repository. So that you can re-run it later, from anywhere where **chkware** is installed. Cheers.
64
+
Then we wrote a `asserts:` sub-section under `spec:` block which defines how to check the response those we received.
102
65
103
-
:wink::tada::confetti_ball:
66
+
That's basically it. Find more [example specification](https://github.com/chkware/cli/tree/main/tests/resources/storage/sample_config) on the repository.
0 commit comments