@@ -30,22 +30,21 @@ This method allows to retrieve all projects available for your account. You can
3030
3131``` java
3232ProjectsApi projectsApi = new ProjectsApi (qaseApi);
33+
3334List<Project > projects = projectsApi. getProjects(100 , 0 ). getResult(). getEntities();
3435```
3536
3637#### Get All Projects ####
3738This method allows to retrieve a specific project.
3839
3940``` java
40- ProjectsApi projectsApi = new ProjectsApi (qaseApi);
4141Project project = projectsApi. getProject(" PROJ" ). getResult();
4242```
4343
4444#### Create a new project ####
4545This method is used to create a new project through API.
4646
4747``` java
48- ProjectsApi projectsApi = new ProjectsApi (qaseApi);
4948ProjectCreate project = new ProjectCreate ()
5049 .code(" PROJ" )
5150 .title(" Project title" )
@@ -59,6 +58,8 @@ String code = projectsApi.createProject(project).getResult().getCode()
5958This method allows to retrieve all test cases stored in selected project. You can you limit and offset params to paginate.
6059
6160``` java
61+ CasesApi casesApi = new CasesApi (qaseApi);
62+
6263GetCasesFiltersParameter filters = new GetCasesFiltersParameter ()
6364 .automation(" is-not-automated,to-be-automated" )
6465 .behavior(" positive" )
@@ -133,6 +134,8 @@ suitesApi.deleteSuite("PRJCODE", 18, null);
133134This method allows to retrieve all milestones stored in selected project. You can you limit and offset params to paginate.
134135
135136``` java
137+ MilestonesApi milestonesApi = new MilestonesApi (qaseApi);
138+
136139GetMilestonesFiltersParameter filters = new GetMilestonesFiltersParameter (). search(" title" );
137140List<Milestone > milestones = milestonesApi. getMilestones(" PRJCODE" , filters, 100 , 0 )
138141 .getResult(). getEntities();
@@ -173,6 +176,7 @@ milestonesApi.deleteMilestone("PRJCODE", 6);
173176This method allows to retrieve all shared steps stored in selected project. You can you limit and offset params to paginate.
174177``` java
175178SharedStepsApi sharedStepsApi = new SharedStepsApi (qaseApi);
179+
176180GetMilestonesFiltersParameter filters = new GetMilestonesFiltersParameter ()
177181 .search(" title" );
178182List<SharedStep > sharedSteps = sharedStepsApi. getSharedSteps(" PRJCODE" , filters, 100 , 0 )
@@ -214,6 +218,7 @@ This method allows to retrieve all test plans stored in selected project. You ca
214218
215219``` java
216220PlansApi plansApi = new PlansApi (qaseApi);
221+
217222List<Plan > plans = plansApi. getPlans(" PRJCODE" , 100 , 0 ). getResult(). getEntities();
218223```
219224
@@ -253,30 +258,36 @@ plansApi.deletePlan("PRJCODE", 1);
253258This method allows to retrieve all test runs stored in selected project. You can you limit and offset params to paginate.
254259
255260``` java
256- TestRunService . Filter filter = qaseApi. testRuns(). filter(). status(active, complete);
257- TestRuns testRuns = qaseApi. testRuns(). getAll(" PRJCODE" , 50 , 0 , filter, true );
258- List<TestRun > testRunList = testRuns. getTestRunList();
261+ RunsApi runsApi = new RunsApi (qaseApi);
262+
263+ GetRunsFiltersParameter filters = new GetRunsFiltersParameter (). status(" complete" );
264+ List<Run > runs = runsApi. getRuns(" PRJCODE" , filters, 50 , 0 , " cases" )
265+ .getResult(). getEntities();
259266```
260267
261268#### Get a specific test run ####
262269This method allows to retrieve a specific test run.
263270
264271``` java
265- TestRun testRun = qaseApi . testRuns() . get( " PRJCODE " , 1 , false );
272+ Run run = runsApi . getRun( " PRJ " , 1 , null ) . getResult( );
266273```
267274
268275#### Create a new test run ####
269276This method is used to create a new test run through API.
270277
271278``` java
272- qaseApi. testRuns(). create(" PRJCODE" , " title" , 1 , 2 , 3 , 4 );
279+ RunCreate newTestRun = new RunCreate ()
280+ .title(" New test run" )
281+ .cases(Arrays . asList(1L , 2L , 3L , 55L ));
282+ Long id = runsApi. createRun(" PRJCODE" , newTestRun)
283+ .getResult(). getId();
273284```
274285
275286#### Delete test run ####
276287This method completely deletes a test run from repository
277288
278289``` java
279- boolean isDeleted = qaseApi . testRuns() . delete (" PRJCODE" , 1 );
290+ runsApi . deleteRun (" PRJCODE" , 1 );
280291```
281292
282293### Test run results ###
@@ -285,76 +296,89 @@ boolean isDeleted = qaseApi.testRuns().delete("PRJCODE", 1);
285296This method allows to retrieve all test run results stored in selected project. You can you limit and offset params to paginate. Also you can use various filters to get specific results.
286297
287298``` java
288- TestRunResultService . Filter filter = qaseApi. testRunResults(). filter(). status(passed);
289- TestRunResults runResultsResponse = qaseApi. testRunResults(). getAll(" PRJCODE" , 50 , 0 , filter);
290- List<TestRunResult > testRunResultList = runResultsResponse. getTestRunResultList();
299+ ResultsApi resultsApi = new ResultsApi (qaseApi);
300+
301+ GetResultsFiltersParameter filters = new GetResultsFiltersParameter ()
302+ .status(" in_progress" );
303+ List<Result > results = resultsApi. getResults(" PRJ" , filters, 33 , 3 )
304+ .getResult(). getEntities();
291305```
292306
293307#### Get a specific test run result ####
294308This method allows to retrieve a specific test run result by hash.
295309``` java
296- TestRunResult testRunResult = qaseApi. testRunResults(). get(" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
310+ Result result = resultsApi. getResult(" PRJCODE" , " 6676b8815da03124dc039d89cc111586a4f45dc9" )
311+ .getResult();
297312```
298313
299314#### Add a new test run result ####
300315This method allows to add a new test run result through API.
301316``` java
302- String hash = qaseApi. testRunResults(). create(" PRJCODE" , 1 , 58 , RunResultStatus . passed);
317+ ResultCreate resultCreate = new ResultCreate ()
318+ .caseId(1L )
319+ .status(ResultCreate . StatusEnum . PASSED );
320+ String hash = resultsApi. createResult(" PRJCODE" , 1 , resultCreate)
321+ .getResult(). getHash();
303322```
304323
305324#### Update test run result ####
306325This method allows to update test run result through API.
307326``` java
308- String hash = qaseApi. testRunResults(). update(" PRJCODE" , 1 , " 6676b8815da03124dc039d89cc111586a4f45dc9" , passed, Duration . ofHours(2 ));
327+ ResultUpdate resultUpdate = new ResultUpdate (). status(ResultUpdate . StatusEnum . FAILED );
328+ resultsApi. updateResult(" PRJCODE" , 1 , " 6676b8815da03124dc039d89cc111586a4f45dc9" ,
329+ resultUpdate);
309330```
310331
311332#### Delete test run result ####
312333This method completely deletes a test run result from repository
313334``` java
314- boolean isDeleted = qaseApi . testRunResults() . delete (" PRJCODE" , 1 , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
335+ resultsApi . deleteResult (" PRJCODE" , 1 , " 6676b8815da03124dc039d89cc111586a4f45dc9" );
315336```
316337
317338### Defects ###
318339
319340#### Get all defects ####
320341This method allows to retrieve all defects stored in selected project. You can you limit and offset params to paginate.
321342``` java
322- DefectService . Filter filter = qaseApi. defects(). filter(). status(open);
323- Defects defects = qaseApi. defects(). getAll(" PRJCODE" , 50 , 0 , filter);
324- List<Defect > defectList = defects. getDefectList();
343+ DefectsApi defectsApi = new DefectsApi (qaseApi);
344+
345+ GetDefectsFiltersParameter filters = new GetDefectsFiltersParameter ()
346+ .status(GetDefectsFiltersParameter . StatusEnum . OPEN );
347+ List<Defect > defects = defectsApi. getDefects(" PROJ" , filters, 88 , 12 ). getResult(). getEntities();
325348```
326349
327350#### Get a specific defect ####
328351This method allows to retrieve a specific defect.
329352``` java
330- Defect defect = qaseApi . defects() . get( " PRJCODE" , 1 );
353+ Defect defect = defectsApi . getDefect( " PRJCODE" , 1 ) . getResult( );
331354```
332355
333356#### Resolve ####
334357This method is used to resolve defect through API.
335358``` java
336- boolean isResolved = qaseApi . defects() . resolve( " PRJCODE" , 1 );
359+ defectsApi . resolveDefect( " PRJCODE" , 1 )
337360```
338361
339362#### Delete defect ####
340363This method completely deletes a defect from repository
341364``` java
342- boolean isDeleted = qaseApi . defects() . delete (" PRJCODE" , 1 );
365+ defectsApi . deleteDefect (" PRJCODE" , 1 );
343366```
344367
345368### Custom Fields ###
346369
347370#### Get all custom fields ####
348371This method allows to retrieve all custom fields for a specific project. You can you limit and offset params to paginate.
349372``` java
350- CustomFields customFields = qaseApi. customFields(). getAll(" PRJCODE" );
351- List<CustomField > customFieldList = customFields. getCustomFieldList();
373+ CustomFieldsApi customFieldsApi = new CustomFieldsApi (qaseApi);
374+
375+ List<CustomField > customFields = customFieldsApi. getCustomFields(null , 100 , 0 ). getResult(). getEntities();
352376```
353377
354378#### Get a specific custom field ####
355379This method allows to retrieve one custom fields for specific project by id
356380``` java
357- CustomField customField = qaseApi . customFields() . get( " PRJCODE " , 1 );
381+ CustomField customField = customFieldsApi . getCustomField( 1 ) . getResult( );
358382```
359383
360384### Attachments ###
@@ -363,28 +387,31 @@ CustomField customField = qaseApi.customFields().get("PRJCODE", 1);
363387This method allows to retrieve all attachments uploaded into your projects. You can you limit and offset params to paginate.
364388
365389``` java
366- Attachments attachments = qaseApi. attachments(). getAll();
367- List<Attachment > attachmentList = attachments. getAttachmentList();
390+ AttachmentsApi attachmentsApi = new AttachmentsApi (qaseApi);
391+
392+ List<AttachmentGet > attachments = attachmentsApi. getAttachments(100 , 0 ). getResult(). getEntities();
368393```
369394
370395#### Get a specific attachment ####
371396This method allows to retrieve a specific attachment by hash.
372397
373398``` java
374- Attachment attachment = qaseApi . attachments() . get( " 6676b8815da03124dc039d89cc111586a4f45dc9" );
399+ AttachmentGet attachment = attachmentsApi . getAttachment( " 6676b8815da03124dc039d89cc111586a4f45dc9" ) . getResult( );
375400```
376401
377402#### Upload attachment ####
378403This method allows to upload attachment to Qase. Max upload size: * Up to 32 Mb per file.
379404``` java
380405File file = new File (" 1.png" );
381- List<Attachment > attachment = qaseApi. attachments(). add(" PRJCODE" , file);
406+ List<AttachmentGet > attachments = attachmentsApi. uploadAttachment(" PRJCODE" ,
407+ Collections . singletonList(file))
408+ .getResult();
382409```
383410
384411#### Delete attachment ####
385412This method completely deletes an attachment.
386413``` java
387- boolean isDeleted = qaseApi . attachments() . delete (" 6676b8815da03124dc039d89cc111586a4f45dc9" );
414+ attachmentsApi . deleteAttachment (" 6676b8815da03124dc039d89cc111586a4f45dc9" );
388415```
389416
390417#### Associate an attachment with a test case or step ####
@@ -463,20 +490,3 @@ Afterward, the running test (of id 3) case will have the step and the id of uplo
463490In its turn, the step will have the id of uploaded ` stepScreenshot.jpg ` associated with it.
464491
465492Note, ` caseScreenshot.jpg ` will be associated only with the test case and ` stepScreenshot.jpg ` will be associated only with the step.
466-
467- ### Team ###
468-
469- #### Get all team members ####
470- This method allows to retrieve all users in your team. You can you limit and offset params to paginate.
471-
472- ``` java
473- Users users = qaseApi. team(). getAll();
474- List<User > userList = users. getUserList();
475- ```
476-
477- #### Get a specific team member
478- This method allows to retrieve a specific team member by id.
479-
480- ``` java
481- User user = qaseApi. team(). get(1 );
482- ```
0 commit comments