@@ -19,8 +19,8 @@ Qase.io uses API tokens to authenticate requests. You can view a manage your API
19
19
You must replace api_token with your personal API key.
20
20
21
21
``` java
22
- ApiClient qaseApi = Configuration . getDefaultApiClient ();
23
- qaseApi . setApiKey(" api_token" );
22
+ ApiClient apiClient = QaseClient . getApiClient ();
23
+ apiClient . setApiKey(" api_token" );
24
24
```
25
25
26
26
### Projects ###
@@ -59,25 +59,32 @@ String code = projectsApi.createProject(project).getResult().getCode()
59
59
This method allows to retrieve all test cases stored in selected project. You can you limit and offset params to paginate.
60
60
61
61
``` java
62
- Filter filter = qaseApi. testCases(). filter()
63
- .type(Type . other)
64
- .priority(Priority . high);
65
- TestCases testCases = qaseApi. testCases(). getAll(" PRJCODE" , filter);
66
- List<TestCase > testCaseList = testCases. getTestCaseList();
62
+ GetCasesFiltersParameter filters = new GetCasesFiltersParameter ()
63
+ .automation(" is-not-automated,to-be-automated" )
64
+ .behavior(" positive" )
65
+ .milestoneId(11 )
66
+ .suiteId(2 )
67
+ .severity(" critical" )
68
+ .priority(" high,medium" )
69
+ .status(" actual" )
70
+ .type(" functional,acceptance" )
71
+ .search(" title" );
72
+ List<TestCase > testCases = casesApi. getCases(" PRJCODE" , filters, 100 , 0 )
73
+ .getResult(). getEntities();
67
74
```
68
75
69
76
#### Get a specific test case ####
70
77
This method allows to retrieve a specific test case.
71
78
72
79
``` java
73
- TestCase testCase = qaseApi . testCases() . get( " PRJCODE" , 4 );
80
+ TestCase testCase = casesApi . getCase( " PRJCODE" , 4 ) . getResult( );
74
81
```
75
82
76
83
#### Delete test case ####
77
84
This method completely deletes a test case from repository.
78
85
79
86
``` java
80
- boolean isDeleted = qaseApi . testCases() . delete (" PRJCODE" , 4 );
87
+ casesApi . deleteCase (" PRJCODE" , 4 );
81
88
```
82
89
83
90
### Suites ###
@@ -86,107 +93,118 @@ boolean isDeleted = qaseApi.testCases().delete("PRJCODE", 4);
86
93
This method allows to retrieve all test suites stored in selected project. You can you limit and offset params to paginate.
87
94
88
95
``` java
89
- Suites suites = qaseApi. suites(). getAll(" PRJCODE" );
90
- List<Suite > suiteList = suites. getSuiteList();
96
+ SuitesApi suitesApi = new SuitesApi (qaseApi);
97
+
98
+ List<Suite > suites = suitesApi. getSuites(" PRJCODE" , null , 100 , 0 )
99
+ .getResult(). getEntities();
91
100
```
92
101
93
102
#### Get a specific test suite ####
94
103
This method allows to retrieve a specific test suite.
95
104
96
105
``` java
97
- Suite suite = qaseApi . suites() . get( " PRJCODE" , 18 );
106
+ Suite suite = suitesApi . getSuite( " PRJCODE" , 18 ) . getResult( );
98
107
```
99
108
100
109
#### Create a new test suite ####
101
110
This method is used to create a new test suite through API.
102
111
103
112
``` java
104
- long id = qaseApi. suites(). create(" PRJCODE" , " SuiteTitle" , " Description" );
113
+ Long id = suitesApi. createSuite(" PRJCODE" , new SuiteCreate (). title(" SuiteTitle" ))
114
+ .getResult(). getId();
105
115
```
106
116
107
117
#### Update test suite ####
108
118
This method is used to update a test suite through API.
109
119
110
120
``` java
111
- qaseApi . suites() . update( " PRJCODE" , 18 , " NewSuiteTitle" );
121
+ suitesApi . updateSuite( " PRJCODE" , 18 , new SuiteUpdate () . title( " NewSuiteTitle" ) );
112
122
```
113
123
114
124
#### Delete test suite ####
115
125
This method completely deletes a test suite from repository.
116
126
117
127
``` java
118
- boolean isDeleted = qaseApi . suites() . delete( " PRJCODE" , 18 )
128
+ suitesApi . deleteSuite( " PRJCODE" , 18 , null );
119
129
```
120
130
121
131
### Milestones ###
122
132
#### Get all milestones ####
123
133
This method allows to retrieve all milestones stored in selected project. You can you limit and offset params to paginate.
124
134
125
135
``` java
126
- Milestones milestones = qaseApi. milestones(). getAll(" PRJCODE" );
127
- List<Milestone > milestoneList = milestones. getMilestoneList();
136
+ GetMilestonesFiltersParameter filters = new GetMilestonesFiltersParameter (). search(" title" );
137
+ List<Milestone > milestones = milestonesApi. getMilestones(" PRJCODE" , filters, 100 , 0 )
138
+ .getResult(). getEntities();
128
139
```
129
140
130
141
#### Get a specific milestone ####
131
142
This method allows to retrieve a specific milestone.
132
143
133
144
``` java
134
- Milestone milestone = qaseApi. milestones(). get(" PRJCODE" , 1 )
145
+ Milestone milestone = milestonesApi. getMilestone(" PRJCODE" , 1 )
146
+ .getResult();
135
147
```
136
148
137
149
#### Create a new milestone ####
138
150
This method is used to create a new milestone through API.
139
151
140
152
``` java
141
- long id = qaseApi. milestones(). create(" PRJCODE" , " MilestoneTitle" , " MilestoneDescription" )
153
+ Long id = milestonesApi. createMilestone(" PRJCODE" , new MilestoneCreate (). title(" MilestoneTitle" ))
154
+ .getResult(). getId();
142
155
```
143
156
#### Update milestone ####
144
157
This method is used to update a milestone through API.
145
158
146
159
``` java
147
- long id = qaseApi. milestones(). update(" PRJCODE" , 6 , " NewMilestoneTitle" );
160
+ Long id = milestonesApi. updateMilestone(" PRJCODE" , 6 , new MilestoneUpdate (). title(" NewMilestoneTitle" ))
161
+ .getResult(). getId();
148
162
```
149
163
150
164
#### Delete milestone ####
151
165
This method completely deletes a milestone from repository
152
166
``` java
153
- boolean isDeleted = qaseApi . milestones() . delete (" PRJCODE" , 6 );
167
+ milestonesApi . deleteMilestone (" PRJCODE" , 6 );
154
168
```
155
169
156
170
### Shared steps ###
157
171
158
172
#### Get all shared steps ####
159
173
This method allows to retrieve all shared steps stored in selected project. You can you limit and offset params to paginate.
160
174
``` java
161
- SharedSteps sharedSteps = qaseApi. sharedSteps(). getAll(" PRJCODE" );
162
- List<SharedStep > sharedStepList = sharedSteps. getSharedStepList();
175
+ SharedStepsApi sharedStepsApi = new SharedStepsApi (qaseApi);
176
+ GetMilestonesFiltersParameter filters = new GetMilestonesFiltersParameter ()
177
+ .search(" title" );
178
+ List<SharedStep > sharedSteps = sharedStepsApi. getSharedSteps(" PRJCODE" , filters, 100 , 0 )
179
+ .getResult(). getEntities();
163
180
```
164
181
165
182
#### Get a specific shared step #####
166
183
This method allows to retrieve a specific shared step.
167
184
``` java
168
- SharedStep sharedStep = qaseApi . sharedSteps() . get( " PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
185
+ SharedStep sharedStep = sharedStepsApi . getSharedStep( " PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" ) . getResult( );
169
186
```
170
187
171
188
#### Create a new shared step ####
172
189
This method is used to create a new shared step through API.
173
190
174
191
``` java
175
- String stepHashCode = qaseApi . sharedSteps() . create( " PRJCODE" , " title" , " step action" , " step expected result " );
192
+ String hash = sharedStepsApi . createSharedStep( " PRJCODE" , new SharedStepCreate () . title( " title" ) . action( " step action" )) . getResult() . getHash( );
176
193
```
177
194
178
195
#### Update shared step ####
179
196
This method is used to update a shared step through API.
180
197
181
198
``` java
182
- String stepHashCode = qaseApi. sharedSteps(). update(" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" , " title" , " step action" , " step expected result" );
199
+ String hash = sharedStepsApi. updateSharedStep(" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" ,
200
+ new SharedStepUpdate (). title(" title" ). action(" step action" )). getResult(). getHash();
183
201
```
184
202
185
203
#### Delete shared step ####
186
204
This method completely deletes a shared step from repository. Also it will be removed from all test cases.
187
205
188
206
``` java
189
- boolean isDeleted = qaseApi . sharedSteps() . delete (" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
207
+ sharedStepsApi . deleteSharedStep (" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
190
208
```
191
209
192
210
### Test plans ###
@@ -195,36 +213,38 @@ boolean isDeleted = qaseApi.sharedSteps().delete("PRJCODE", "6676b8815da03124dc0
195
213
This method allows to retrieve all test plans stored in selected project. You can you limit and offset params to paginate.
196
214
197
215
``` java
198
- TestPlans testPlans = qaseApi . testPlans() . getAll( " PRJCODE " );
199
- List<TestPlan > testPlanList = testPlans . getTestPlanList ();
216
+ PlansApi plansApi = new PlansApi (qaseApi );
217
+ List<Plan > plans = plansApi . getPlans( " PRJCODE " , 100 , 0 ) . getResult() . getEntities ();
200
218
```
201
219
202
220
#### Get a specific test plan ####
203
221
This method allows to retrieve a specific test plan with detailed information about test cases in that plan and assignee.
204
222
205
223
``` java
206
- TestPlan testPlan = qaseApi . testPlans() . get( " PRJCODE" , 1 );
224
+ PlanDetailed planDetailed = plansApi . getPlan( " PRJCODE" , 1 ) . getResult( );
207
225
```
208
226
209
227
#### Create a new plan ####
210
228
This method is used to create a new test plan through API.
211
229
212
230
``` java
213
- long id = qaseApi. testPlans(). create(" PRJCODE" , " title" , " description" , 1 , 2 , 3 );
231
+ Long id = plansApi. createPlan(" PRJCODE" , new PlanCreate (). title(" title" ). cases(Arrays . asList(1L , 2L , 3L )))
232
+ .getResult(). getId();
214
233
```
215
234
216
235
#### Update test plan ####
217
236
This method is used to update a test plan through API.
218
237
219
238
``` java
220
- long id = qaseApi. testPlans(). update(" PRJCODE" , 1 , " title" , " description" , 1 , 2 , 3 );
239
+ Long id = plansApi. updatePlan(" PRJCODE" , 1 , new PlanUpdate (). title(" title" ). description(" description" ). cases(Arrays . asList(1L , 2L , 3L )))
240
+ .getResult(). getId();
221
241
```
222
242
223
243
#### Delete test plan ####
224
244
This method completely deletes a test plan from repository
225
245
226
246
``` java
227
- boolean isDeleted = qaseApi . testPlans() . delete (" PRJCODE" , 1 );
247
+ plansApi . deletePlan (" PRJCODE" , 1 );
228
248
```
229
249
230
250
### Test runs ###
0 commit comments