Act is a passive th2 component with parameterized functions which is implemented as part of the test logic. Script or other components can call these functions via gRPC. Act can interact with conn (Connects), hands, check1s, other acts to execute its tasks. Information about the progress of the task is published to the estore th2 component via MQ pin. This th2 component type allows for often used logic from script into it and then share it between all th2 components.
This project is implemented gRPC API described in the th2-grpc-act-template
Most of them consist of the next steps:
- Gets a gRPC request with parameters.
- Requests checkpoint from check1 via gRPC pin
- Sends the passed business message to Connect via mq pin
- Waits the specific business message from Connect during specified timeout
- Returns responded business message with checkpoint
apiVersion: th2.exactpro.com/v1
kind: Th2Box
metadata:
name: act
spec:
type: th2-act
pins:
- name: grpc_server
connection-type: grpc
- name: grpc_client_to_check1
connection-type: grpc
- name: from_codec
connection-type: mq
attributes: [ "subscribe", "parsed", "first", "oe" ]
- name: to_conn1
connection-type: mq
attributes:
- publish
- parsed
filters:
- metadata:
- field-name: session_alias
expected-value: conn1_session_alias
operation: EQUAL
- name: to_conn2
connection-type: mq
attributes:
- publish
- parsed
filters:
- metadata:
- field-name: session_alias
expected-value: conn2_session_alias
operation: EQUAL