TestFileResult: An R6 class representing a collection of test case results

TestFileResultR Documentation

An R6 class representing a collection of test case results

Description

A collection of test case results that correspond to a single test file.

Public fields

test_case_results

The TestCaseResult objects that make up this test file

filename

The name of the test file

points

The point value of the test file or a list of test case point values

Methods

Public methods


Method new()

Create a test file result.

Usage
TestFileResult$new(filename, test_case_results, points = NULL)
Arguments
filename

The name of the test file

test_case_results

The TestCaseResult objects that make up this test file

points

The point value of the test file or a list of test case point values


Method get_basename()

Get the basename of the file this result corresponds to.

Usage
TestFileResult$get_basename()
Returns

The basename of the test file


Method get_score()

Get the total score earned for this test file as a percentage. Uses TestCaseResult$get_score() to determine the points earned for each test case.

Usage
TestFileResult$get_score()
Returns

The score as a percentage.


Method repr()

Convert this result into a human-readable string for display.

Usage
TestFileResult$repr()
Returns

The string representation of this result


Method to_list()

Convert this result to a JSON-compatible list with all of its fields.

Usage
TestFileResult$to_list()
Returns

The list representation of this result


Method clone()

The objects of this class are cloneable with this method.

Usage
TestFileResult$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ucbds-infra/ottr documentation built on Feb. 24, 2024, 2:31 a.m.