How to specify multiple values for an external parameter in a file?

You can specify multiple values for an external parameter that is a list.

Just add multiple rows to the csv file like below. (In this case we have a test plan which sweeps the frequency.

Enabled, Parameters \ Frequency
TRUE, 1000
TRUE, 2000
FALSE, 4000
TRUE, 5000
3 Likes

Interesting. Is there an example available (or planned)?

I am unable get this working with my tap plan (which I cannot attach here because I’m a new user). But listing external parameters with tap.exe gives this

OpenTAP Command Line Interface 9.14.0+51e7081e

Loaded test plan from C:\Tap plans\SweepExample.TapPlan [512 ms]
Test Plan: SweepExample
Listing 2 External Test Plan Parameters:
  Parameters \ Sweep 1 \ APTSweep Values = Count: 3
  Parameters \ Sweep 2 \ APTSweep Values = Count: 3

CSV file containing external parameters:

Parameters \ Sweep 1 \ APTSweep Values
1
1
1
Parameters \ Sweep 2 \ APTSweep Values
Log 11
Log 22
Log 33

When I run the tap plan, original values are used instead of ones found in CSV file. Could you what I’m doing wrong here? I am using OpenTAP Command Line Interface 9.14.0+51e7081e.

2 Likes

@jouni.uusimaa here is an example you can try. The command to run from the command line is:

tap run ExternalSweep.TapPlan -e ExternalSweepValues.csv

This uses the Demo Plugin. I’ve also upgraded your test level, so you should be able to add attachments in future posts.
ExternalSweep.TapPlan (4.7 KB)
ExternalSweepValues.csv (50 Bytes)

@brennen_direnzo I tested with the files you provided and manually changed values in CSV file but according to output.txt it seems that original values are still being used.

ExternalSweepValues.csv (49 Bytes)
output.txt (10.6 KB)

@jouni.uusimaa I’m actually seeing the same behavior (I guess I was fooled by using the same values). I’m seeing some other odd behavior and have submitted this issue:

I’ll let you know once we have a solution.

1 Like