UPI Study › Courses › System Analysis and Design › Free lessons › Lesson 7.7 Free with a free account
Dry Run Testing: Simulating Before Shipping
System Analysis and Design · Chapter 7: Implementation, Testing, and MaintenanceSection 7.7 · lesson 52 of 697 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of System Analysis and Design.
Lesson complete
Earn the 3 college credits for System Analysis and Design
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Keeping Software Alive: The Maintenance Phase →← Exploring the Different Types of Software TestingNext lesson: Keeping Software Alive: The Maintenance Phase →
In this lesson
Simulating code and deployments before they run for real.
- Define desk checking, and explain when it is used
- Trace program logic by hand with a trace table
- Explain what a go-live rehearsal is, and why teams run one
- Explain how dry runs complement automated testing
Transcript
Everything said in the video, section by section (1,027 words). Read along, or search it.
Implementation, Testing, and Maintenance
Dry Run Testing
The cheapest bug to fix is the one caught before anything runs. This section is about dry run testing, simulating before shipping. We will cover desk checking and trace tables at the code level, go-live rehearsals at the deployment level, and how both fit alongside automated testing.
Figure 7.7
Simulate It Before It Happens
Dry run testing works through a system's logic, or a process, as a simulation. Nothing is actually executed on a computer, or carried out in the live production environment. It happens at two levels. At the code level, early on, an analyst or developer traces an algorithm's logic by hand, before any code is run. At the process level, just before deployment, a team walks through the actual steps of the deployment, before the real cutover happens. Both catch problems while they are still cheap to fix, before a mistake shows up in running code, or in front of live users.
Desk Checking
Executing Code in Your Head
Desk checking is reading through code or pseudocode line by line, mentally executing each step, to verify the logic before ever running it. It needs nothing but the code and a careful reader. That makes it one of the cheapest testing techniques there is. It is most valuable early in development, before an environment even exists to run the code in. It is valuable for critical algorithms, where a logic error would be especially costly to discover later. It works well as peer review, because someone other than the author often catches assumptions the author no longer notices. And it is one of the best ways to learn to read code carefully, which is why even experienced developers still practice it.
Trace Tables
Tracing Logic by Hand
Desk checking relies on a structured tool, the trace table. A trace table records the value of every relevant variable after each step of an algorithm, so its behavior can be followed by hand, one line at a time. Here is some pseudocode meant to add up the numbers one through four. Line one sets sum to zero. Line two starts a loop, with i running from one to four. Line three adds i to sum on each pass. Line four ends the loop, and line five prints the sum.
The Trace
Step by Step, Variable by Variable
Now trace it, recording what each variable holds after every step. After line one, sum is zero, and i has no value yet. On the first pass through the loop, i is one, and sum becomes one. On the second pass, i is two, and sum becomes three. On the third pass, i is three, and sum becomes six. On the fourth pass, i is four, and sum becomes ten. Then line five prints ten. The trace confirms the algorithm is correct. One plus two plus three plus four is ten.
Finding a Bug
The Same Trace Exposes a Mistake
The same technique surfaces a bug just as easily. Suppose line two had read, for i equals one to five, by mistake. The trace table would show a fifth pass, with i equal to five, that should never have happened. Sum would end at fifteen, instead of ten. That wrong loop boundary is visible on paper, before the code is ever compiled or run. So when a trace table shows a variable reaching an unexpected value on the final pass, it points straight at a logic error, like this one.
Go-Live Rehearsals
A Dry Run of the Deployment
A go-live rehearsal takes the same idea, simulate it before it really happens, and applies it to the deployment process instead of to code. The team walks through the actual sequence of cutover steps, either in a staging environment, or simply talked through in order. A rehearsal verifies five things. That the steps are in the right order, and nothing is missing. Who owns each step, so nothing stalls waiting on an unclear owner. Exactly how to reverse the deployment, if something goes wrong. Which steps take longer than expected, so that surprise does not happen during the real event. And that stakeholders and users are notified at the right points.
The Common Idea
Cheap and Private, Not Costly and Public
A go-live rehearsal offers exactly what desk checking offers at the code level. It finds a problem while it is still cheap, and private, to fix. During the live event, the same mistake is both more expensive, and visible to real users. This is why the rollback check matters, even if the real deployment goes smoothly. A rehearsal cannot guarantee a smooth cutover. Without it, a real problem during cutover would be the first time anyone had ever tried the rollback steps.
Complements, Not Competitors
Dry Runs Alongside Automated Testing
Dry run testing does not compete with automated testing. The two catch different things, at different points. Dry runs happen before code is ever run, or before a live deployment. Automated tests run after code exists and can execute. Dry runs need no working environment. Automated tests need an environment, or a test harness. Dry runs catch logic errors, missing steps, and misunderstood algorithms or processes. Automated tests catch regressions, across many scenarios, quickly and repeatedly. A dry run costs only human time. Automated tests cost more to set up, but are nearly free to repeat. So a team that says thorough automated tests make dry runs unnecessary has it wrong. Automated tests verify code that already runs. A go-live rehearsal verifies the deployment process itself, which automated tests never cover.
Key Terms
The Vocabulary of This Section
Let's lock in the key terms. Dry run testing simulates logic or a process before it runs for real. Desk checking reads code line by line, mentally executing each step. A trace table records each variable's value after every step of an algorithm. And a go-live rehearsal walks through the actual cutover steps, before doing them for real.
Key Takeaways
What to Carry Forward
To pull this together. Dry run testing simulates code logic or a deployment process before it actually runs, catching problems while they are still cheap to fix. Desk checking reads through code or pseudocode by hand, to verify its logic before it is ever run. A trace table records each variable's value after every step, making an algorithm's behavior, and its bugs, visible on paper. A go-live rehearsal applies the same idea to a deployment, surfacing sequencing, ownership, rollback, and timing problems before the real cutover. And dry run testing complements automated testing rather than replacing it, because each catches different problems at different points.
About System Analysis and Design at UPI Study
System Analysis and Design (Computer Science 390) is a self-paced online course of 69 video lessons in 9 chapters, from the analyst's role and requirements to UML modeling, interface and database design, testing, maintenance and project management. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Why take it here
Why students take System Analysis and Design with UPI Study
Where the credit goes
Universities that work with NCCRS
System Analysis and Design carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Dry Run Testing: Simulating Before Shipping
What is desk checking in programming?
How do you use a trace table to check an algorithm?
What is a go-live rehearsal and why do teams run one?
Do thorough automated tests make dry run testing unnecessary?
About the System Analysis and Design course
How many college credits is System Analysis and Design?
How much does System Analysis and Design cost and what is included?
Which universities accept UPI Study credits?
How long does System Analysis and Design take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in System Analysis and Design.
69 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →