Table Of Contents
Table Of Contents

inet.test.chart

This module provides functionality for chart testing of multiple simulations.

The main function is run_chart_tests(). It allows running multiple chart tests matching the provided filter criteria. Chart tests check if charts of the result analysis are the same as the saved baseline charts. The baseline charts can be found in the media folder of the simulation project. For the INET Framework the media folder can be found at https://github.com/inet-framework/media in a separate GitHub repository.

Classes

ChartTestTask

Represents a self-contained test task that can be run without additional parameters.

ChartUpdateTask

Represents a self-contained operation that captures all necessary information in order to be run.

MultipleChartTestTasks

Represents multiple test tasks that can be run together.

MultipleChartUpdateTasks

Represents multiple tasks that can be run together.

Functions

get_chart_test_tasks([simulation_project, ...])

Returns multiple chart test tasks matching the provided filter criteria. The returned tasks can be run by

get_update_chart_tasks([simulation_project, ...])

Returns multiple update chart tasks matching the provided filter criteria. The returned tasks can be run by

pad_to_size_centered(img, height, width)

Pad image to (height, width) centered.

run_chart_tests(**kwargs)

Runs one or more chart tests that match the provided filter criteria.

update_charts([simulation_project])

Updates the stored charts for one or more chart tests that match the provided filter criteria.

Module Contents

inet.test.chart.get_chart_test_tasks(simulation_project=None, run_simulations=True, filter='showcases', working_directory_filter=None, chart_filter=None, exclude_chart_filter=None, **kwargs)

Returns multiple chart test tasks matching the provided filter criteria. The returned tasks can be run by calling the run method.

Parameters:

kwargs (dict) – TODO

Returns (MultipleTestTasks):

an object that contains a list of ChartTestTask objects matching the provided filter criteria. The result can be run (and re-run) without providing additional parameters.

inet.test.chart.get_update_chart_tasks(simulation_project=None, run_simulations=True, filter=None, working_directory_filter=None, chart_filter=None, exclude_chart_filter=None, **kwargs)

Returns multiple update chart tasks matching the provided filter criteria. The returned tasks can be run by calling the run method.

Parameters:

kwargs (dict) – TODO

Returns (MultipleUpdateTasks):

an object that contains a list of ChartUpdateTask objects matching the provided filter criteria. The result can be run (and re-run) without providing additional parameters.

inet.test.chart.pad_to_size_centered(img, height, width)

Pad image to (height, width) centered.

inet.test.chart.run_chart_tests(**kwargs)

Runs one or more chart tests that match the provided filter criteria.

Parameters:

kwargs (dict) – The filter criteria parameters are inherited from the get_chart_test_tasks() function.

Returns (MultipleTestTaskResults):

an object that contains a list of TestTaskResult objects. Each object describes the result of running one test task.

inet.test.chart.update_charts(simulation_project=None, **kwargs)

Updates the stored charts for one or more chart tests that match the provided filter criteria.

Parameters:

kwargs (dict) – The filter criteria parameters are inherited from the get_update_chart_tasks() function.

Returns (MultipleUpdateTaskResults):

an object that contains a list of UpdateTaskResult objects. Each object describes the result of running one update task.