►
From YouTube: MSI Open Demo. August 11, 2017
Description
Magento 2 Multi Source (Stock) Inventory open demo
How to Create WebAPI and How to Cover them with API Functional Tests
https://github.com/magento-engcom/magento2/wiki/How-to-create-Web-API-and-How-To-cover-them-with-Functional-Testing
A
Providing
append-only
reservation,
another
story
was
to
provide
a
new
indexing
for
inventory
and
create
a
new
virtual
aggregation
stock
items
based
on
a
linkage
rule
with
help
between
the
sources
and
stocks
and
the
last,
but
not
the
least
story
was
to
cover
Web
API
to
provide
the
Web
API
coverage
for
all
existing
test
coverage
for
existing
Web
API.
We
have
for
the
source,
a
stock
and
the
source
item
entities
we
already
have
up
and
running
in
a
net
inventory
project.
A
So
during
this
week
there
were
three
pork
with
request
created.
Each
of
this
pull
request.
Spec
belonged
to
each
of
the
story,
which
I
mentioned
the
ball
accordingly,
so
we
have
a
pull
request
from
the
reservation
API.
They
have
a
pull
request
for
the
indexation
of
the
source
and
stop
all
these
have
a,
and
we
have
a
pull
request
for
the
then
API.
A
A
So
we
described
that
in
magenta
to
edit
such
a
way
that
integration
with
the
Swaggart,
which
provides
an
ability
to
get
the
schema
of
all
the
REST
API.
We
have
so
it's
pretty
similar
to
what
I
do
the
video
documentation
in
in
fault
and
the
it's
pretty
pretty
pretty
useful
to
get
a
schema
and
using
the
swagger
UI
to
generate
all
the
of
the
web
api
isms
that
pay
laws
for
web
api
so
much
easier
to
develop
something
with
you.
A
So
also
here
we
describe
the
mapping
of
how
usually
that
API
are
deemed
ended
with
with
our
API
classes.
So,
for
example,
it's
pretty
pretty
typical
case
when
we
have
a
martin
between
the
repository
repository
methods,
so
I
get
sale,
delete
and
get
list
due
to
some
roads
for
some
particular
entity.
So
in
this
example,
we
give
an
example
for
the
stock
entities.
So
here
is
the
listing
of
the
valve
API.
We
provide
for
the
stock
entities,
so
the
stock
is
actually
the
build
shoulder
present,
the
virtual
aggregation
of
all
the
physical
sources.
A
A
Creating
this
token
actual
updating
this
talk
and
removing
the
stock.
So
here
it
actually
describes
the
basical
declaration
and
from
wicked
consist
of
and
like
after
after
providing
an
integration
and
after
making
an
integration
in
the
magenta
admin
panel,
it
became
possible
to
make
to
make
very
clear
request,
for
example,
with
the
cool
r2
Genta
and
get,
for
example,
stopped
by
ID,
like
in
this
example,
and.
A
A
A
A
Here
we
describe
the
best
practices
how's
that
Web
API
test
coverage
should
be
written
and
because
the
Web
API
test
coverage
is
pretty
similar
to
what
we
have
for
the
integration
test,
coverage
and
actually
Web
API
framework.
The
very
Web
API
testing
framework
is
pretty
could
be
considered
as
an
extension
of
the
integration
testing
framework.
It's
only
different
that
we
have
another
annotation
from
for
the
magenta
Dec
6
2016.
A
Bration
testing
framework
we
can
apply
also
all
the
features
in
the
scope
of
the
single
transaction
and
the
after.
After
test
has
finished,
we
could
roll
back
all
the
changes
which
were
made
in
the
scope
of
the
test
regarding
the
Web
API
framework.
We
can
do
this
because
each
of
each
test
could
be
considered
as
an
independent,
the
babyĆs
call,
so
we
don't
have
an
ability
to
influence
the
transaction
and
roll
back
the
transaction.
A
A
So
here
you
can
also
pay
attention
that,
because
the
API
tests
are
tests
which
cover
cover
api's
but
not
a
precise
implementation,
that's
why
we
decided
to
put
all
the
big
pipe
Web
API
test
coverage
to
the
module
which
provides
the
API.
So
probably,
as
you
already
know,
know,
we
have
two
modules
for
the
inventory
functionality.
The
first
one
provides
the
traffic
contracts.
Just
the
API
for
the
inventory
and
another
module
provides
implementation.
That's
right!
A
That's
why
we
have
two
modules,
inventor,
API
and
inventor,
so
because
the
B
API
test
cover
with
the
provided
test
coverage
for
the
API,
but
not
for
the
precise
implementation.
We
decided
to
put
all
the
test
object.
The
inventory
API
modules
because
we
know
need
with
we-
don't
need
nothing
about
the
implementation.
So
we
assume
that
this
set
should
work
even,
for
example,
the
database
adapter
would
be
changed.
A
A
With
an
example,
so
because
it's
an
update,
we
need
to
have
already
an
entity
in
our
in
our
system
to
help
that
entity.
We
use
a
picture,
and
actually
here
you
can
see
the
TGA
which
create
that
entity,
so
the
group
process
and
prepare
the
system
for
the
purposes
which
for
the
condition
which
could
be
tested
by
our
tests.
So
here
you
see
this
fixture,
which
is
also
stored
in
the
inventory
API
module.
A
Simple
and
it
create
a
stock
here
we
want
also
to
underline
that
you
know
need
to
introduce
your
own
pictures
like
your
pictures
for
that
API
test
you'd.
Only
because
this
feature
features
between
integration
framework
and
the
API
framework
are
should
be
reusable
because
actually
they
do
the
same.
So
it's
better
to
follow
the
DRI
principle
and
not
to
duplicate
the
features
between
integrational
test
and
the
web
api
later.
But
for
now
we
don't
have
lot
of
integration
all
tests.
That's
why
we
putted
to
to
the
to
the
functional
API
test.
A
That's
the
reason,
but
if
you
have
both
tested
integration
functional,
we
recommend
you
to
self
the
only
place
where
you
store
all
your
pictures.
So-
and
here
you
see
the
rollback
which
clean
out
the
state
of
the
ear
test
has
been
run
and
finished.
So
the
idea
of
test
that,
after
justification,
it
should
leave
the
state
the
same
as
before,
test
execution.
A
That's
why
we
have
this
stock
rollback
picture
which
just
clean
out
the
stock
which
was
pre
created
for
the
updated
and
also
is
pretty
important
here
to
say
that,
following
the
best
processes,
we
recommend
you
not
to
recommend
you
or
recreate
your
entities
using
the
API
call.
So,
for
example,
if
you
want
to
to
save
do
to
test
your
safe
method,
you
need
to
make
it
with
the
get
with
a
damn
s,
because,
for
example,
here
you
can
see
the
example
of
the
fragile
test
which
makes
the
very
vehicle
for
getting
entities.
A
And,
after
that,
using
repository,
it
checks
the
the
current
behavior.
So
such
kind
of
steps
are
making
an
assumption
that
with
API
call
some
a
to
the
same
host
where
test
a
host.
So
it
could
be
true,
but
it
can
some
particular
condition.
It
could
be
not
true,
so
you
don't
need
to
make
an
assumption
that
actually,
your
environment,
where
Iran
test
is
the
same
environment.
A
Well,
actually
phobic
a
Web
API
poll
will
come.
So
you
need
to
make
all
the
tests
like
using
the
remote
connection,
so
that
will
provide
more
honest
environment
and
more
honest.
You
skating
and
now
Valera
I
will
give
the
word
to
you,
so
you
can
share
your
screen
and
stop
sharing
my
screen
and
you
can
show
there
is
also
the
story
of
how
actually
the
web
api
test
off
on
your.
B
This
we
are,
we
have
voltage,
we
shall
work
with
a
great
vehicle,
and
now
we
have
such
a
free
and
its
test.
Number
higher
knowledge
also
pay
attention.
How
truly
split
our
test
in
several
file?
We
have
separate
scenarios
for
tyranny
management
management.
We
sell
separate
parts
of
validation
for
the
jumper,
so
now
we
have
several
other
people's.
We
have
a
small
issue
with
the
soul
and
not
regions,
I
think.
B
B
B
B
Whose
relation
we
reused,
you
will
be
involved
in
when
we
say
we
are
control
when
we
arrested
the
pasta,
consolidation
in
service
we're.
In
now
we
have
44
3
tested
and
how
a
sage
leaf
fell
off
several
skip
health
and
he
fixes
it
today
and
I.
Think
I
will
mesh.
We
start
to
their
day,
leaving
it
off
tomorrow,
Monday
Monday
morning
in.
A
We
have
a
technical
design
for
reservation
which
could
be
found
here
on
a
reservation
page
here
we
have
here.
We
have
braking
system
discussion
with
a
responder
Guardian,
so
he
provided
the
basic
implementation
preservation
and
we
had
pretty
interesting
conversation
in
the
scope
of
his
paw
request.
Whether
reservations
should
be
positive
values
on
negative
as
well
and
we
decided
it
was.
It
was
I
believe.
D
A
Yeah
it's
here,
so
we
have
this
conversation
here.
There
are
reservations
that
the
negative
or
could
be
negative
or
just
positive,
so
we
decided,
in
a
sake
of
performance,
make
it
both
negative
and
positive
and
yeah,
and
because
that
will
help
us
to
to
calculate
the
reservation,
count
in
a
single
query.
So
actually
that
pull
request
still
work
is
still
in
progress
and
Alessandra
promised
to
make
an
update
in
the
nearest
time.