Browse Prior Art Database

Data feed for automated functional testcases in Java Disclosure Number: IPCOM000032607D
Original Publication Date: 2004-Nov-09
Included in the Prior Art Database: 2004-Nov-09
Document File: 1 page(s) / 37K

Publishing Venue



Use recognizible data types for the data that must be provided to the testcase. A testcase class template must implement a method that, using reflection, assigns the values to the variables. All the testcases must extend this template. You can ignore all the steps needed to assign values to the variables in test-driven automated scenarios

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 79% of the total text.

Page 1 of 1

Data feed for automated functional testcases in Java

Consider this scenario: automated data-driven test cases written in java and implementing functional tests.

    The testcases need some data that may or may not be provided by an execution harness.

    Even if these data are provided by the harness, every testcase must implement the logic to read and assign the provided data to the specific variables representing its parameters. Moreover It is not always simple to identify wich are the parameters that must be provided as data for the testcases simply looking at the testcase code.

    Define some wrappers (since extensions is not feasable) for the Java most common data types (Strings, Integers, Boolean etc) to be easily recognizible in both situations: looking statically at the code and at run time, automatically Every parameter that must be instanciated with a provided value must be an instance of these classes.

Use a template for testcases, so that a harness calls a specific method for all testcases before executing the testcase code itself (this is already provided by some frameworks for automation like JUnit, Rational XDE for Funcional Test etc).

    The harness gathers the data that must be provided to a specific testcase and calls this method.

    This method input is an HashMap where each key is the name of the variable and the corresponding value is the value to assign to it. The code implements this logic: using introspection do the following:

collect the list of the class...