reliability
probe load

# load_test_result_field_should_be_less_than

Reads a load test result and compares the field’s value to be lesser than the expected given value.

Run it now
View details

Type | probe
Module | chaosreliably.activities.load.probes
Name | load_test_result_field_should_be_less_than
Return | boolean

Usage

JSON

    {
      "name": "load-test-result-field-should-be-less-than",
      "type": "probe",
      "provider": {
        "type": "python",
        "module": "chaosreliably.activities.load.probes",
        "func": "load_test_result_field_should_be_less_than",
        "arguments": {
          "result_filepath": "",
          "field": "",
          "expect": 0
        }
      }
    }

YAML

    name: load-test-result-field-should-be-less-than
    provider:
      arguments:
        expect: 0
        field: ''
        result_filepath: ''
      func: load_test_result_field_should_be_less_than
      module: chaosreliably.activities.load.probes
      type: python
    type: probe

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
field | string | num_failures | Yes | Field | Fiel name, of the result file, to read a value from
expect | integer | 1 | Yes | Expected Value | Value expected in the results
result_item_name | string | / | Yes | Endpoint Path | When several path were recorded during the load tests, use the field to select the path you want to verify
result_filepath | string | /tmp/results.json | No | Result File Path | Path to a local file that was created via the `inject_gradual_traffic_into_endpoint` action
pass_if_file_is_missing | boolean | true | No | Allow Missing Result File | Act as if succeeded when file is missing

Reads a load test result and compares the field’s value to less than the expected given value.

If the load test runs against many endpoint, specify which one must be validated by setting the result_item_name to match the name field.

Signature

    def load_test_result_field_should_be_less_than(
            result_filepath: str,
            field: str,
            expect: int,
            result_item_name: Optional[str] = None,
            pass_if_file_is_missing: bool = True) -> bool:
        pass

## Related starters

- reliability
  action load

  ## `inject_gradual_traffic_into_endpoint`

  Load traffic into the given endpoint.
- fault
  action load

  ## `Load Test via Proxy`

  Send traffic to an endpoint via a fault's proxy
- fault
  action load

  ## `Load Test via Proxy`

  Send traffic to an endpoint via a fault's proxy