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: README.md
+20-14Lines changed: 20 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
# API Testing Sample Framework with Javascript
2
2
Restful API testing sample framework. ATDD is the suggested design pattern with the help of resouce-objects.
3
3
4
-
Jest is chosen since it is sharing the same `expect` library with webdriverio.
5
-
It is much faster then mocha due to inherent parallelization.
4
+
> Jest is chosen since it is sharing the same `expect` library with webdriverio.
5
+
> It is much faster then mocha due to inherent parallelization.
6
+
6
7
7
8
## Overview
8
9
@@ -14,19 +15,19 @@ You will find three suites that are representing different design choices
14
15
15
16
You can copy this library and use as you like, however think about the design choices you are changing.
16
17
17
-
Technology | Description
18
-
---------- | -----------
19
-
Acceptance Test Driven Development | ATDD involves team members with different perspectives (customer, development, testing) collaborating to write acceptance cases.
20
-
Resource Objects | Design pattern like Page Object, represent each endpoint as resource
21
-
Code as commit | Everything about test automation should be committed, including CI
18
+
|Technology | Description|
19
+
|---------- | -----------|
20
+
|Acceptance Test Driven Development | ATDD involves team members with different perspectives (customer, development, testing) collaborating to write acceptance cases.|
21
+
|Resource Objects | Design pattern like Page Object, represent each endpoint as resource|
22
+
|Code as commit | Everything about test automation should be committed, including CI|
22
23
23
-
Tools | Description
24
-
--- | ---
25
-
superagent | Request is a library for making HTTP requests. This will be used for making the HTTP requests in the tests
26
-
jest | Jest is a test executor that is running async. It includes assertion library.
27
-
eslint | Static code analysis tool for Javascript
28
-
husky | Regulate code commit (with linter in this case)
29
-
express | Express is popular HTTP framework for NodeJS which will be used for creating the System Under Test.
24
+
|Tools | Description|
25
+
|--- | ---|
26
+
|superagent | Request is a library for making HTTP requests. This will be used for making the HTTP requests in the tests|
27
+
|jest | Jest is a test executor that is running async. It includes assertion library.|
28
+
|eslint | Static code analysis tool for Javascript|
29
+
|husky | Regulate code commit (with linter in this case)|
30
+
|express | Express is popular HTTP framework for NodeJS which will be used for creating the System Under Test.|
30
31
31
32
## Setup
32
33
First need to create your own configurations.
@@ -44,7 +45,9 @@ Run tests in local
44
45
45
46
```npm test```
46
47
48
+
47
49
## Test Suites and Example usage
50
+
48
51
These are example usages of library. From 1 to 3 abstraction of endpoints increases.
49
52
50
53
#### 1- basic.spec.js
@@ -71,6 +74,7 @@ Uses resource object, this is a similar method used in selenium with **page Obje
71
74
- usage of superagent/requests encapsulated, however still usable look at tc#3
72
75
- Pre-initialized resource-objects, it serve as a facade to service under test.
73
76
77
+
74
78
## Familiarizing Yourself with the System Under Test
75
79
76
80
It's always necessary to get to know the code you are testing.
@@ -105,6 +109,8 @@ The API supports adding and deleting individual vegetables. You can also get all
0 commit comments