📺 Develpreneur YouTube Episode

Video + transcript

Test Project 2.0 - Part 3

2022-03-01 •Youtube

Detailed Notes

Welcome, if you are a tester or developer interested in automation testing or are new to test automation tools than you defiantly need to check out TestProject. However, if you are not familiar with this tool that's OK. In Test Project A Review of Version 2.0 we cover all the new features in Test Project 2.0 as well as walk you through using the tool to setup your first test.

Test Project A Review of Version 2.0 Overview:

What is Test Project What's new in Version 2 Overview of the tool Creating your first test case What is Test Project?

TestProject is a community driven tool and has a free forever plan that is fully featured and that you can get started with in moments. In addition they have a lot of documentation that will help you with all the details you need to use TestProject to create effective test automation that your whole team can use. What Makes Test Project Unique?

First of its kind community powered test automation framework. Second its 100% free test automation development framework designed for agile teams! Advanced built-in recording capabilities AI-Powered self healing technology built in. It seamlessly supports iFrames, Popups and Dynamic Elements. With built in Adaptive-wait technology it automatically handles deviations in web application loading times. Also supports both hybrid cloud and completely offline modes Has a CLI Agent. Finally, it's free forever for anyone to use. Start with a new account:

Create a new account or connect to an existing google or microsoft account.

Install & Register

First start by downloading the TestProject tool. Then, install the TestProject tool on your machine. Finally, make sure the tool is up and running. Make sure your os security settings allow test agent to access your machine

Additional Resources

Hybrid Cloud and Offline Mode https://docs.testproject.io/getting-started/hybrid-cloud-and-offline-mode Understanding Test Files https://docs.testproject.io/getting-started/hybrid-cloud-and-offline-mode/understanding-test-files Using AI to Improve Testing https://docs.testproject.io/getting-started/using-ai-to-improve-testing Finally, this series comes from our mentoring/mastermind classes. These classes are virtual meetings that focus on how to improve our technical skills and build our businesses. After all the goals of each member vary. However, this diversity makes for great discussions and a ton of educational value every time we meet. We hope you enjoy viewing this series as much as we enjoy creating it. As always, this may not be all new to you, but we hope it helps you be a better developer.

