Share via


Test Cases

Test cases for the ERP Connector Solution Starter for Microsoft Office Project Server 2003 include tests for the human resources (HR) module, project creation using mySAP™ ERP Financials data from the CO and PS subsystems (internal orders and project/task accounting), and work actuals data export from Project Server for mySAP ERP Financials.

Test cases are listed in the following groups:

  1. Finance Projects module: Creating projects.
    • Valid XML input.
    • Invalid and incorrect XML input.
  2. Exporting actuals in the Finance WBS module.
    • Exporting actuals for the mySAP ERP Financials CO subsystem.
    • Exporting actuals for the mySAP ERP Financials PS subsystem.
    • Invalid and incorrect XML.

For information about test scenarios and the testing process, and for specific HR module tests, see Testing.

Finance Projects module: Creating Projects

Files for the test cases to create projects can be found in the following download directories:

  • \Tests\Test cases SAPCOPDSExtender\CO
  • \Tests\Test cases SAPCOPDSExtender\PS

The XML header in each test file makes a reference to the SAP Schema.xsd file, which you would normally install in the following directory (see Installing the PDS Extensions):

C:\Program Files\Microsoft Office Project Server 2003\BIN\PDSExtensions\SAP\SAP Schema.xsd

If you install SAP Schema.xsd in a different directory, you must edit the value of the xsi:noNamespaceSchemaLocation attribute in each test file.

Note  The download includes more test case files than those described in the following two tables. The test cases described are a sample of typical tests for the Finance Projects module, which can include task data. Tests for the Finance Projects module are similar, but are simpler because they include only internal order data.

Valid XML Input

Test name
[filename]
Description Precondition Expected output Postcondition
1. Project only
[Test1-3-1 valid, only project.xml]
Contains only a project. No WBS element, no order data, and no hierarchy data. Delete all projects in Project Server. Creates an empty project and writes the IO number from mySAP ERP in the assigned enterprise project text field. Delete the project for other test cases.
2. Project 2
[Test1-3-2 valid, only project2.xml]
Contains a project with more project information. No WBS element, no order data, and no hierarchy data. Delete all projects in Project Server. Creates an empty project and writes the IO number from mySAP ERP in the assigned enterprise project text field. Delete the project for other test cases.
3. Complete file
[Test1-1-1 valid, double order, WBS hierarchy.xml]
Contains one project with IO numbers from mySAP ERP Financials, two level-one tasks, and a task structure. Delete all projects in Project Server. Creates a project with task hierarchy and writes the IO number from mySAP ERP in the assigned enterprise project text field. The task hierarchy has two level-one tasks with mySAP ERP information in the enterprise custom fields. Delete the project for other test cases.
4. Project with one task
[Test1-1-2 valid, one order, WBS hierarchy, one task.xml]
Contains one project with IO numbers from mySAP ERP Financials and one task with hierarchy information. Delete all projects in Project Server. Creates a project with one task and writes the IO number from mySAP ERP in the assigned enterprise project text field. Delete the project for other test cases.
5. Project with no hierarchy
[Test1-2-2 valid, no hierarchy.xml]
Contains one project and some WBS elements, but no hierarchy data. Delete all projects in Project Server. Creates a project with all tasks at one level. Delete the project for other test cases.
6. Existing project
[Test1-3-1 valid, only project.xml]
Same file as in test #1. Submit it once, and then submit the same file again. Delete all projects in Project Server. The second submission results in a standard Project Server error (Project already exists). Delete the project for other test cases.

Invalid and Incorrect XML Input

In the following tests, the postcondition is not applicable because the ERP Connector logs an error and does not make changes in project data.

Test name
[filename]
Description Precondition Expected output Postcondition
1. Project with incorrect hierarchy
[Test2-1 incorrect data in hierarchy and tasks.xml]
The project contains WBS and hierarchy elements. The hierarchy data does not match the WBS.   ERP Connector returns an error that the task hierarchy information is incorrect.  
2. Project with invalid XML
[Test2-2 invalid, missing WBS element.xml]
The XML content does not conform to the XML Schema. A WBS element is missing.   ERP Connector returns an XML Schema validation error.  

Exporting Actuals in the Finance WBS Module

The following tests do not have associated files in the download. The tests require resources to report actuals and project managers to approve timesheets. In a test environment, the tester can log on as different resources and project managers to satisfy the preconditions. ERP Connector drops an XML file with the actuals export data to the folder specified for the Service for Enterprise Data Maintenance (EDM), and then the SAPFIPDSExtender PDS extension processes that data to create the export file for mySAP ERP.

