📺 Develpreneur YouTube Episode

Video + transcript

Test Project 2.0 - Part 2

2022-02-24 •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]
okay jump back over to our test
some other things we have here in our
project we can look at our elements
so if we run a test it's going to keep
track of all the different fields that
we have inputs for so we have our
address here so if i click address and
edit so i have a field called address
the description is address input
we're looking it up by id
so
just like selenium just like traditional
web test we can do css selectors we can
do xpath lookups tag names link text
partial link test
id name and class name
and then over here we
can do if we're doing by id we just type
in the id if it's xpath has to be the
xpath so all this is pretty much what
we've seen before using traditional
record playback tools or if you're using
selenium or any type of web testing this
is pretty much identical
the trick here though is what this
element section
allows you to do
you can create folders and each folder
can be a particular page and therefore
you can start building your page objects
for each folder so if you had like a
root folder okay you start with home
if you go to the next one you would
select that one
like log in contact us and so on
so you have address it tells you the
type
button see here's the next path
so xpath you type in the xpath
you also can tell what type
it is header
abbreviation access key acronym
address so this is pretty neat
you can add some additional types here
if you go back to my framework basically
i had types defined as any type of
web element that you could possibly have
they it's actually funny they actually
want the similar approach here within
their application
you can also select different types of
applications so if you create different
test suites each application will be
defined here by their url and by their
application name
if you want to create any data source
files to load you can add them here
and then we can also add any types of
parameters like if we have different
environment setups we can set them up
here
under project
we briefly looked at monitor so monitor
is kind of cool because it gives you an
execution history
of the jobs that you have run
you can actually schedule jobs to run so
if you want to have kick off a test
every day at six o'clock you can do that
here
your execution in progress so when the
job is running it is here the other
thing that's kind of interesting here is
we have a running tally so if this is an
enterprise suite and we have a whole
bunch of different tests and jobs
running we can monitor it from here
right at the top
you can also look and see what the
history is how many tested you run today
how many jobs how many agents are
currently active and then you can just
go into the history of each of these
tests for instance doctor who failed
here so if i go look at that one
100 percent failure
and if we dig into this guy a little bit
more
try to run it again nope doesn't want to
run
so if we go look at the full summary
report for this guy
we see that oh we tried to run it on
safari
as a standalone and it failed it didn't
even kick off so the problem here
is because of our security settings in
safari and if you've noticed i have not
gone into a single line of code this is
all one hundred percent codeless
you manage the entire project from your
test project
now if you do this from an offline
status yes you will have to deal with
some code some configuration setup but
the nice part is all this runs from the
command line agent
and use still have the same project
interface you still have the same
reporting the same monitoring you can do
this all offline
agents so if i click agents i can see
the different types of agents that are
running so right now i have an apple
agent
ready
and if i had like any disconnected
agents which i don't
it's interesting too because if i hover
over agent it tells you they have agents
for windows linux mac and docker
so again if you are running multiple
docker instances and you want to test
your products across different say
operating systems linux you can do all
that within docker
you can set up physical machines with
different agents all that can be set up
here
integrations so i again i'm not going to
get into mobile and i'm also not going
to get into too much of the command line
integrations or sdks today but they do
have a plethora of developer tools that
you can use
you can interface it through the api
there are web hooks cloud extensions
they have get integration as well q test
and additional developer add-on
speaking of add-ons so if we go here
there are community add-ons test project
add-ons you can actually create your own
add-ons what i like to hear those just
by looking at the community there are
some things that jumped out at me right
away first and foremost pdf actions so
that little utility file i had to write
for my framework to actually be able to
read pdfs interact with pdfs they
already have a plugin here they also
have one for mongodb they also have some
examples for using java i o
using excel so interfacing probably
using poi to interface with excel
documentations android monkey base 64
encoder this guy's useful especially if
you're doing any type of encryption so
they have a lot of
useful add-ons already available and out
of the box
like you can even pick the community oh
you know is there anything for apple
android or web so you can turn these on
and see which ones you want to find
and i'm not going to get too deep into
those today
all right so let's go out here and build
our first test so let's click new test
and we have some options we can do it by
code web or mobile so today we're going
to focus all on web
so we'll do next
and we'll just give this one a sample
name so test name here i want to hit my
doctor who website so doctor whose stuff
test
test website
flow
more descriptive the better and any tags
you want to put in as well doctor who
prom
wordpress
so on
next all right select the web
application
so we're going to do doctor who's stuff
now if you do not have your application
here already you can add another one so
let me back up for just a second here
close this
go back over here to applications
and let me delete the one i have so
let's do this cleanly
all right so new test again
web
next
doctor who
want to test the doctor who page
functionality and we'll just give it one
tag for now
wordpress wordpress
all right hit next
all right so now we want to select our
web applications well we currently don't
have it so we need to add a new one so
you add new you give it a name
and then you give it your url
and then you click done
then you select the application you want
hit next
now this is
interesting so we can record
or we can edit an existing test so for
now we're going to do a record
and here's what's really cool so with
version 2.0 we can also now save or
record directly to file so we can record
this and save it directly to our file
system
if we do that we then can upload it into
our interface when we're done
but for now we'll keep it simple we'll
do cloud
if you forget you can click the little
information icon here and it gives you a
quick overview of the difference between
the two so the file saves the test as a
yaml file on your machine with no
footprint
but if you can still upload it to the
cloud to get the full beauty access to
it
alright so we have cloud record start
recording
now if you remember the old selenium ide
tool
when you open up selenium ide it will
open up ask you for your url you want to
start with and then it starts the
browser and you have the recorder on the
side
same thing happens here so here we have
our test project recorder
and we have our website
if for some reason the recorder gets in
your way you can minimize it so you can
actually navigate through your website
so if i click latest news
there we go and i re-click the test
project to bring up the step so it
actually recorded my step
so we're going to give it the name click
which is the action
latest news which is the text of the
link i clicked link
it's going to have an action which is
click
and we click the element latest views
but because i do not have an id
this is a wordpress so it's generated it
had to use the xpath
now we can also look at some other
advanced options here so we can actually
add some criteria you know what to do if
the test fails so this is where some of
that self healing and ai components come
in so we can actually set it up to
handle different configurations
different things that happen if it fails
you know what do we want to take a
screenshot
so
you can blanketly set this up to default
to do something every time or you can
custom configure each step as to how
it's going to be handled when a test
step fails so that's kind of cool
some other things that are here within
the recorder you can go to parameters
so here you can pre-record a couple
different parameters if you have test
data you want to populate
you can look up a locator so you can go
css locator
you can do xpath tag name link text
partial link
same with selenium so this is pretty
much all the selenium logic pre-built
so like if i do
say link name and we'll say the value
what's the name of the one i click
latest
so we'll do the latest
and evaluate
and it looks within the page to see if
it can find what you're looking for
and if you can't find it you can click
highlight it will find it for you
as you move through your application you
see this little box pops up this is kind
of cool so i can click
the three dots when i'm on an element i
can check out the actions so
test project
works with angular so it handles the
drag and drop it will also clear
contents for you
and clear contents if visible
we can call the clear element key
we can click it we can click until gone
so all the different selenium actions
are available for this element
validations we also have all the
selenium validations as well does it
contain text is it clickable is it not
present is it present
is selected is visible
attributes again here's the interesting
part so if i hover over attributes for
this element it gives me the xpath it
gives me the text the tag name class
and item property
all these things that
typically when you're doing web-based
testing you have to go open up the the
developer console you have to go look at
the actual code you don't have to do
that anymore not unless you absolutely
want to
if you just want to record a quick test
this is an easy way to do it very clean
very easy and we can save the element if
we need it
the other thing too we have this little
hierarchy button here i can click that
and it gives me all the components
to get to this so if i want to
walk the chain i can go to the div and
it takes me to the top of the page and
then i can walk back down
you
Transcript Segments
0.48

