Skip to content

Projects

Thijs Kok edited this page Dec 9, 2021 · 1 revision

Projects are the hub of TestMonitor activities. All data -- like requirements, risks, test cases, test suites, milestones, test runs, test results, and issues -- link to a project.

Get a list of projects

To get a list of TestMonitor projects, use the list method:

ArrayList<Project> projects = client.projects().list();

This will return a paginated list of projects, limited by the default maximum of 15 records.

Pagination

You can request a different page and change the record limit simply by passing them as arguments:

ArrayList<Project> projects = client.projects().list(2, 30);

This will retrieve the second page of a list of 30 records, i.e., records 31 through 60.

Get a single project

To get a single TestMonitor project, use the get method, which takes an project ID as parameter:

Project project = client.projects().get(1);

You can access its properties by using its getters:

Project project = client.projects().get(1);

System.out.println(project.getName());
System.out.println(project.getStartDate().toString());
System.out.println(project.getEndDate().toString());

This will output the project name, start- and end date.

Updating a project

Updating a project is just a matter of using the setters and the update method:

Project project = client.projects().get(1);

project.setName("A New Name");

client.projects().update(project);
Clone this wiki locally