Transcript Text
[Music]
the other thing is you have this
explorer tab now the explorer tab
basically takes
all that ugly html code source code that
is behind the scenes behind the building
of this web page that in order to
traverse this in the past again we'd
have to open up the browser developer
console well here it's all cleanly
visible in a nice easy to read tree
structure and as you walk down and hover
over each of these elements you get the
full information all in one place
there's the full xpath here's the text
here's the technique here's the atra
no more guessing
yep you know no more having to go figure
out how all this works you can now just
click and have everything in one place
you don't have to go guess you don't
have to go look you don't have to go do
the xpath lookup now if you don't like
the full xpath you can always tweak it
by using the locator here
so say for instance we wanted this one
here
i could take
this xpath
oh here's the other thing that's
interesting so it let me
click over here for a moment if i hover
over the image if i go look at the three
dots again it tells me that this is an
image tag it now slightly changes
my actions that i can
can do on the image tag to
mostly what are image related actions
validations same validations these
really don't change these are kind of
default validations that can apply to
almost any web element
uh your attributes so here's our
attributes here as well
so i can copy this i can highlight and
copy it or i can click here
to save the element i can copy the
clipboard or i can target and if i
target
it takes me straight to the locator this
is what i was trying to show you so if
we hover over the image
go to the three dots
go to attributes
go to xpath
or id
but if you click this little target it
takes us to the locator so in here i can
actually manipulate the xpath real time
now so say i just wanted any image on
the page
so i could do star
slash image and if i evaluate it's going
to return me all the images
so this is a very quick and clean way to
also do all your xpath lookups for your
tests
again we don't have to go look at that
nasty console anymore so if i actually
wanted to view the console
so this was the old way of doing it we
would have to come in here we would have
to look at the dom
we would have to then hit ctrl f then
we'd have to come in here and do all
this inside of here
and maybe get what we need we would also
have to right click on the attribute or
on the element we would have to come
down here to copy
all this goes away all this is handled
within the record which is very cool
very powerful
all right let me click a few more things
so that we have a test so if i go here
go to a blog
so we'll just click around a little bit
go to toys
risk
and now let's leave the site so if i
click this link it should take me over
to amazon
so now i'm on amazon so here's the cool
part it is still recording our tests so
there's our little icon so if i click my
icon
it actually navigated and handled the
switch to the new window
so if i actually stop the test right
here or actually let me go back over so
now if i actually click back it showed
that i switched back to windows 0
yes i closed it so it even catches
closing of the tabs
this is very cool
otherwise you'd have to loop through the
windows keep track of everything all
this is handled here for you
and then let me pause it alright so i
now have my test
so i can also add steps manually
so you can add an alert add a cookie
base64 encoding you can do a whole
basically anything you want to do with
selenium or within a recorded step you
can do here
all right so say we want to test this so
let's hit
run so it's going to reset
my browser to doctorhood.com
and then as you can see
briefly down in the window it's going a
little quickly but it is showing you the
steps that it's doing as it's clicking
through the site
now that is something that is kind of
missing from the selenium id when it
runs you kind of have to watch over in
the test
this is kind of cool here
so
element step 9 is missing does not match
don't worry test project ai is looking
for another path so
if it can't find toys because remember
twice was hidden
it just built that ai to go click
catalog to open up toys so that it could
go the toys so it automatically fix the
test for you
and then when you're done it says hey
what you did before didn't quite work
the second time through so instead we
reworked your test with this xpath to
the actual element that you want
and if this is good click confirm if not
click cancel and go back and fix the
test yourself so you can click confirm
and we now have our test so if i close
my browser
i go back over here to my other browser
window and here is our doctor who test
so we can edit our test information here
we can run it we can delete it
or
we could move it to a folder we could
share this test with anyone
we can duplicate the test
we can save it to file we can get csv
parameters
generate code
so
oh i did not talk about this yet so one
beautiful thing about test project is
not only can you record your tests but
you can also export your test type to
any of these three languages it supports
java c-sharp and python it also supports
selenium open sdk
and so you can select selenium you can
select test project
and
you can also select the browser and then
so my first project hit download
so it generated the code
save
zip file showing
here
and here's our source
generated test my first project
so we have a generated utilities and a
generated dr who's
let me open up this guy
and if you're familiar with selenium it
looks pretty close to a typical selenium
test
so here we are
let's see driver.manage timeout so here
we're setting our timeouts driver
is instantiated in the
setup so we're using remote webdriver
we're setting the options to chrome
so typically what you would see in a
normal selenium test
but up until this point we haven't even
had to touch the code at all
all this was just done from within test
project
so if i want to go in and actually run
the test i can run the test
other thing too so we can go look at our
reports we can see okay i ran doctor
who's stuff
sorry we ran my first test first we have
not run doctor who stuff yet
because i ran it from within the test it
wasn't saved but now if i go look here
okay here's my old test
yes so this was the test that was run
this morning so now
if i go back over to my project
and i want to say run this
test so let's do
chrome headless
and let's do firefox headless
do next
that's fine
let's run these in parallel
run
now let's go look at monitor
so you see we're now running chrome or
it's preparing the test but it's going
to run chrome and firefox okay it's done
preparing
so it's kicked off chrome chrome is
running
firefox might fail i might not have that
configured yet
so if you click the little hierarchy
here it will show you what's executing
and i think the reason it's not running
in parallel is because i only have one
agent running if i install multiple
agents it probably would run multiple
agents
yep so ideally i think the reason these
did not run multi-threaded
or simultaneously is because i only have
the one agent running so if i install
multiple agents
it can probably run as many browser
stacks as you have agents
finish
also while that's running you can see up
here at the top
we're currently running one test zero
jobs
two tests running we have one agent
online
and now the test is done
so it's going to clean up
so now we can go look at our reports
there we go doctor who
100
no failures
we can walk into that
past
i want to expand it out
there we go so now more detailed view so
from the high level view
it just gives you the summary
if you want a more detailed view you go
into the report
and then here's the details and here's
the steps that were run
if it failed you could click show me
just the failed test and it will show
you the lines that failed
it tried to run them in parallel uh did
not work because i did not have enough
agents but it also tells you hey
you had 100 test passage for chrome and
100 test passage for firefox
so that is test project in a nutshell
does anyone have any questions on the
test project application or even test
project as a whole
can these numbers be used to determine
pretty much the performance of
the software or the website because i'm
seeing good numbers there
this is primarily for your functional
tests of your system
if you want to do a performance type
testing you're still going to have to do
some type of load ui or load testing of
the application for performance
i have not gotten into anything specific
with them but i have not seen anything
in their documentation referring to
performance testing
yeah because i was looking at the
numbers and i was like um
so if it runs slow that we need to also
record that like for instance if you're
getting um
maybe the response back from uh hitting
the server maybe opening up a web
browser or something like will this tool
be able to record that
yes well oh and that was one little
piece i did not show
so if we jump back over here for a
second
new questions would help
so if we go back into our project
and we go into our test
if you click the little test tab here
here is your execution speed so by
default it has a normal but it has
what's called this adaptive weight so
you can have it be very minimal so like
hey we expect this to run quickly
it may take a little bit longer so you
can slip switch it over to patient or
very patient for long delays
and what this does is
it starts to record that it will start
thinking about okay how long is it
taking to run your test
and if you have to constantly run it
over here there might be a performance
issue with your application
like i said
i have not seen anything specific in
test project yet that handles
performance testing this is primarily
for functional testing
okay gotcha okay thank you yeah
no it's just been looking at the numbers
that's why
yeah but that's the beauty of it so the
reports do give you at least some high
level of time it takes to run a test
okay and then like as you run it it says
oh okay you had 33 failure 67 failure
so no failures on this one it ran once
total time run so if you start seeing
this time go up over time then you know
you might have an issue
like to thank you all for your time
today if you'd like to discuss any of
these topics further be it testing be a
development or even you know job related
questions please reach out to us you can
find us on info development dot com
or go to our website developernerd.com
contact us you can also find our videos
on youtube and vimeo
vimeo we're at vimeo.com developernerd
and if you go to youtube and search for
developer in the search you'll find our
videos
our goal is making every developer
better thank you have a wonderful day
[Music]
you
Transcript Segments
0.48