[Music]

26.32

okay jump back over to our test

28.88

some other things we have here in our

30.48

project we can look at our elements

33.04

so if we run a test it's going to keep

35.84

track of all the different fields that

38.559

we have inputs for so we have our

40.879

address here so if i click address and

42.96

edit so i have a field called address

46.48

the description is address input

48.8

we're looking it up by id

51.6

so

52.64

just like selenium just like traditional

54.879

web test we can do css selectors we can

57.92

do xpath lookups tag names link text

60.8

partial link test

62.399

id name and class name

65.04

and then over here we

66.96

can do if we're doing by id we just type

69.04

in the id if it's xpath has to be the

71.439

xpath so all this is pretty much what

73.6

we've seen before using traditional

75.68

record playback tools or if you're using

78.56

selenium or any type of web testing this

80.72

is pretty much identical

83.119

the trick here though is what this

85.68

element section

87.2

allows you to do

88.56

you can create folders and each folder

92.159

can be a particular page and therefore

95.52

you can start building your page objects

97.84

for each folder so if you had like a

100.24

root folder okay you start with home

102.479

if you go to the next one you would

104.159

select that one

105.52

like log in contact us and so on

108.64

so you have address it tells you the

110.32

type

112.84

button see here's the next path

116.159

so xpath you type in the xpath

119.2

you also can tell what type

121.84

it is header

123.759

abbreviation access key acronym

126.84

address so this is pretty neat

129.679

you can add some additional types here

132.8

if you go back to my framework basically

135.92

i had types defined as any type of

139.36

web element that you could possibly have

141.44

they it's actually funny they actually

142.959

