Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

SC 2.5: Automating tests with macros and scripts

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

55 minutes

The same check, three hundred times

After every update, a technician must check that 300 PCs can reach the file server. Doing it by hand takes a day.

A short script does it in a minute. It never gets bored and it never skips one.

By the end of this lesson

Note

I can say when to use a macro or a script to automate a task.

Key words

WordWhat it means
Networkcomputers joined so they can share data
Routera device that passes data between networks
Automationgetting a computer to do a repeated task
Macrorecorded steps inside a program that you can replay
Scripta text file of commands that a computer runs in order
Loopa way to repeat the same steps
Regression testingrunning old tests again after a change
Commanda short instruction you type

The cells students fill in are left blank in this preview.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Macros and scripts

A macro is a recording. You switch on the recorder inside a program, do the steps once, and stop. Later you play them back. A macro in a spreadsheet can format a report in one click.

A script is a small program written as text. It can run any command, on any number of machines. It can be changed with a text editor.

Macro or script?

MacroScript
Made byRecording your clicksWriting commands
Lives inOne programA file the system can run
Good forRepeating steps in a spreadsheet or documentChecks on many machines, back-ups, test runs
Weak pointStops if the screen layout changesNeeds some coding skill

The cells students fill in are left blank in this preview.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

7 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.