Exporting Actuals for the mySAP ERP Financials CO Subsystem

In test 2 of the following table, the resources report actuals on the basis of hours of work done per day, and the project managers have approved the submitted timesheets. In both tests, the enterprise text fields are set correctly in the Enterprise Global template and in the administration page.

Test name Description Precondition Expected output Postcondition
1. Empty actuals for CO The specified period does not contain any actuals. Projects have an IO number from mySAP ERP set only on the project level. Resources have reported no actuals for the specified period. ERP Connector returns an XML file including a header but with no actuals. Delete the project for other test cases.
2. Actuals for CO The specified period does contain actuals. Projects have an IO number from mySAP ERP set only on the project level. ERP Connector reports the actuals for each resource and the respective IO number from mySAP ERP on a project level. Delete the project for other test cases.

Exporting Actuals for the mySAP ERP Financials PS Subsystem

In tests 2, 3, and 4 of the following table, the resources report actuals on the basis of hours of work done per day. The project managers have approved the submitted timesheets. In all tests, the enterprise text fields are correctly set in the Enterprise Global template and in the administration page.

Test name Description Precondition Expected output Postcondition
1. Empty actuals for PS The specified period does not contain any actuals where an IO number from mySAP ERP is assigned on a task level. Create multiple projects on Project Server; each project contains multiple tasks. Assign each task an IO number from mySAP ERP. The resources have reported no actuals. ERP Connector exports an XML file including a header but with no actuals. Delete the project for other test cases.
2. Actuals for PS, all tasks The specified period does contain actuals where an IO number from mySAP ERP is assigned on a task level for all tasks. Create multiple projects; each project contains multiple tasks. Assign each task an IO number from mySAP ERP. ERP Connector exports an XML file with the actuals for each resource and reports the respective mySAP ERP Financials task ID on a task level. Delete the project for other test cases.
3. Actuals for PS, some tasks The specified period does contain actuals where an IO number from mySAP ERP is assigned on a task level for some tasks. Create multiple projects; each project contains multiple tasks. Assign an IO number from mySAP ERP to some of the tasks. For a task that has no IO number from mySAP ERP, one of its parent tasks does have an IO number from mySAP ERP. ERP Connector exports an XML file with the actuals for each resource and reports the respective mySAP ERP Financials task ID on a task level. Where no mySAP ERP Financials task ID is set, ERP Connector uses the mySAP ERP Financials task ID assigned to one of the parent tasks. Delete the project for other test cases.
4. Actuals for PS, project and some tasks The specified period does contain actuals where an IO number from mySAP ERP is assigned on a project level and on a task level for some tasks. Create multiple projects; each project contains multiple tasks. Assign an IO number from mySAP ERP to some of the tasks. The IO number from mySAP ERP of the parent tasks can refer to an IO number from mySAP ERP. Assign a project IO number from mySAP ERP to the project. ERP Connector exports an XML file with the actuals for each resource and reports the respective mySAP ERP Financials task ID on both the project and task level. Where no mySAP ERP Financials task ID is set, ERP Connector uses the mySAP ERP Financials task ID assigned to one of the parent tasks. If ERP Connector finds no mySAP ERP ID on a task level, it uses the mySAP ERP project ID for the assignment. Delete the project for other test cases.

Invalid and Incorrect XML

In the following tests, the postcondition is not applicable because the ERP Connector logs an error and does not make changes in project data.

Test name Description Precondition Expected output Postcondition
1. Invalid XML input The export file contains a request with invalid XML. Send an invalid XML file to the specified EDM file drop. ERP Connector returns a standard PDS error message for invalid XML.  
2. Incorrect XML input, tag missing The export file contains a request with valid XML but missing required tags. Send a valid XML file to the specified EDM file drop with one required tag missing. ERP Connector returns a PDS extension error: <Error>Request property "tagName" must be set. </Error>  
3. Incorrect XML input, date The export file has valid XML but has incorrect entries for start date or end date. Send a valid XML file to the specified EDM file drop with incorrect values for start or end date. ERP Connector returns a PDS extension error: <Error>Error while trying to get actuals. Error message: Invalid start or end date format detected.</Error>  
4. Incorrect XML input, actuals unit The export file has valid XML but has incorrect values for ActualsUnit. Send a valid XML file to the specified EDM file drop with incorrect values for <ActualsUnit>. ERP Connector returns a PDS extension error: <Error>Invalid value for property "ActualsUnit".</Error>