Shared Flashcard Set

Details

CSE 15L
Debugging Tools and Techniques
53
Computer Science
Undergraduate 3
03/22/2012

Additional Computer Science Flashcards

 


 

Cards

Term
True or False

In unit testing OO software, a “unit” is usually taken to mean a single method.
Definition
True
Term
True or False

In test-driven development, tests are written before the software to be tested is written.
Definition
True
Term
True or False

In test-driven development, tests are written before the documentation of the software to be tested is written
and understood.
Definition
False
Term
True or False

JUnit is one of the most popular Java logging frameworks.
Definition
False
Term
True or False

It is usually feasible to test all possible values of arguments to a method.
Definition
False
Term
True or False

In testing, “edge cases” and “corner cases” mean the same thing.
Definition
True
Term
True or False

In Java, if j and i are both positive ints, it is possible that i+j is negative.
Definition
True
Term
True or False

It is important to write tests to check that when a method’s preconditions are not met when it is called, its
postconditions will not be met when the method returns.
Definition
False
Term
True or False

In unit testing, you should call private ‘helper’ methods of a class directly.
Definition
False
Term
True or False

In the JUnit framework, if a test method returns, that test is counted as having passed.
Definition
True
Term
True or False

With unit testing, it is usually possible to test the mutator methods of a class independently of the accessor
methods of the class.
Definition
False
Term
True or False

In the JUnit framework, if a test method throws an exception, that test is counted as having failed.
Definition
False
Term
True or False

Stdout should be used for unusual output from your program, such as error reporting.
Definition
False
Term
True or False

You should have debugging output in production code.
Definition
False
Term
True or False

When the standard deviation of an algorithm measurement is high, that typically indicates that the
measurement is reliable.
Definition
False
Term
True or False

In Java, checked exceptions do not need to be caught or declared.
Definition
False
Term
True or False

In the Java logging framework, a message will not be logged if its level is higher than the Logger’s level.
Definition
False
Term
True or False

In the Java logging framework, the default Handler for a Logger is FileHandler.
Definition
False
Term
True or False

The Java logging framework uses the Java Virtual Machine Tool Interface (JVMTI).
Definition
False
Term
True or False

Java profiling is turned on by default.
Definition
False
Term
True or False

Java assertions are turned off by default.
Definition
False
Term
True or False

In the Java logging framework, a Logger can have more than one Handler.
Definition
True
Term
True or False

You should use the ascii output option if you want to inspect hprof data using the jhat tool.
Definition
False
Term
True or False

Using Java assertion statements, a failed assertion will throw an AssertionError, which should be caught by
your program.
Definition
True
Term
True or False

Debugging is not algorithmic.
Definition
True
Term
True or False Debugging is not algorithmic.
Definition
True
Term
True or False

A log message with log level FINER will be logged when the current log level is set to FINE.
Definition
False
Term
True or False

When debugging, a large regression window is better than a small one.
Definition
False
Term
True or False

SVN is a good tool for bug tracking.
Definition
False
Term
True or False

To get more accurate data, you should use System.currentTimeMillis() instead of than System.nanoTime()
in timing measurements.
Definition
False
Term
True or False

In a bug report, it is better to give more information rather than less.
Definition
True
Term
Regression Testing
Definition
When changes are made to source code, re-running tests to check that new bugs haven’t been introduced
Term
Black Box Testing
Definition
Testing which is done without knowledge of the details of the implmentation
Term
Generic Cases
Definition
In testing, cases that aren’t corner cases
Term
Under Unix, the file descriptor number for standard output
Definition
1
Term
Java logging can be conveniently controlled by specifying logging configuration in a(n)
______________________ file.
Definition
properties
Term
The name of Tom Yeh’s automated GUI testing framework is ________________________.
Definition
Sikuli
Term
Logging

Fine should be used for:
Definition
Level of object creation,
catch clauses for exceptions that do not constitute errors and so on.
Term
Logging

Finer should be used for:
Definition
Method entry and exit
Term
Logging

Finest should be used for:
Definition
Used to learn behavior of a system.
Instance variables in a class.
(Before/after a method call, inside a method, or a loop.)
Term
Assertions
Definition
A boolean based valued expression that is suppose to be true whenever execution reaches a certain point in the program.

Complement to unit testing.
Term
Default formatter for ConsoleHandler:
Definition
SimpleFormatter
Term
Default formatter for FileHandler/SocketHandler:
Definition
XMLFormatter
Term
True or False

If a hypothesis is contradicted by an experiment, you should test the hypothesis with a different experiment.
Definition
False
Term
True or False

JUnit is the most widely used testing framework for Java code.
Definition
True
Term
Java assertions should generally not be used to check what?
Definition
preconditions of public methods
Term
In Unix, how do you send standard output from prog to file, and discard standard error?
Definition
prog 1> file 2> /dev/null
Term
What is the most accurate hprof cpu option?
Definition
times
Term
A JUnit test program is written as a class that extends what junit.framework class?
Definition
TestCase.... not fucking Tester
Term
In the scientific method, the word closest to having the same meaning as "hypothesis" is:
Definition
guess
Term
The Unix/Linux command line tool that permits measuring wall-clock time taken by a program is:
Definition
time
Term
The Unix/Linux command line tool that permits selecting lines from a file that contains a specified pattern is:
Definition
grep
Term
Which of the following is not typically a cause of differing time cost measurements from one run to the next when benchmarking a Java program?

JIT compiler
garbage collector
operating system tasks
increase in RAM memory
Definition
increase in RAM memory
Supporting users have an ad free experience!