ISISComputingGroup / ISISComputingGroup/IBEX
System Test to Test for Single Eurotherm: Test all Ten Channels for a Single Eurotherm
- 主要言語
- 言語のデータがありません
- スター
- 6
- フォーク
- 2
- 平均マージ
- 16時間 40分
- マージ済み PR(30日)
- 2
説明
## Where?
_Where is the issue likely to be (be as specific as possible e.g. filepaths)_
- [EPICS-IOC_Test_Framework](https://github.com/ISISComputingGroup/EPICS-IOC_Test_Framework) `EPICS-IOC_Test_Framework\tests\eurotherm.py`
- [WIKI](https://github.com/ISISComputingGroup/IBEX/wiki/Eurotherms)
- [Eurotherm IOC](https://github.com/ISISComputingGroup/EPICS-ioc/tree/master/EUROTHRM)
## How?
_How did the issue come about/known cause of issue if any?
Currently only one channel is tested for the Eurotherm IOC. Ideally, although all channels should have the same behaviour and an assumption "could" be made that a system test for one channel passing means the same test will pass for all channels, we should test all channels for absolute certainty. The only means of doing this currently is to manually change the address in `EPICS-IOC_Test_Framework\tests\eurotherm.py` and run all tests. The process to do this is described in the `README.md` in the [Eurotherm IOC repository](https://github.com/ISISComputingGroup/EPICS-ioc/tree/master/EUROTHRM).
This issue's purpose is to create a system test which checks all channels are accessible. Below is an basic example of a system test which could be extended upon to enable this. Please note that the below example does not work as the macro for the address is not correctly reset or initialised to allow for all addresses to pass.
```python
@parameterized.expand([("1", 1), ("2", 2), , ("3", 3), , ("4", 4), , ("5", 5), , ("6", 6), , ("7", 7), ("8", 8), ("9", 9), ("10", 10)])
def test_given_sp_WHEN_sp_read_rbv_temperature_for_given_channel_THEN_rbv_is_same_as_sp_on_channel_(self, _, channel_int):
with self._ioc.start_with_macros({
"ADDR_1": "", # reset ADDR_1 to empty str
f"ADDR": f"A0{channel_int}",
f"ADDR_{channel_int}": 1
}, pv_to_wait_for=f"A0{channel_int}:CURRENT_TEMP"):
expected_temperature = 10.0
self.ca.assert_setting_setpoint_sets_readback(expected_temperature, "SP:RBV", "SP")
```
If following the above example for a system test using `self._ioc.start_with_macros()` when working on this issue, you will also need to add an ioc launcher class which uses the `ProcServLauncher` to the IOC variable:
```python
IOCS = [
{
"name": DEVICE,
"directory": get_default_ioc_dir("EUROTHRM"),
"ioc_launcher_class": ProcServLauncher, # Needed for using `self._ioc.start_with_macros()` in system tests
"macros": {
"ADDR": ADDRESS,
"ADDR_1": ADDR_1,
"ADDR_2": "",
"ADDR_3": "",
"ADDR_4": "",
"ADDR_5": "",
"ADDR_6": "",
"ADDR_7": "",
"ADDR_8": "",
"ADDR_9": "",
"ADDR_10": ""
},
"emulator": EMULATOR_DEVICE,
},
]
```
## Acceptance criteria
- [ ] A system test exists to test all channels for a single eurotherm to ensure all channels can be communicated with.
- [ ] README.md in the [Eurotherm IOC repository](https://github.com/ISISComputingGroup/EPICS-ioc/tree/master/EUROTHRM) has been updated where necessary to reflect changes.
- [ ] The [wiki page](https://github.com/ISISComputingGroup/IBEX/wiki/Eurotherms) has been updated where necessary to reflect changes.
## How to Test
_verbose instructions for reviewer to test changes
(**Add before making a PR**)_
- From an EPICS terminal, run the eurotherm system test and ensure that all 10 channels are tested.
- Ensure the test is well written and checks that a pv is accessible from all channels.
- Check that any additional documentation such as the README.md in the [Eurotherm IOC repo](https://github.com/ISISComputingGroup/EPICS-ioc/tree/master/EUROTHRM) and the [wiki pages](https://github.com/ISISComputingGroup/IBEX/wiki/Eurotherms) have been updated where necessary.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
EPICS-IOC_Test_Framework/tests/eurotherm.py と Eurotherm IOC の README.md から始め、次に EUROTHRM IOC とリンクされた wiki ページを確認して、既存のアドレスおよび launcher の設定を調べます。システムテストのカバレッジを拡張し、10 個すべてのチャンネルで PV にアクセスできることを確認してから、EPICS ターミナルで Eurotherm システムテストを実行し、変更に応じて README または wiki を更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation, testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100