- In this Stop and Think, we ask you to think of all
the tests you could come up with for this story,
and where they might fit in the test automation pyramid.
So this story was, as Cindy, cat owner,
I can see available groomers for a particular time slot
to do a cat comb-out
so I can choose my preferred cat specialist.
Now one of the things we may need to do
is to make some assumptions about the story
just so we can go forward.
And so one of the assumptions we might make
is how long various things take, like the cat comb-out
takes 30 minutes.
- So you just...
You want to make a note of that
so that everybody has that in their mind.
- Right.
- So if we start thinking about the types of tests
we want to do.
Required fields, for example.
Maybe there, in the user interface, we're doing that.
So, maybe that's a required field test through the UI.
- That depends on where we have the logic
for those required tests.
Some people might have them at the unit level.
But, actually, I think for this application,
because we want to help the user get that instant response,
it doesn't-- - It might be up there.
- Yeah. - You may even need it
at both levels because you have validation here and here,
or the database--
- For example, in the database, we want to make sure
we don't try to put null values
into fields that can't be null.
So, I think that would definitely belong down here
in the unit level.
- So, we want to test that there's no groomers available,
or if there is groomers, that they're existing.
I think that they belong at the unit test level,
because I think that they can check that right away.
- My first instinct was the API,
but I think you're right.
I think the way that they're designing this architecture,
that will be possible at the unit level,
which we always want to push them down.
- We want to push them as low as we can.
- What about time format?
- Oh, that's definitely a unit test level, I would think.
- Whether we're gonna do 24-hour.
- Right. - Okay.
- I would definitely think.
Even if it was being done at the UI,
that's a unit test level.
If the time slot's not available,
booked by another user.
- (inhales sharply) Oh, that's almost
a concurrency problem, right? - Yeah.
Or it might be two types of tests.
One that says, "We can't book it,"
which would be at an API.
But there might be another one that says,
"Let's make sure it's grayed out or not available
"at the UI level."
- Right. - Possibly.
- That's something we'll probably want to do
exploratory testing around with concurrent users
doing, working on the same time slots.
- Yeah.
- What about just making sure we have the correct groomers
who are available listed out in the UI?
Where would you put that test?
- I might just do that as an exploratory test, actually.
- Oh, okay. - Because the groomers
might change.
And maybe I would do that, possibly.
- Okay.
It could also maybe be an API test,
if we have that data in the database.
- Possibly.
We want to make sure it works in all browsers.
So you can kind of automate that,
but it's kind of tricky, so I would think,
for us, that we would just want to look at it
as an exploratory test.
- Yeah, there are some services that we could buy
that would let us run those automated tests
in all browsers, but this is such a small application.
And the salon doesn't have a lot of money,
so let's just stick to exploratory testing.
And also, mobile browsers.
Because we want this to work in mobile browsers as well.
- Because people will definitely
be doing that on their phones.
- Right.
- And then, of course, we have our work flow,
which we want to probably do something
through the user interface, full work flow.
And we will supplement it with some exploratory tests.
- Yeah.
I would just want that to be a basic smoke test.
Like, mostly happy path things.
- Right.
- Absolutely.
- And similarly, I think maybe error handling,
as part of that, maybe we could test
some of the error handling.
Would you do that there?
- I would like to see it here or here,
but we may want to do a little bit of exploratory tests
just to make it showing up.
- You think we could do it at the API level?
- We might be able to do some through here
to automate this way.
- Okay.
- So, as you can tell, there is no one right way.
It's not magic.
The important part of it is having that discussion.
When you start talking with the programmers.
Where are we putting these tests?
Who's doing them?
That will start to gain trust in your automation as well.
- And help them design the code
so that we can do the tests at the appropriate level.
- Absolutely.
- Next, we're gonna talk about how to start.
Well, where to start, actually.
And then how we're gonna get there.