[Music]

26.56

the other thing is you have this

28.32

explorer tab now the explorer tab

31.279

basically takes

32.559

all that ugly html code source code that

36.32

is behind the scenes behind the building

38.48

of this web page that in order to

41.04

traverse this in the past again we'd

43.12

have to open up the browser developer

44.879

console well here it's all cleanly

47.84

visible in a nice easy to read tree

50.96

structure and as you walk down and hover

53.76

over each of these elements you get the

56.64

full information all in one place

58.8

there's the full xpath here's the text

61.28

here's the technique here's the atra

63.92

no more guessing

65.76

yep you know no more having to go figure

68.08

out how all this works you can now just

70.4

click and have everything in one place

72.479

you don't have to go guess you don't

74.24

have to go look you don't have to go do

75.92

the xpath lookup now if you don't like

78.24

the full xpath you can always tweak it

80.32

by using the locator here

82.32

so say for instance we wanted this one

84.72

here

85.68

i could take

87.04

this xpath

89.759

oh here's the other thing that's

90.96

interesting so it let me

93.92

click over here for a moment if i hover

95.92

over the image if i go look at the three

98.96

dots again it tells me that this is an

101.759

image tag it now slightly changes

105.2

my actions that i can

107.36

can do on the image tag to

110.079

mostly what are image related actions

114.72

validations same validations these

116.96

really don't change these are kind of

118.799

default validations that can apply to

120.799

almost any web element

122.56

uh your attributes so here's our

124.399

attributes here as well

126.24

so i can copy this i can highlight and

129.039

copy it or i can click here

131.52

to save the element i can copy the

134

clipboard or i can target and if i

136.56

target

138.319

it takes me straight to the locator this

140.56

is what i was trying to show you so if

142.4

we hover over the image

144.56

go to the three dots

146.56

go to attributes

148.72

go to xpath

150.48

or id

151.68

but if you click this little target it

153.84

takes us to the locator so in here i can

156.64

actually manipulate the xpath real time

159.36

now so say i just wanted any image on

162.64

the page

164.4

so i could do star

166.879

slash image and if i evaluate it's going

170.16

to return me all the images

172.64

so this is a very quick and clean way to

174.959

also do all your xpath lookups for your

178.239

tests

180

again we don't have to go look at that

182.08

nasty console anymore so if i actually

184.8

wanted to view the console

187.36

so this was the old way of doing it we

188.959

would have to come in here we would have

190.48

to look at the dom

192.64

we would have to then hit ctrl f then

195.28

we'd have to come in here and do all

197.36

this inside of here

199.76

and maybe get what we need we would also

202.239

have to right click on the attribute or

204.72

on the element we would have to come

206

down here to copy

207.68

all this goes away all this is handled

209.76

within the record which is very cool

211.599

very powerful

213.519

all right let me click a few more things

215.36

so that we have a test so if i go here

