Borland Software Water System silk perforator java explorer 2006 release 2 Manuel D’Utilisation

Page de 110
SilkPerformer Java Explorer User Guide
101
7  E
XPORTING
 P
ROJECTS
Standalone Console Applications
Test case execution 
sequence
Note that there are differences between the way that JUnit and Java Explorer run 
tests. For example, if there is a Java Explorer project containing an InitTestCase, 
an EndTestCase, and two TestCases, the execution sequence in Java Explorer, 
SilkPerformer, and standalone projects will be:     
1
 InitTestCase  
2
 TestCase1  
3
 TestCase2  
4
 EndTestCase  
However the execution sequence in JUnit will be:  
5
InitTestCase (setup)  
6
TestCase1 (testMethod1)  
7
EndTestCase (tearDown)  
8
InitTestCase(setUp)
9
TestCase2 (testMethod2)
10 EndTestCase (tearDown)  
This means that in JUnit test suites, values and global variables to be initialized 
in InitTestCase can’t be passed from the first test case to the second test case. 
Standalone Console Applications
Java Explorer can compile the test cases in a test scenario into a Java class that 
can be run independently of Java Explorer (e.g., from the commandline). These 
standalone console applications call all test case methods in their main methods.
Console applications can be used to either run test scenarios independent of Java 
Explorer, or used to generate network traffic that can be recorded by 
SilkPerformer. SilkPerformer can consequently generate Web BDL scripts 
based on such network traffic. 
Exporting standalone 
console applications
Procedure  To export a standalone console application:
1
Go to Java Explorer’s Export menu and select Standalone Console 
Application.