want the similar approach here within

145.76

their application

147.76

you can also select different types of

149.28

applications so if you create different

151.84

test suites each application will be

153.76

defined here by their url and by their

156.56

application name

159.2

if you want to create any data source

161.2

files to load you can add them here

164.48

and then we can also add any types of

166.48

parameters like if we have different

167.92

environment setups we can set them up

169.68

here

171.599

under project

173.04

we briefly looked at monitor so monitor

175.44

is kind of cool because it gives you an

177.599

execution history

179.28

of the jobs that you have run

181.28

you can actually schedule jobs to run so

183.84

if you want to have kick off a test

185.519

every day at six o'clock you can do that

187.44

here

188.48

your execution in progress so when the

190.4

job is running it is here the other

192.72

thing that's kind of interesting here is

194.879

we have a running tally so if this is an

197.76

enterprise suite and we have a whole

199.44

bunch of different tests and jobs

201.12

running we can monitor it from here

203.68

right at the top

204.959

you can also look and see what the

206.72

history is how many tested you run today

208.56

how many jobs how many agents are

210.72

currently active and then you can just

212.72

go into the history of each of these

214.319

tests for instance doctor who failed

216.159

here so if i go look at that one

219.2

100 percent failure

220.959

and if we dig into this guy a little bit

222.879

more

224.4

try to run it again nope doesn't want to

226.879

run

228.319

so if we go look at the full summary

230.72

report for this guy

232.64

we see that oh we tried to run it on

234.799

safari

236

as a standalone and it failed it didn't

239.2

even kick off so the problem here

242.159

is because of our security settings in

244.879

safari and if you've noticed i have not

247.599

gone into a single line of code this is

249.84

all one hundred percent codeless

253.2

you manage the entire project from your

256.72

test project

258

now if you do this from an offline

259.759

status yes you will have to deal with

261.68

some code some configuration setup but

264.24

the nice part is all this runs from the

266.96

command line agent

268.639

and use still have the same project

271.199

interface you still have the same

272.479

reporting the same monitoring you can do

274.639

this all offline

276.56

agents so if i click agents i can see

278.96

the different types of agents that are

280.479

running so right now i have an apple

282.4

agent

283.6

ready

284.72

and if i had like any disconnected

286.479

agents which i don't

288.24

it's interesting too because if i hover

289.919

over agent it tells you they have agents

292.32

for windows linux mac and docker

295.36

so again if you are running multiple

298.08

docker instances and you want to test

300

your products across different say

302.16

operating systems linux you can do all

304

that within docker

305.759

you can set up physical machines with

307.44

different agents all that can be set up

309.36

here

310.639

integrations so i again i'm not going to

313.28

get into mobile and i'm also not going

315.28

to get into too much of the command line

317.28

integrations or sdks today but they do

320.639

have a plethora of developer tools that

323.28

you can use

324.639

you can interface it through the api

326.8

there are web hooks cloud extensions

329.28

they have get integration as well q test

332.8

and additional developer add-on

335.6

speaking of add-ons so if we go here

337.84

there are community add-ons test project

340.24

add-ons you can actually create your own

342.88

add-ons what i like to hear those just

345.44

by looking at the community there are

347.199

some things that jumped out at me right

348.96

away first and foremost pdf actions so

352.88

that little utility file i had to write

354.8

for my framework to actually be able to

356.4

read pdfs interact with pdfs they

358.8

already have a plugin here they also

360.88

have one for mongodb they also have some

364.08

examples for using java i o

366.96

using excel so interfacing probably

369.6

using poi to interface with excel

372.24

documentations android monkey base 64

375.68

encoder this guy's useful especially if

378

you're doing any type of encryption so

380.479

they have a lot of

381.919

useful add-ons already available and out

385.199

of the box

387.12

like you can even pick the community oh

389.28

you know is there anything for apple

391.36

android or web so you can turn these on

394.08

and see which ones you want to find

396.72

and i'm not going to get too deep into

398.4

those today

401.199

all right so let's go out here and build

404.479

our first test so let's click new test

409.199

and we have some options we can do it by

411.599

code web or mobile so today we're going

414.639

to focus all on web

416.8

so we'll do next

418.4

and we'll just give this one a sample

420.16

name so test name here i want to hit my

422.4

doctor who website so doctor whose stuff

427.599

test

431.599

test website

433.599

flow

437.84

more descriptive the better and any tags

440.639

you want to put in as well doctor who

445.199

prom

449.28

wordpress

452

so on

454.479

next all right select the web

456.639

application

457.919

so we're going to do doctor who's stuff

462

now if you do not have your application

465.199

here already you can add another one so

468.8

let me back up for just a second here

471.039

close this

472.24

go back over here to applications

474.639

and let me delete the one i have so

476.879

let's do this cleanly

479.36

