@@ -19,8 +19,8 @@ Qase.io uses API tokens to authenticate requests. You can view a manage your API
1919You must replace api_token with your personal API key.
2020
2121``` java
22- ApiClient qaseApi = Configuration . getDefaultApiClient ();
23- qaseApi . setApiKey(" api_token" );
22+ ApiClient apiClient = QaseClient . getApiClient ();
23+ apiClient . setApiKey(" api_token" );
2424```
2525
2626### Projects ###
@@ -59,25 +59,32 @@ String code = projectsApi.createProject(project).getResult().getCode()
5959This method allows to retrieve all test cases stored in selected project. You can you limit and offset params to paginate.
6060
6161``` 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();
6774```
6875
6976#### Get a specific test case ####
7077This method allows to retrieve a specific test case.
7178
7279``` java
73- TestCase testCase = qaseApi . testCases() . get( " PRJCODE" , 4 );
80+ TestCase testCase = casesApi . getCase( " PRJCODE" , 4 ) . getResult( );
7481```
7582
7683#### Delete test case ####
7784This method completely deletes a test case from repository.
7885
7986``` java
80- boolean isDeleted = qaseApi . testCases() . delete (" PRJCODE" , 4 );
87+ casesApi . deleteCase (" PRJCODE" , 4 );
8188```
8289
8390### Suites ###
@@ -86,107 +93,118 @@ boolean isDeleted = qaseApi.testCases().delete("PRJCODE", 4);
8693This method allows to retrieve all test suites stored in selected project. You can you limit and offset params to paginate.
8794
8895``` 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();
91100```
92101
93102#### Get a specific test suite ####
94103This method allows to retrieve a specific test suite.
95104
96105``` java
97- Suite suite = qaseApi . suites() . get( " PRJCODE" , 18 );
106+ Suite suite = suitesApi . getSuite( " PRJCODE" , 18 ) . getResult( );
98107```
99108
100109#### Create a new test suite ####
101110This method is used to create a new test suite through API.
102111
103112``` java
104- long id = qaseApi. suites(). create(" PRJCODE" , " SuiteTitle" , " Description" );
113+ Long id = suitesApi. createSuite(" PRJCODE" , new SuiteCreate (). title(" SuiteTitle" ))
114+ .getResult(). getId();
105115```
106116
107117#### Update test suite ####
108118This method is used to update a test suite through API.
109119
110120``` java
111- qaseApi . suites() . update( " PRJCODE" , 18 , " NewSuiteTitle" );
121+ suitesApi . updateSuite( " PRJCODE" , 18 , new SuiteUpdate () . title( " NewSuiteTitle" ) );
112122```
113123
114124#### Delete test suite ####
115125This method completely deletes a test suite from repository.
116126
117127``` java
118- boolean isDeleted = qaseApi . suites() . delete( " PRJCODE" , 18 )
128+ suitesApi . deleteSuite( " PRJCODE" , 18 , null );
119129```
120130
121131### Milestones ###
122132#### Get all milestones ####
123133This method allows to retrieve all milestones stored in selected project. You can you limit and offset params to paginate.
124134
125135``` 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();
128139```
129140
130141#### Get a specific milestone ####
131142This method allows to retrieve a specific milestone.
132143
133144``` java
134- Milestone milestone = qaseApi. milestones(). get(" PRJCODE" , 1 )
145+ Milestone milestone = milestonesApi. getMilestone(" PRJCODE" , 1 )
146+ .getResult();
135147```
136148
137149#### Create a new milestone ####
138150This method is used to create a new milestone through API.
139151
140152``` java
141- long id = qaseApi. milestones(). create(" PRJCODE" , " MilestoneTitle" , " MilestoneDescription" )
153+ Long id = milestonesApi. createMilestone(" PRJCODE" , new MilestoneCreate (). title(" MilestoneTitle" ))
154+ .getResult(). getId();
142155```
143156#### Update milestone ####
144157This method is used to update a milestone through API.
145158
146159``` java
147- long id = qaseApi. milestones(). update(" PRJCODE" , 6 , " NewMilestoneTitle" );
160+ Long id = milestonesApi. updateMilestone(" PRJCODE" , 6 , new MilestoneUpdate (). title(" NewMilestoneTitle" ))
161+ .getResult(). getId();
148162```
149163
150164#### Delete milestone ####
151165This method completely deletes a milestone from repository
152166``` java
153- boolean isDeleted = qaseApi . milestones() . delete (" PRJCODE" , 6 );
167+ milestonesApi . deleteMilestone (" PRJCODE" , 6 );
154168```
155169
156170### Shared steps ###
157171
158172#### Get all shared steps ####
159173This method allows to retrieve all shared steps stored in selected project. You can you limit and offset params to paginate.
160174``` 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();
163180```
164181
165182#### Get a specific shared step #####
166183This method allows to retrieve a specific shared step.
167184``` java
168- SharedStep sharedStep = qaseApi . sharedSteps() . get( " PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
185+ SharedStep sharedStep = sharedStepsApi . getSharedStep( " PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" ) . getResult( );
169186```
170187
171188#### Create a new shared step ####
172189This method is used to create a new shared step through API.
173190
174191``` 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( );
176193```
177194
178195#### Update shared step ####
179196This method is used to update a shared step through API.
180197
181198``` 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();
183201```
184202
185203#### Delete shared step ####
186204This method completely deletes a shared step from repository. Also it will be removed from all test cases.
187205
188206``` java
189- boolean isDeleted = qaseApi . sharedSteps() . delete (" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
207+ sharedStepsApi . deleteSharedStep (" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
190208```
191209
192210### Test plans ###
@@ -195,36 +213,38 @@ boolean isDeleted = qaseApi.sharedSteps().delete("PRJCODE", "6676b8815da03124dc0
195213This method allows to retrieve all test plans stored in selected project. You can you limit and offset params to paginate.
196214
197215``` 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 ();
200218```
201219
202220#### Get a specific test plan ####
203221This method allows to retrieve a specific test plan with detailed information about test cases in that plan and assignee.
204222
205223``` java
206- TestPlan testPlan = qaseApi . testPlans() . get( " PRJCODE" , 1 );
224+ PlanDetailed planDetailed = plansApi . getPlan( " PRJCODE" , 1 ) . getResult( );
207225```
208226
209227#### Create a new plan ####
210228This method is used to create a new test plan through API.
211229
212230``` 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();
214233```
215234
216235#### Update test plan ####
217236This method is used to update a test plan through API.
218237
219238``` 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();
221241```
222242
223243#### Delete test plan ####
224244This method completely deletes a test plan from repository
225245
226246``` java
227- boolean isDeleted = qaseApi . testPlans() . delete (" PRJCODE" , 1 );
247+ plansApi . deletePlan (" PRJCODE" , 1 );
228248```
229249
230250### Test runs ###
0 commit comments