Skip to content

Commit 851edc8

Browse files
authored
Update README.md(shortened)
1 parent 9e94dc1 commit 851edc8

File tree

1 file changed

+29
-95
lines changed

1 file changed

+29
-95
lines changed

README.md

Lines changed: 29 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ It has the best of best ideas and practices from the community to keep it super
2121

2222
Documentation
2323
===
24-
For a quick introduction to Zerocode and its features, visit the
25-
+ [Zerocode TDD Documentation](https://zerocode-tdd-docs.pages.dev)
26-
+ [Want to contribute/amend the docs](https://github.com/authorjapps/zerocode/wiki/Documentation-How-To-Fix-Steps)? Steps and guidelines are [here](https://github.com/authorjapps/zerocode/wiki/Documentation-How-To-Fix-Steps)
24+
Visit here :
25+
+ [Documentation](https://zerocode-tdd-docs.pages.dev) - Indexed & instantly find you the results
26+
+ [Want to contribute or amend the docs](https://github.com/authorjapps/zerocode/wiki/Documentation-How-To-Fix-Steps)? Steps and guidelines are [here](https://github.com/authorjapps/zerocode/wiki/Documentation-How-To-Fix-Steps)
2727

2828
IDE Support By
2929
===
@@ -60,37 +60,7 @@ Response:
6060

6161
then, we can easily validate the above API using `Zerocode` like below.
6262

63-
+ Using YAML described as below,
64-
65-
> _The beauty here is, we can use the payload/headers structure for validation as it is without any manipulation or use a flat JSON path to skip the hassles of the entire object hierarchies._
66-
67-
## Validators
68-
69-
Using YAML
70-
71-
```yaml
72-
73-
---
74-
url: api/v1/customers/123
75-
method: GET
76-
request:
77-
headers:
78-
Content-Type: application/json
79-
retry:
80-
max: 3
81-
delay: 1000
82-
validators:
83-
- field: "$.status"
84-
value: 200
85-
- field: "$.body.type"
86-
value: Premium Visa
87-
- field: "$.body.addresses[0].line1"
88-
value: 10 Random St
89-
```
90-
91-
or
92-
93-
Using JSON
63+
+ Using JSON
9464

9565
```JSON
9666
{
@@ -105,26 +75,27 @@ Using JSON
10575
"max": 3,
10676
"delay": 1000
10777
},
108-
"validators": [
109-
{
110-
"field": "$.status",
111-
"value": 200
112-
},
113-
{
114-
"field": "$.body.type",
115-
"value": "Premium Visa"
78+
"verify": {
79+
"status": 200,
80+
"headers": {
81+
"Content-Type" : [ "application/json; charset=utf-8" ]
11682
},
117-
{
118-
"field": "$.body.addresses[0].line1",
119-
"value": "10 Random St"
120-
}
121-
]
83+
"body": {
84+
"id": 123,
85+
"type": "Premium Visa",
86+
"addresses": [
87+
{
88+
"type": "Billing",
89+
"line1": "10 Random St"
90+
}
91+
]
92+
}
93+
},
94+
"verifyMode": "LENIENT"
12295
}
12396
```
12497

125-
## Matchers
126-
127-
Using YAML
98+
+ or Using YAML
12899

129100
```yaml
130101

@@ -151,55 +122,18 @@ verify:
151122
verifyMode: LENIENT
152123
```
153124
154-
or
155125
156-
Using JSON
126+
> _The beauty here is, we can use the payload/headers structure for validation as it is without any manipulation
127+
> or
128+
> use a flat JSON path to skip the hassles of the entire object hierarchies._
157129
158-
```JSON
159-
{
160-
"url": "api/v1/customers/123",
161-
"method": "GET",
162-
"request": {
163-
"headers": {
164-
"Content-Type": "application/json"
165-
}
166-
},
167-
"retry": {
168-
"max": 3,
169-
"delay": 1000
170-
},
171-
"verify": {
172-
"status": 200,
173-
"headers": {
174-
"Content-Type" : [ "application/json; charset=utf-8" ]
175-
},
176-
"body": {
177-
"id": 123,
178-
"type": "Premium Visa",
179-
"addresses": [
180-
{
181-
"type": "Billing",
182-
"line1": "10 Random St"
183-
}
184-
]
185-
}
186-
},
187-
"verifyMode": "STRICT"
188-
}
189-
```
190-
191-
and run it simply by pointing to the above JSON/YAML file from a JUnit `@Test` method.
192-
193-
```java
194-
@Test
195-
@Scenario("test_customer_get_api.yml")
196-
public void getCustomer_happyCase(){
197-
// No code goes here. This remains empty.
198-
}
199-
```
200130
201131
Looks simple n easy? Why not give it a try? Visit the [quick-start guide](https://github.com/authorjapps/zerocode/wiki/Getting-Started) or [user's guide](https://github.com/authorjapps/zerocode/wiki#developer-guide) for more insight.
202132
203-
Zerocode is used by many companies such as Vocalink, HSBC, HomeOffice(Gov) and [many others](https://github.com/authorjapps/zerocode/wiki#smart-projects-using-zerocode) to achieve accurate production drop of their microservices. Learn more about [Validators Vs Matchers](https://github.com/authorjapps/zerocode/wiki/Validators-and-Matchers) here.
133+
Zerocode-TDD is used by many companies such as Vocalink, HSBC, HomeOffice(Gov) and [many others](https://github.com/authorjapps/zerocode/wiki#smart-projects-using-zerocode) to achieve accurate production drop of their micro-services, data-pipelines etc.
134+
135+
Also, learn more about [Validators Vs Matchers](https://github.com/authorjapps/zerocode/wiki/Validators-and-Matchers) here.
204136
205137
Happy Testing! <g-emoji class="g-emoji" alias="panda_face" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f43c.png">🐼</g-emoji>
138+
139+
🔆 Visit [Documentation](https://zerocode-tdd-docs.pages.dev) - Indexed, searchable & instantly find you the results

0 commit comments

Comments
 (0)