|
- Consider the class
TableNameParser. Its task is to find out what tables
are used in an SQL-query. It need not work correctly if the query has
syntax errors. Draw flow graphs for the methods of this class.
- Determine the McGabe complexities for the methods of TableNameParser.
- The syntax for SQL-queries is
SELECT <result_items>
FROM <tables>
[WHERE <conditions>]
[GROUP BY <grouping> [HAVING <group_conditions>]]
[ {UNION | INTERSECT | MINUS } <sql_query> ]
[ORDER BY <sorting_criteria>]
<tables>= <table_expression> | <table_expression>, <tables>;
<table_expresssion>= {<table_name> | (<sub_query>)} [[AS] <alias>]
<sub_query>= sql_query without ORDER BY -part.
Both <conditions> and <group_conditions> may contain sub_query.
Define a branch covering test material for the method getTableNames.
- What categories would you define for testing getTableNames using the black box technique.
- T.J.Ostrand, M.J.Balcer: The Category-Partition Method for
Specifying and Generating Functional Tests, CACM, 31, 6, 1988,
pp 676-686
- Carry out a code review for TableNameParser. Is it correct or not? Why?
- How would you implement the test environment for class TableNameParser?
|