Test Case Characteristics

Following is an overview of the characteristics of test cases as they relate to Java Explorer:
  • Each test scenario includes an Init test case and an End test case. Multiple Main test cases may also be defined. An Init test case is the first test case that is called during a test run. Init test cases often include method calls that are related to initialization, logging in, or start-up. An End test case is the last test case that is called during a test run. End test cases often include method calls that are related to clean-up, for example logging off.
  • Main test cases are executed between Init and End test cases and may include any sort of method call.
  • A local variable is only valid within a single test case and cannot be passed to another test case. Only global variables can be used to pass values between test cases.
  • Each test case must have a unique name.
  • Names of test cases are restricted. The names are mapped to Java methods and Silk Performer transactions, so they are subject to the restrictions of Java method and Silk Performer transaction names. Code exported to Silk Performer cannot use keywords that are defined by BDL or Java. You cannot use the names of the following variables because they are scripted by Java Explorer scripts when exporting to Silk Performer Java Framework Projects:
    all allownull and array aux
    begin benchmark bin boolean by
    char chr clock$ commit con const create com1 ... com9 cursor
    database dclevent dclform dclfunc dclparam dclrand dclsql dcltrans dcluser delete dll do double drop dstring
    else elseif end eos exit explicit
    false fetch float for form from function
    group
    halt handler
    if in init inout insert into
    last lenspec long loop lpt1 ... lpt9
    mod
    next not nul number
    of optional or ord order out
    prn proc ptr
    rc reset result return rndbin rndefxp rndexpn rndfile rndind rndpern rndsno rndstr rndstream rndunif rndunii
    rndunin rollback row rows
    select set short sizeof sizespec sql stored string
    then throw to transaction transactions true
    union unique unsigned update use user
    values var void
    wait where while write writeln
  • Test case properties can be edited by selecting a test case in the Test Scenario menu tree and defining field values in the Output Data Properties field:
    • StopAtError is the attribute that defines the number of errors that can occur during an animated run. If this number is reached, the animated run aborts. Setting this attribute to 0 specifies that errors will be ignored.
    • CallCount is the attribute that defines the number of times that a test case will be called during an animated run.
    • The Name attribute of the test case must be unique among all test cases.
  • You can create, copy, and remove test cases by right-clicking a teste case in the Test Scenario menu tree and selecting the respective menu item.