flitsr.spectrumBuilder.SpectrumUpdater

class flitsr.spectrumBuilder.SpectrumUpdater(spectrum: Spectrum)

Bases: SpectrumBuilder

Allows updating of an already created spectrum using the SpectrumBuilder interface.

__init__(spectrum: Spectrum)

Constructs a SpectrumBuilder object to facilitate building a Spectrum.

Parameters:

collapse_methods – bool: (Default value = False) Whether to form a method level spectrum.

Methods

__init__(spectrum)

Constructs a SpectrumBuilder object to facilitate building a Spectrum.

addElement(details, faults[, index])

Add a new element to the spectrum, with the given details and faults.

addExecution(test, elem)

Mark the specified element as executed in the given test.

addNonExecution(test, elem)

Mark the specified element as not executed in the given test.

addTest(name, outcome[, index])

Add a new test to the spectrum with the given name, index, and outcome.

copy_test_and_execution(test, spectrum)

Copy over the given test to this spectrum, with the executions given in the supplied other spectrum.

form_groups()

Given one test pertaining to a row in the spectrum, split the groups according to the coverage.

getElement(index)

Retreive the element with the specified index.

get_spectrum()

Return the spectrum from this SpectrumBuilder.

get_tests()

Return the current list of Tests.

remove_test_with_executions(test)

Remove the given test from the spectrum, including any executions related to it.

copy_test_and_execution(test: Test, spectrum: Spectrum)

Copy over the given test to this spectrum, with the executions given in the supplied other spectrum.

Parameters:
  • test – Spectrum.Test: The test to copy over to this spectrum.

  • spectrum – Spectrum: The spectrum containing the executions of test.

remove_test_with_executions(test: Test)

Remove the given test from the spectrum, including any executions related to it.

Parameters:

test – Spectrum.Test: The test to remove.