in this tutorial I'm going to walk you through creating your first automated
test script using test complete the first thing that we need to do is create
our project and a project is just a collection of all of your test cases and
relevant artifacts so I'll click the Create new project button and now I get
to give my project a name and we'll call it my web project and then select next
and here I get to choose the type of application I would like to work with
as you can see testcomplete can create test cases for Windows desktop
applications and web and mobile applications as well for today we're
going to focus on functional testing of web pages and then I get into the
visualizer options and the visualizer is a feature of test complete that allows
us to capture screenshots of every test step while we're recording so I'll leave
these default settings on select next and then I get to the last step of
setting up our project which is choosing the scripting language now I'm not going
to be showing you anything that requires scripting today however if you are
interested in scripting your tests you can just choose the scripting language
that you're most comfortable with and for me that happens to be jscript
and now that I've selected that my test set is ready to begin and all I need to
do to record my new test is click the record new test button and you can see
the test completes going to minimize down and leave me with my recording
widget showing us that all of my actions are being recorded so at this point all
I need to do is navigate through my test case the same way I would with a manual
test now we're going to be doing a web application test today so I will open up
firefox and navigate out to where my login screen is and now i just need to
log in with my user credentials so I'll use my username of demo user and the
password of "pass123" and then click the login button and now that I'm
logged in what I would like to do is verify my users cash balance now to do
that we can add a check point check points are how testcomplete makes sure
that our application is behaving properly
and I can come up to my recording window expand my checkpoint drop down and now
you can see I have several different types of checkpoints to choose from I
could create a checkpoint to verify the contents of a database or make sure that
an image has loaded accurately or even that a table has all of the correct data
in it but what I'll do for today is create a property checkpoint which is
the most commonly used and allows us to verify any individual aspect of our
application and if I'm ever unsure of which checkpoint to use we do have a
checkpoint wizard which will guide you to the correct checkpoint based on what
you need so I'll select my property checkpoint and all I need to do for this
is drag my bullseye around the application and you can see that we're
highlighting all of the controls with a red rectangle so there's never any
confusion about which control we're working with so I'll hover over this
84,000 cash balance release the mouse button and then testcomplete's going to
gather up all of the information on this control for me now all I need to do is
click Next and I can see the properties associated with that text label and I
just want to look at the text property ensuring that my user has the 84,000
balance so I'll finish out my checkpoint and now I just need to log out and close
down Firefox so I'm going to click the log out button close out my browser and
then stop recording and as you can see I now have all of those actions that I
just performed in our keyword test mode now after I've recorded my test I can
easily go through and edit the test steps if I accidentally recorded
something or misclicked and you can see here that I have a test step where I was
tabbing in between my username and password field this isn't part of my
test case so I can right-click on that and select delete I can also see that
here I accidentally clicked on my webpage this is also not part of the
test it's just a potential failure point so I can remove these steps as well
makes our test cases that much more robust so now as you can see I've got a
cleaned-up test and I can run my test here and testcomplete's going to go back
through and playback all of the actions that I
just recorded so I'll click that run test button now and we can see that
Firefox is kicked off and I'm logging into my application verifying the
balance and then logging out and now that that's done we can see the step by
step actions that testcomplete took to execute the test in our keyword test log
the very first step being a launching Firefox and if I look in the information
pane at the bottom I can see the version of Firefox that we used as well as the
URL that we navigated to and then as I begin navigating through the test steps
you can see our visualizer screenshots now the screenshot on the Left was taken
at the time of test creation and the screenshot on the right was taken just
now when I played back the test so I can always compare my runtime images versus
the expected baseline and as you'll see while I progress through the test step
testcomplete is updating those screenshots and highlighting each
control with a red rectangle so as I'm trying to replicate my test following
through the log I know every step along the way what I should be performing now
if I ever want to see the corresponding test step I can double click on this log
item and that will highlight the corresponding test step in the test case
so that was recording a keyword test now if you are interested in scripting your
tests you don't have to script them manually from scratch you can record
your tests directly to script so if I come up to my recording window here I
can expand that and you can see we have the record script option now all of the
actions and functionality will be exactly the same as I just showed you
however instead of creating a keyword test we will record everything into the
scripting language that you've selected
so that is recording your first test case in testcomplete thank you for
viewing the video