all right so new test again

481.199

web

482.16

next

484.08

doctor who

493.759

want to test the doctor who page

495.12

functionality and we'll just give it one

497.44

tag for now

498.72

wordpress wordpress

502.56

all right hit next

504.479

all right so now we want to select our

506.24

web applications well we currently don't

508.24

have it so we need to add a new one so

510.879

you add new you give it a name

514.959

and then you give it your url

518.479

and then you click done

521.76

then you select the application you want

524.24

hit next

525.6

now this is

527.44

interesting so we can record

530.08

or we can edit an existing test so for

532.399

now we're going to do a record

535.04

and here's what's really cool so with

537.2

version 2.0 we can also now save or

541.04

record directly to file so we can record

543.44

this and save it directly to our file

545.68

system

546.64

if we do that we then can upload it into

549.76

our interface when we're done

552

but for now we'll keep it simple we'll

553.6

do cloud

555.04

if you forget you can click the little

557.04

information icon here and it gives you a

559.839

quick overview of the difference between

561.68

the two so the file saves the test as a

564.32

yaml file on your machine with no

566.32

footprint

567.6

but if you can still upload it to the

569.519

cloud to get the full beauty access to

572.16

it

572.88

alright so we have cloud record start

575.2

recording

578.08

now if you remember the old selenium ide

580.959

tool

581.92

when you open up selenium ide it will

584.32

open up ask you for your url you want to

586.64

start with and then it starts the

588.64

browser and you have the recorder on the

590.56

side

591.68

same thing happens here so here we have

594.8

our test project recorder

598.32

and we have our website

600.16

if for some reason the recorder gets in

602.079

your way you can minimize it so you can

604.48

actually navigate through your website

608.079

so if i click latest news

611.36

there we go and i re-click the test

613.36

project to bring up the step so it

615.839

actually recorded my step

617.76

so we're going to give it the name click

620.399

which is the action

621.839

latest news which is the text of the

624.32

link i clicked link

627.2

it's going to have an action which is

629.36

click

630.32

and we click the element latest views

634

but because i do not have an id

636.48

this is a wordpress so it's generated it

638.72

had to use the xpath

640.88

now we can also look at some other

642.64

advanced options here so we can actually

645.519

add some criteria you know what to do if

648.16

the test fails so this is where some of

650.399

that self healing and ai components come

653.36

in so we can actually set it up to

655.6

handle different configurations

657.76

different things that happen if it fails

660.959

you know what do we want to take a

662.32

screenshot

664.72

so

665.519

you can blanketly set this up to default

667.92

to do something every time or you can

670.32

custom configure each step as to how

673.279

it's going to be handled when a test

675.36

step fails so that's kind of cool

678.56

some other things that are here within

680.399

the recorder you can go to parameters

683.36

so here you can pre-record a couple

685.92

different parameters if you have test

687.6

data you want to populate

689.76

you can look up a locator so you can go

692.56

css locator

694.399

you can do xpath tag name link text

697.04

partial link

698.959

same with selenium so this is pretty

701.279

much all the selenium logic pre-built

705.6

so like if i do

708.32

say link name and we'll say the value

711.36

what's the name of the one i click

712.639

latest

713.6

so we'll do the latest

716.079

and evaluate

717.68

and it looks within the page to see if

720.32

it can find what you're looking for

722.959

and if you can't find it you can click

724.639

highlight it will find it for you

726.959

as you move through your application you

729.279

see this little box pops up this is kind

731.519

of cool so i can click

734.48

the three dots when i'm on an element i

736.639

can check out the actions so

739.2

test project

740.639

works with angular so it handles the

742.399

drag and drop it will also clear

744.959

contents for you

746.72

and clear contents if visible

749.279

we can call the clear element key

752.24

we can click it we can click until gone

755.2

so all the different selenium actions

757.76

are available for this element

761.04

validations we also have all the

763.6

selenium validations as well does it

765.839

contain text is it clickable is it not

768.24

present is it present

770.24

is selected is visible

772.639

attributes again here's the interesting

775.04

part so if i hover over attributes for

777.2

this element it gives me the xpath it

779.76

gives me the text the tag name class

782.88

and item property

784.639

all these things that

786.56

typically when you're doing web-based

788.639

testing you have to go open up the the

791.68

developer console you have to go look at

793.6

the actual code you don't have to do

795.839

that anymore not unless you absolutely

797.68

want to

798.8

if you just want to record a quick test

801.04

this is an easy way to do it very clean

803.6

very easy and we can save the element if

806.399

we need it

807.6

the other thing too we have this little

809.519

hierarchy button here i can click that

812

and it gives me all the components

814.88

to get to this so if i want to

817.92

walk the chain i can go to the div and

820.72

it takes me to the top of the page and

822.639

then i can walk back down

839.519

you