<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="./spec.xsl" ?>

<spec title="Orchestration Projects/Wizards Test Specification" version="1.1" author = "Victoria Zhukovskaya" author-email="Victoria.Zhukovskaya@Sun.Com"  last-updated = "01 October 2007">
<intro>This specification provides a usecases of creation of the BPEL project in the in the Orchestration module. </intro>

<!-- The first part: Using the Java Studio Enterprise PXE Runtime Integration -->

<caseblock name="Create a new MyBPELModule1">
	<purpose>Check the Wizard.</purpose>
        <setup> </setup>
	<usecase name ="Create new MyBPELModule1 with help Wizard">
            <action>Invoke from main menu "File" -> "New Project ..."</action>
            <action>Select "SOA" from Categories and select "BPEL Module" from Projects. Press "Next" button.</action>
            <action>Enter the name of project - "MyBPELModule1" and select a location. Press "Finish" button.</action>
            <result>A "New Project" wizard appears.</result>
            <result>A "New BPEL Module" wizard appears.</result>
            <result>The "MyBPELModule1" node apears on project tab.</result>
	</usecase>
	<usecase name ="Entering incorrect project name">
            <action>Invoke from main menu "File" -> "New Project ..."</action>
            <action>Select "SOA" from Categories and select "Orchestation Project" from Projects. Press "Next" button.</action>
            <action>Enter the name of project - "MyBPELModule*" and select a location.</action>
            <action>Press "Cancel" button.</action>
            <result>A "New Project" wizard appears.</result>
            <result>"New BPEL Module" wizard appears.</result>
            <result>"Finish" button should be disabled. There should be "Project Name is not a valid folder name" text.</result>
            <result>The project should not be opened.</result>
	</usecase>
	<usecase name ="Entering empty  project location">
            <action>Invoke from main menu "File" -> "New Project ..."</action>
            <action>Select "SOA" from Categories and select  "BPEL Module" from Projects. Press "Next" button.</action>
            <action>Enter the Project Name - "MyBPELModule2"</action>
            <action>Empty the "Project Location" and select a location.</action>
            <action> Press "Finish" button.</action>
            
            <result>A "New Project" wizard appears.</result>
            <result>"New BPEL Module" wizard appears.</result>
            <result>"Finish" button should be enabled. And "MyBPELModule2" node apears on project tab. The porject created in the default location</result>
	</usecase>
	<usecase name ="Create the project with existing name">
            <action>Invoke from main menu "File" -> "New Project ..."</action>
            <action>Select "SOA" from Categories and select "BPEL Module" from Projects. Press "Next" button.</action>
            <action>Enter the Project Name - "MyBPELModule3" select the "Project Location" and select a location. Press Finish.</action>
            <action>Right click on "MyBPELModule3" on "Project" tab and select "Close Project".</action>
            <action>Invoke from main menu "File" -> "New Project ..."</action>
            <action>Select "SOA" from Categories and select "BPEL Module" from Projects. Press "Next" button.</action>
            <action>Enter the Project Name - "MyBPELModule3" select the same "Project Location" (as in step 3) and select a location.</action>
            <action>Press "Cancel".</action>
            <result>A "New Project" wizard appears.</result>
            <result>"New BPEL Module" wizard appears.</result>
            <result>"MyBPELModule3" node apears on project tab.</result>
            <result>"MyBPELModule3" node disapears on project tab.</result>
            <result>A "New Project" wizard appears.</result>
            <result>"New BPEL Module" wizard appears.</result>
            <result>"Finish" button should be disabled. There should be "Project Folder already exists and is not empty." text.</result>
            <result>"MyBPELModule3" node dos not apears on project tab.</result>
	</usecase>
        
