ISISComputingGroup / ISISComputingGroup/IBEX

System Test to Test for Single Eurotherm: Test all Ten Channels for a Single Eurotherm

Ouverte
#7,055 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
6
Forks
2
Merge moyen
16 h 40 min
PR mergées (30 j)
2

Description

## 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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par EPICS-IOC_Test_Framework/tests/eurotherm.py et le README.md du Eurotherm IOC, puis examinez le EUROTHRM IOC et la page wiki liée pour la configuration existante des adresses et du launcher. Étendez la couverture des tests système afin de vérifier l’accessibilité des PV sur les dix canaux, exécutez le test système Eurotherm depuis un terminal EPICS et mettez à jour le README ou le wiki là où les modifications l’exigent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
documentation, testing-qa
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.