Hello everyone! I have an interface that depends o...
# general
y
Hello everyone! I have an interface that depends on an external third-party API. • Its interface
/api_a
is related to time. After a certain time, it will return a different format. • Its interface
/api_b
is related to the number of requests. With the same request parameters, it will return a different format only on the second request. How should I comprehensively test these two situations for these two interfaces?
m
Use provider states if the shape of the payload is different. e.g. for
/api_a
-
GIVEN the request is made < time x
and
GIVEN the request is made > time x
for
/api_b
-
GIVEN the number of requests > x
and so on
y
thanks, I will check the provider states