Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
SY-3800
Greptile Summary
Automated Modbus and OPC UA driver QA by implementing comprehensive write task tests and refactoring the test framework to separate read and write test lifecycles.
Key Changes
TaskCaseintoReadTaskCase(testing sample counting, data saving, rate reconfiguration) andWriteTaskCase(testing command sending and task reconfiguration)use_as_index)Benefits
Confidence Score: 5/5
Important Files Changed
Class Diagram
%%{init: {'theme': 'neutral'}}%% classDiagram class TestCase { <<abstract>> +client: sy.Client +log() +fail() } class TaskCase { <<abstract>> +task_name: str +device_name: str +tsk: Task +_channel_key_attr: str +create()* sy.Task +setup() +cleanup() +_channel_keys() list +test_task_exists() +assert_task_exists() +assert_device_exists() } class ReadTaskCase { +run() +test_start_and_stop() +test_disable_data_saving() +test_enable_data_saving() +test_reconfigure_rate() +test_survives_channel_deletion() +assert_sample_count() +assert_no_samples_persisted() } class WriteTaskCase { +run() +test_send_commands() +test_reconfigure_name() +_assert_streamed_values() } class SimulatorCase { <<abstract>> +sim: Simulator +sim_class } class ModbusReadTaskCase { +SAMPLE_RATE +create() modbus.ReadTask +create_channels()* list } class ModbusWriteTaskCase { +create() modbus.WriteTask +create_channels()* list } class OPCUAReadTaskCase { +SAMPLE_RATE +array_mode: bool +array_size: int +create() opcua.ReadTask +create_channels()* list } class OPCUAWriteTaskCase { +SAMPLE_RATE +_channel_key_attr +create() opcua.WriteTask +create_channels()* list } TestCase <|-- TaskCase TaskCase <|-- ReadTaskCase TaskCase <|-- WriteTaskCase ReadTaskCase <|-- ModbusReadTaskCase WriteTaskCase <|-- ModbusWriteTaskCase ReadTaskCase <|-- OPCUAReadTaskCase WriteTaskCase <|-- OPCUAWriteTaskCase SimulatorCase <|-- ModbusReadTaskCase SimulatorCase <|-- ModbusWriteTaskCase SimulatorCase <|-- OPCUAReadTaskCase SimulatorCase <|-- OPCUAWriteTaskCaseLast reviewed commit: 0a078e2