The scenarios work if I create individual ones for each permutation however I would like to avoid having to read the file multiple times considering it can become quite a large file.
Scenario Outline: Mass_A is correct for STD and PCE
* def row =
"""
{
Artikeltyp: '<Artikeltyp>',
MinBestellmengeEinheit: '<MinBestellmengeEinheit>',
Mass_A: '<Mass_A>'
}
"""
* def tempArtikeltyp = '<Artikeltyp>'
* def tempMinBestellmengeEinheit = '<MinBestellmengeEinheit>'
* def tempMass_A = '<Mass_A>'
* def listMinBestTypes = ['PCE','PR','DZN']
* def expected = (tempArtikeltyp == 'STD' && (karate.match(listMinBestTypes,tempMinBestellmengeEinheit).pass) && (tempMass_A.length <= 0)) ? 'Mass_A is NOT populated for STD and PCE' : 'Mass_A is correct for STD and PCE'
* match expected == karate.info.scenarioName
Examples:
| read('input.csv')|
Any guidance would be much appreciated.