219.2

go to a blog

222.08

so we'll just click around a little bit

223.84

go to toys

226.239

risk

227.599

and now let's leave the site so if i

230

click this link it should take me over

231.519

to amazon

232.72

so now i'm on amazon so here's the cool

235.84

part it is still recording our tests so

238.799

there's our little icon so if i click my

241.04

icon

242.64

it actually navigated and handled the

245.36

switch to the new window

248

so if i actually stop the test right

250

here or actually let me go back over so

252.48

now if i actually click back it showed

254.56

that i switched back to windows 0

257.12

yes i closed it so it even catches

260.16

closing of the tabs

262

this is very cool

264

otherwise you'd have to loop through the

265.759

windows keep track of everything all

267.84

this is handled here for you

270.08

and then let me pause it alright so i

272.4

now have my test

275.52

so i can also add steps manually

278.8

so you can add an alert add a cookie

282.72

base64 encoding you can do a whole

285.199

basically anything you want to do with

286.72

selenium or within a recorded step you

288.72

can do here

291.28

all right so say we want to test this so

293.919

let's hit

294.84

run so it's going to reset

298.08

my browser to doctorhood.com

300.639

and then as you can see

302.16

briefly down in the window it's going a

303.52

little quickly but it is showing you the

305.68

steps that it's doing as it's clicking

307.52

through the site

311.759

now that is something that is kind of

313.84

missing from the selenium id when it

316.4

runs you kind of have to watch over in

318

the test

319.12

this is kind of cool here

321.12

so

321.919

element step 9 is missing does not match

324.24

don't worry test project ai is looking

326

for another path so

328

if it can't find toys because remember

330.4

twice was hidden

332

it just built that ai to go click

334.56

catalog to open up toys so that it could

337.12

go the toys so it automatically fix the

339.68

test for you

340.88

and then when you're done it says hey

343.44

what you did before didn't quite work

345.44

the second time through so instead we

348.32

reworked your test with this xpath to

350.88

the actual element that you want

352.96

and if this is good click confirm if not

355.68

click cancel and go back and fix the

357.36

test yourself so you can click confirm

360.88

and we now have our test so if i close

363.52

my browser

365.199

i go back over here to my other browser

368.319

window and here is our doctor who test

371.919

so we can edit our test information here

374.319

we can run it we can delete it

377.199

or

378.24

we could move it to a folder we could

380.639

share this test with anyone

382.8

we can duplicate the test

384.96

we can save it to file we can get csv

388

parameters

389.44

generate code

392

so

393.199

oh i did not talk about this yet so one

397.12

beautiful thing about test project is

400.08

not only can you record your tests but

402.8

you can also export your test type to

405.28

any of these three languages it supports

407.919

java c-sharp and python it also supports

412

selenium open sdk

414.16

and so you can select selenium you can

416.639

select test project

418.479

and

419.44

you can also select the browser and then

422.72

so my first project hit download

426.479

so it generated the code

428.72

save

430.4

zip file showing

432.4

here

433.759

and here's our source

437.199

generated test my first project

439.68

so we have a generated utilities and a

442.24

generated dr who's

444.319

let me open up this guy

447.28

and if you're familiar with selenium it

449.36

looks pretty close to a typical selenium

452

test

453.36

so here we are

454.8

let's see driver.manage timeout so here

457.039

we're setting our timeouts driver

460

is instantiated in the

462.72

setup so we're using remote webdriver

465.44

we're setting the options to chrome

468.16

so typically what you would see in a

469.759

normal selenium test

471.759

but up until this point we haven't even

474.4

had to touch the code at all

477.039

all this was just done from within test

480.08

project

482.4

so if i want to go in and actually run

484.4

the test i can run the test

487.199

other thing too so we can go look at our

489.919

reports we can see okay i ran doctor

492.8

who's stuff

494.639

sorry we ran my first test first we have

497.759

not run doctor who stuff yet

500

because i ran it from within the test it

502.24

wasn't saved but now if i go look here

506.319

okay here's my old test

510.08

yes so this was the test that was run

511.759

this morning so now

513.839

if i go back over to my project

516.719

and i want to say run this

518.839

test so let's do

521.2

chrome headless

524.72

and let's do firefox headless

528.48

do next

531.6

that's fine

533.76

let's run these in parallel

537.36

run

538.72

now let's go look at monitor

542.399

so you see we're now running chrome or

544.48

it's preparing the test but it's going

545.839

