Test Case Reference

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Test cases for the ERP Connector Solution Starter for Microsoft Office Project Server 2007 include XML request files for resource integration with the SapHRPlugIn component and for project creation with the SapCOPlugIn component using data from mySAP™ ERP Financials (internal orders and project/task accounting). This article describes test cases for exporting work actuals; there is only one sample XML request file for exporting data from Project Server.

Test cases for the SapCOPlugIn component and the SapFIPlugIn component are listed in the following groups:

  • Tests for Creating Projects

    • Valid XML Input

    • Invalid and Incorrect XML Input

  • Tests for Exporting Work Actuals

    • Exporting Actuals for the mySAP ERP Financials CO Subsystem

    • Exporting Actuals for the mySAP ERP Financials PS Subsystem

For information about the specific SapHRPlugIn tests, see Acceptance Tests and Additional Tests. For general information about creating tests for the plug-ins, see Test Scenarios.

Tests for Creating Projects

Files to use in the test cases to create projects are in the ERPConnector\tests\CO subdirectory in the Project 2007 SDK download. When you install the ERP Connector on a Project Server computer, the test cases for creating projects are in [Program Files]\ERP Connector Solution Starter\tests\CO.

The XML header in each test file for the SapCOPlugIn component makes a reference to the SapCOPlugIn.xsd schema. The schemas for all test files are embedded resources in the plug-in assemblies.

NoteNote

The ERP Connector source code in the Project 2007 SDK download includes more test case files than are described in Table 1 and Table 2. The test cases described are a sample of typical tests for SapCOPlugIn, which can include internal order project data alone or it can include project and task data.

For the request file syntax, see Plug-in: Finance Integration on a Project and WBS Level.

Valid XML Input

Table 1. Examples of tests using valid XML input

Test / File Name

Description

Precondition

Expected Output

Postcondition

1. 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.

Save the project for the next test.

 2.

Use the same file as in the previous test. Submit the file again.

Keep the project created in the previous test.

The second submission results in a standard Project Server error (the project already exists).

Delete the project for other test cases.

3. 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.

4. Test1-1-1 valid, double order, WBS hierarchy.xml

Contains one complete 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.

5. 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.

6. 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.

Invalid and Incorrect XML Input

Table 2. Examples of tests using incorrect XML input

Test / File Name

Description

Precondition

Expected Output

Postcondition

1. Test2-1 incorrect data in hierarchy and tasks.xml

The project contains WBS and hierarchy elements. The hierarchy data is incorrect; it does not match the WBS.

 

ERP Connector returns an error that the task hierarchy information is incorrect.

 

2. Test2-2 not valid, missing WBS element.xml

The XML content is not valid; it does not conform to the XML schema. A WBS element is missing.

 

ERP Connector returns an XML schema validation error.

 

Tests for Exporting Work Actuals

The tests in Table 3 and Table 4 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.

To run a test, after satisfying the precondition, you can drop an XML request file that specifies the start and end dates to the drop folder on the Project Server computer. For the sample request for actuals, see FI Request.xml in the [Program Files]\ERP Connector Solution Starter\tests\CO directory on Project Server. The SapFIPlugIn component processes the request and exports the work actuals in XML and CSV files. The default directory for saving the exported actuals files is [Program Files]\ERP Connector Solution Starter\bin\actuals.

Because the XML request file only specifies the PeriodStart, PeriodFinish, and ActualsUnit child elements in the GetActualsSAP method, there are relatively few ways to create an incorrect request. If there are errors in the request file, ERP Connector logs an error and does not export any data.

For more information about exporting actuals, see ERP Connector Scenarios. For the request and export file syntax, see Plug-in: Finance Integration with Work Actuals.

Exporting Actuals for the mySAP ERP Financials CO Subsystem

In Test 2 of Table 3, resources report actuals on the basis of hours of work done per day, and project managers have approved the submitted timesheets. In both tests, the enterprise project text fields are set correctly.

Table 3. Examples of tests for exporting work actuals on a project level

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 exports an XML file that includes a header but no actuals, as follows:

The CSV file is empty.

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 Test 2, Test 3, and Test 4 of Table 4, resources report actuals on the basis of hours of work done per day. Project managers have approved the submitted timesheets. In all tests, the enterprise project text fields are correctly set.

Table 4. Examples of tests for exporting work actuals on a WBS level

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 that includes a header but no actuals. The CSV file is empty.

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 files 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 files 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 files 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.

See Also

Concepts

ERP Connector Scenarios

Plug-in: Finance Integration on a Project and WBS Level

Plug-in: Finance Integration with Work Actuals

Test Scenarios

Acceptance Tests

Additional Tests