addResultForCase method

Future<TestResult> addResultForCase(
  1. int caseId, {
  2. String? comment,
  3. String? elapsed,
  4. required int statusId,
})

Implementation

Future<TestResult> addResultForCase(
  int caseId, {
  String? comment,
  // in `1m 38s` format
  String? elapsed,
  required int statusId,
}) async {
  final response = await TestRail.instance.client.request(
    '/add_result_for_case/$id/$caseId',
    RequestMethod.post,
    params: {
      'status_id': statusId,
      if (comment != null) 'comment': comment,
      if (elapsed != null) 'elapsed': elapsed,
    },
  );

  return TestResult.fromJson(response);
}