to run chrome and firefox okay it's done

549.2

preparing

550.72

so it's kicked off chrome chrome is

552.8

running

554.08

firefox might fail i might not have that

556.64

configured yet

558.72

so if you click the little hierarchy

560.399

here it will show you what's executing

562.88

and i think the reason it's not running

564.399

in parallel is because i only have one

566.08

agent running if i install multiple

568.08

agents it probably would run multiple

570.72

agents

572.88

yep so ideally i think the reason these

574.88

did not run multi-threaded

576.88

or simultaneously is because i only have

579.2

the one agent running so if i install

581.6

multiple agents

583.2

it can probably run as many browser

586.24

stacks as you have agents

589.519

finish

591.04

also while that's running you can see up

592.72

here at the top

594

we're currently running one test zero

596.16

jobs

597.68

two tests running we have one agent

599.519

online

601.04

and now the test is done

602.88

so it's going to clean up

604.959

so now we can go look at our reports

608.079

there we go doctor who

610.32

100

611.279

no failures

613.12

we can walk into that

615.36

past

616.72

i want to expand it out

619.36

there we go so now more detailed view so

622.72

from the high level view

625.76

it just gives you the summary

628.32

if you want a more detailed view you go

630.72

into the report

633.2

and then here's the details and here's

635.36

the steps that were run

638

if it failed you could click show me

640.64

just the failed test and it will show

642.32

you the lines that failed

644.48

it tried to run them in parallel uh did

646.88

not work because i did not have enough

648.32

agents but it also tells you hey

651.12

you had 100 test passage for chrome and

653.839

100 test passage for firefox

657.839

so that is test project in a nutshell

661.519

does anyone have any questions on the

664.72

test project application or even test

667.279

project as a whole

669.76

can these numbers be used to determine

672.32

pretty much the performance of

674.399

the software or the website because i'm

676.959

seeing good numbers there

678.959

this is primarily for your functional

681.279

tests of your system

683.6

if you want to do a performance type

685.44

testing you're still going to have to do

687.2

some type of load ui or load testing of

690

the application for performance

692.32

i have not gotten into anything specific

694.72

with them but i have not seen anything

696.64

in their documentation referring to

698.56

performance testing

700.56

yeah because i was looking at the

701.68

numbers and i was like um

703.279

so if it runs slow that we need to also

705.76

record that like for instance if you're

707.279

getting um

708.8

maybe the response back from uh hitting

711.36

the server maybe opening up a web

713.44

browser or something like will this tool

715.519

be able to record that

717.36

yes well oh and that was one little

719.2

piece i did not show

721.12

so if we jump back over here for a

723.76

second

725.04

new questions would help

726.56

so if we go back into our project

728.72

and we go into our test

731.68

if you click the little test tab here

734.32

here is your execution speed so by

736.8

default it has a normal but it has

739.12

what's called this adaptive weight so

741.44

you can have it be very minimal so like

743.92

hey we expect this to run quickly

746.639

it may take a little bit longer so you

748.56

can slip switch it over to patient or

750.72

very patient for long delays

753.36

and what this does is

755.6

it starts to record that it will start

757.839

thinking about okay how long is it

760.079

taking to run your test

761.839

and if you have to constantly run it

764

over here there might be a performance

766.48

issue with your application

768.399

like i said

769.92

i have not seen anything specific in

772.32

test project yet that handles

774.32

performance testing this is primarily

776.399

for functional testing

778.56

okay gotcha okay thank you yeah

781.04

no it's just been looking at the numbers

782.639

that's why

784.24

yeah but that's the beauty of it so the

785.839

reports do give you at least some high

788.399

level of time it takes to run a test

790.88

okay and then like as you run it it says

793.36

oh okay you had 33 failure 67 failure

798.48

so no failures on this one it ran once

800.56

total time run so if you start seeing

802.16

this time go up over time then you know

804.959

you might have an issue

807.44

like to thank you all for your time

808.8

today if you'd like to discuss any of

811.04

these topics further be it testing be a

813.519

development or even you know job related

816.639

questions please reach out to us you can

818.639

find us on info development dot com

821.6

or go to our website developernerd.com

824.079

contact us you can also find our videos

826.8

on youtube and vimeo

828.8

vimeo we're at vimeo.com developernerd

831.76

and if you go to youtube and search for

834.639

developer in the search you'll find our

836.639

videos

837.76

our goal is making every developer

839.44

better thank you have a wonderful day

844.21

[Music]

858.8

you