►
From YouTube: Multi-modal end-to-end test demo
Description
Demo of multi-modal test code. This demo shows how we can change out end-to-end tests to test both the API and UI in the same test file. This has the advantage of running faster and still gives us the flexibility to choose if we want to prioritize speed or to test the UI.
Link to issue: https://gitlab.com/gitlab-org/gitlab/-/issues/212390
Link to demo code: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27964/diffs
CORRECTION: it should be 'export ELASTIC_URL="http://localhost:9200"' at time index 2:40
A
A
A
You
can
confirm
that
it's
running
at
the
appropriate
location
by
just
hitting
localhost
9200.
The
next
thing
we'll
want
to
do
is
well
before
you
do
that
you'll
actually
want
to
make
sure
that
you
have
a
license
and
the
license.
So
here
I
already
have
one
installed.
Otherwise
you
won't
get
elasticsearch
okay,
so
we
have.
We
have
an
e
license.
We
have
elasticsearch
on
the
next
thing.
A
A
A
Okay,
we're
good
there,
let's
pop
over
to
the
code
for
a
second.
This
is
the
test
that
I've
changed.
I've
moved
it
to
a
place
called
multimodal
under
the
e
test,
and
this
is
advance
global,
advanced,
syntax
search,
spec,
really
what
we're
doing
I'll
just
jump
to
the
meat
of
the
test
here.
What
we're
doing
is
we're
using
search
to
find
a
project
with
this
string
and
we're
expecting
to
find
it
and
then
we're,
then
we're
going
to
search
in
the
project
description
and
we
expect
to
find
this
string
and
what
we're
doing
is
we're.
A
Checking
that
environment
variable
called
execute
test
by
API
and
if
we're
saying
execute
test
by
API
is
false,
then
we'll
use
the
UI
and
we'll
execute
this
to
search
by
the
UI.
If
it's
true,
then
we'll
execute
the
search
by
the
API,
so,
as
you
can
see
in
the
API
search,
we're
just
generating
an
API
call
and
verifying
that
the
JSON
body
matches
what
we
expect
and
when
we're
using
the
UI,
we're
actually
logging
in
and
clicking
buttons
and
searching
for
the
right
strings.
A
A
A
A
We
can
also
set
it
up
the
sched
we
can
set
up
the
schedules
so
that
for
every
mr,
for
example,
you
can
run
just
the
API
versions
of
these
tests
to
confirm
that
the
magic
behind
your
changes
is
working
correctly
and
then
on
a
nightly
schedule.
We
can
change
it
to
run
the
UI
and
therefore
check
off
the
UI
and
the
API
functionality
to
make
sure
they're
the
same
and
verify
that
they're
working
both
equally
well
with
the
changes
that
you've
made
so
yeah,
that's
my
demo.