</caseblock>        
<caseblock name="Check file wizards for Orchestration projects">
	<purpose>Check the Wizards of xsd, wsdl, bpel files.</purpose>
        <setup>BPELModule should be created. Name of the project is MyBPELModule4. MyBPELModule4 node shold be opened on Projects Tab.</setup>
	<usecase name ="Create xsd file">
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select XML Category and then select XML Schema. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right click on newXmlSchema.xsd and select Delete.</action>

            <result>New File Wizard should be appeared</result>
            <result>There should be Name and Location part of wizard. File Name is newXmlSchema.</result>
            <result>newXmlSchema.xsd is appeared  under Process Files node on  Project Tab.</result>
            <result>newXmlSchema.xsd is disappeared  under Process Files node on  Project Tab.</result>

	</usecase>

	<usecase name ="Create wsdl file">
            <action>Right-click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select XML Category and then select WSDL Document. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right click on newWSDL.wsdl and select Delete.</action>

            <result>New File Wizard should be appeared.</result>
            <result>There should be Name and Location part of wizard. File Name is newWSDL</result>
            <result>newWSDL.wsdl is appeared  under Process Files node on  Project Tab.</result>
            <result>newWSDL.wsdl is disappeared  under Process Files node on  Project Tab.</result>
	</usecase>

	<usecase name ="Create wsdl file and import xsd ">
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select XML Category and then select WSDL Document. Press Next.</action>
            <action>Type newWSDL1 in File Name field.  Toggle to tru Import XML Schema File(s) check box.</action>
            <action>Press Browse ... </action>
            <action>Expand "By File" -> MyBPELModule4 -> Process Files and  Toggle to tru Import for newXmlSchema.xsd.</action>
            <action>Press Finish.</action>

            <result>New File Wizard should be appeared.</result>
            <result>There should be Name and Location part of wizard.</result>
            <result>Browse button will be enabled.</result>
            <result>Add Import window will be opened.</result>
            <result>XML Schema(s) will have path to  newXmlSchema.xsd.</result>
            <result>newWSDL1.wsdl is appeared  under Process Files node on  Project Tab.</result>
	</usecase>
	<usecase name ="Crete bpel file">
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select SOA Category and then select BPEL Process. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right click on newWSDL.wsdl and select Delete.</action>

            <result>New File Wizard should be appeared.</result>
            <result>There should be Name and Location part of wizard. File Name is newProcess.</result>
            <result>newProcess.bpel is appeared  under Process Files node on  Project Tab.</result>
            <result>newProcess.bpel is disappeared  under Process Files node on  Project Tab.</result>
	</usecase>

	<usecase name ="Remove all file xsd, wsdl and bpel into Folder">
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select XML Category and then select XML Schema. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right-click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select XML Category and then select WSDL Document. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select SOA Category and then select BPEL Process File Type. Press Next.</action>
            <action>Press Finish.</action>
            <action>Right Click on Process Files node on Project Tab and select New -> Other...</action>
            <action>Select Other Category and then select Folder. Press Next.</action>
            <action>Press Finish.</action>
            <action>Select all files under on Process Files node and dnd int newFolder.Expand newFolder.</action>
            <action>Right click on newFolder and select Delete.</action>

 
            <result>New File Wizard should be appeared</result>
            <result>There should be Name and Location part of wizard. File Name is newXmlSchema.</result>
            <result>newXmlSchema.xsd is appeared  under Process Files node on  Project Tab.</result>
            <result>New File Wizard should be appeared.</result>
            <result>There should be Name and Location part of wizard. File Name is newWSDL</result>
            <result>newWSDL.wsdl is appeared  under Process Files node on  Project Tab.</result>
            <result>New File Wizard should be appeared.</result>
            <result>There should be Name and Location part of wizard. File Name is newFolder</result>
            <result>newFolder is appeared  under Process Files node on  Project Tab.</result>
            <result>newFolder has 3 files - newProcess.bpel, newWSDL.wsdl and newXmlSchema.xsd.</result>
            <result>newFolder and  3 files are deleted.</result>
    </usecase>
</caseblock> 
<caseblock name="Check testcases for Orchestration projects">
	<purpose>Check the Wizards creation testcases.</purpose>
        <setup>Create Synchronouse Sample. Deploy SynchronouseSample.</setup>

	<usecase name ="Check files and menu of Testcase">
            <action>Expand SynchronouseSampleApplication -> Test -> TestCase0</action>
            <action>Right-click on SynchronouseSampleApplication -> Test node.</action>
            <action>Right-click on SynchronouseSampleApplication -> Test -> TestCase0 node</action>


            <result>There are Input and Output nodes.</result>
            <result>There is menu items: 'New TestCase', 'Delete All Results'</result>
            <result>There is menu items: 'Run', 'Debug', 'Diff' (disabled menu item), 'Delete', 'Delete Results', 'Properies'.</result>
	</usecase>

	<usecase name ="Create/Edit/Delete TestCase">
            <action>Right-click on SynchronouseSampleApplication -> Test node and select 'New TestCase'.</action>
            <action>Enter myTestCase1 name and press Next.</action>
            <action>Select SynchronouseSampe.wsdl and press Next.</action>
            <action>Select operation1 and press Finish.</action>
            <action>Change '?string?' value into 'Hi!' in opened editor .</action>
            <action>Right-click on SynchronouseSampleApplication and select 'Test'. Answer  Yes for Overwrite Empty Output Dialog.</action>
            <action>Expand TestCase0 node.</action>
            <action>Expand myTestCase1 node.</action>
            <action>Right-click myTestCase1 node and select Run.</action>
            <action>Right-click on SynchronouseSampleApplication -> Test and select 'Delete All Results'. Answer  Yes for Overwrite Empty Output Dialog.</action>
            <action>Expand TestCase0 and myTestCase1 nodes.</action>
            <action>Right-click on myTestCase1 node and select Delete.</action>

            <result>New Test Case dialog is appeared.</result>
            <result>New Test Case - Select the WSDL Document step of dialog is appeared.</result>
            <result>New Test Case - Select the Operation to Test step of dialog is appeared.</result>
            <result>Input.xml file is opened for edit. SynchronouseSampleApplication -> Test has myTestCase1 node wich cantain Input and Output. Output.xml is empty.</result>
            <result>Input.xml file is opened for edit. SynchronouseSampleApplication -> Test has myTestCase1 node wich cantain Input and Output. Output.xml is empty.</result>
            <result>See output results.</result>
            <result>There is new node with results of running testing. It is passed - node is gray.</result>
            <result>There is new node with results of running testing. It is passed  but checked as not passed - node is red. Output.xml file is not empty now.</result>
            <result>There is new node with results of running testing. It is passed - node is gray. Output.xml file is not empty now.</result>
            <result>There are not testresults nodes.</result>
	</usecase>


</caseblock> 
</spec>
