课程: API Test Automation with SoapUI
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Using dynamic properties
- [Narrator] I want to talk about one more powerful concept that we have in SoapUI with properties. This is called dynamic properties. So I've set a request up here that uses the world population API, and it will get us the life expectancy of a male Canadian at a certain date that is a certain age. So, I've hard-coded a date here to January 1st 2019, but what if we wanted to get it for today's date. So every time we run this, we want it to use the current date, and not this hard-coded date. So let's take a look at how we can do that with dynamic properties. So, the first thing we'll do here is just generate a test suite. Okay, so, we've got a test case here, let's open that up and we have today's date. So instead of using this hard-coded value, we need to somehow generate a value that is today's date every time we run it. So we can do that with this familiar dollar syntax to start it, we'll put two brackets and then inside of this brackets if we start with an equal sign, that tells…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。