create static method

Future<TestRun> create({
  1. Iterable<int>? caseIds,
  2. String? description,
  3. bool includeAll = false,
  4. required String name,
  5. required int projectId,
})

Implementation

static Future<TestRun> create({
  Iterable<int>? caseIds,
  String? description,
  bool includeAll = false,
  required String name,
  required int projectId,
}) async {
  final response = await TestRail.instance.client.request(
    '/add_run/$projectId',
    RequestMethod.post,
    params: <String, dynamic>{
      if (caseIds != null) 'case_ids': caseIds,
      if (description != null) 'description': description,
      'include_all': includeAll,
      'name': name,
    },
  );
  return TestRun.fromJson(response);
}