How to get type of data source step like jdbc or excel via groovy
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016
08:11 AM
12-05-2016
08:11 AM
How to get type of data source step like jdbc or excel via groovy
Hi, I have question that how to get type used in data source step in groovy like jdbc, data connection, excel etc.
If (getTestStep.config.type == "datasource")
As per above script, if condition can validate if step is of type data source but what if i want to validate if datasource is of type jdbc ?
If (getTestStep.config.type == "datasource")
As per above script, if condition can validate if step is of type data source but what if i want to validate if datasource is of type jdbc ?
Solved! Go to Solution.
Labels:
- Labels:
-
Data-Driven Testing
-
Scripting
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016
08:39 AM
12-05-2016
08:39 AM
Take a look at the getDataSource() method of the class WsdlDataSourceTestStep, this returns a DataSource object which has a getType() method.
I've never had to use this so don't know if this is the most approprate solution for you, but perhaps its a good place to start.
