why is referencing datasource inconsistent when compared to referencing test suite variable
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why is referencing datasource inconsistent when compared to referencing test suite variable
ok when I reference a datasource I need something like:
${USAirportRefData#country}
but when referencing test suite variable ${#TestSuite#timeZone2}
Many times I left # in front for data source and of course what do I get nothing!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the DataSource in your test case, the same test case as the request? That's why you don't need the extra #. It is required for the TestSuite level properties, since ReadyAPI has to know to go up a level.
Documentation for Property Expansion
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2. # is not required if you are referring to a name of Test step.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@nmrao: Doesn't 2 in your reply only apply to TestSteps at the same level as the test request? IE, they have to be in the same test case? That is an important distinction.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never remember using 2nd type.
Thumb rule, which I follow, each test case independent. So, the case you mentioned does not arise or I never used as mentioned.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So it's in the same test case as the request you are using, then the property expansion should always be ${DataSourceName#PropertyName}. If that's the case, are you saying you still get sometimes where that doesn't evaluate or returns a null/empty string?
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yup
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only time I've seen that is if my test case is not running the Data Source to load data. Did you try selecting the "Preload data if available" option on the Data Source?
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
