addRunResults static method

Future<TestResults> addRunResults(
  1. int runId, {
  2. required List<TestStatus> addTestResults,
})

Implementation

static Future<TestResults> addRunResults(
  int runId, {
  required List<TestStatus> addTestResults,
}) async {
  final url = '/add_results/$runId';

  final results = addTestResults.map((status) => status.toJson()).toList();
  final response = await FlutterTestRail.instance.client.request(
    url,
    RequestMethod.post,
    params: {
      'results': results,
    },
  );
  return TestResults.fromJson(response!);
}