Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Writing application code is just part of the software development life cycle. Testing and Maintenance are two phases that can be very daunting without the proper tools. This course will give you an introduction to an industry standard tool that can help you test and maintain your software over time.
Further Reading
Recommended Course Prerequisites
[MUSIC]
0:00
Hi, I'm Craig, and I'm a developer.
0:04
In this course,
0:06
we're gonna explore the wonderful
world of a web browser automation.
0:07
If you don't know what that means yet,
you're in the right place.
0:11
We'll start from the very beginning and
work our way into a hands-on
0:13
specific use case using a powerful
automation framework known as Selenium.
0:16
But before we get started,
let's take a minute for
0:21
you to get familiar with
your learning environment.
0:24
First, there are speed controls
in the video player, so
0:25
you can feel free to slow me down or
speed me up and I won't mind at all.
0:29
Attached to each video,
there are teacher's notes.
0:33
We'll use this space to share
additional information with you.
0:35
Now, I'll do my best to let you know when
I've added some information on there.
0:38
But, trying to get in a habit of
checking the notes on each video.
0:41
There are lots of great
resources tucked away in there.
0:44
And finally, don't forget,
you aren't alone.
0:47
Many other students
are taking this course and
0:49
might be wondering the same
thing that you are.
0:51
Make sure you check out
the community forum and
0:53
ask a question when you have one.
0:55
The Treehouse community is very welcoming.
0:57
Now in order to make this course as
accessible as possible, Nate and
1:00
I have decided to use the JavaScript
programming language to explore Selenium.
1:03
Now if JavaScript isn't your
primary language, don't fret.
1:07
We'll take it slow and
1:10
I'll also include links where you
can pick up more JavaScript skills.
1:11
There are a few prerequisites for
this course, so please check those
1:15
just to make sure you're up to date
on what we'll be discussing here.
1:19
Software development is a process,
and it has a lifecycle.
1:22
Writing code is only one part of that.
1:26
In order to successfully
release software to users,
1:28
it really ought to be thoroughly tested.
1:31
Now, this helps not only to ensure that
it is working as it is intended, but
1:33
also helps your users
avoid unnecessary errors.
1:37
Users really don't like bugs.
1:40
So, how can you make sure that
they don't encounter bugs?
1:42
Well, the answer is
pretty straightforward.
1:45
You check before they see it and you
make sure that there aren't any errors.
1:47
This is known as testing.
1:52
Imagine for a second that you
have a web-based application and
1:54
there are a few pages with
just a couple of flaws.
1:56
Now, this might seem like you could
just click through each page and
1:59
try all the different possibilities.
2:02
So when you're done with all that clicking
around you realize, wait a second,
2:04
not everybody uses Google Chrome and
that's the only place I tested it.
2:07
I better try Safari.
2:11
Okay, now I found some more issues.
2:13
I guess I better try Firefox and
then Internet Explorer.
2:15
And then wait,
what about phones and tablets and
2:17
what about all those different versions of
those browsers that everybody's updated?
2:20
Wait, people use different
operating systems.
2:24
How could you possibly go about testing
all those different scenarios, that's so
2:26
much testing.
2:29
In the teacher's notes, we have included
a browser compatibility test matrix
2:31
that also takes screen
resolution into account.
2:35
It turns out that this type of manual
testing requires a team of a dozen or
2:37
more people to fully test even
a simple product that has to support
2:41
all these permutations.
2:45
Now, testing of this nature is dull,
repetitive, and tedious.
2:47
It can lead to testers burning out and
making accidental mistakes.
2:52
This type of manual testing does exist,
and it is known to not
2:56
only delay product launches, but
also slow new product feature creation.
2:59
Because all the new features
are just another thing to test.
3:03
But, but, but you say wisely,
there's tons of apps that I use daily, and
3:06
they don't have any bugs.
3:10
They seem to have new
features all the time.
3:11
How do they do it?
3:13
That's a great question and
I'm glad you asked.
3:14
The answer there is automation.
3:16
You can actually write code that
will go into all that clicking and
3:17
filling out a form fields and all
the permutations and have it report back.
3:21
Computers don't get
bored by tedious tasks.
3:25
I think that you'll see writing
automation code is actually pretty fun.
3:27
It's a win-win.
3:31
Yeah, and you can use this automation
code in your testing framework so
3:33
your app can be fully tested
in all those permutations.
3:36
That's yet another win.
3:39
So are you ready to start winning?
3:41
There are a bunch of automation tools, but
Selenium is definitely one of the most
3:43
popular ones out there and
it has been around for a long time.
3:46
Let's take a look at it and
its history right after this quick break.
3:50
You need to sign up for Treehouse in order to download course files.
Sign up