Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Additional Tests
Collapse the table of content
Expand the table of content

Additional Tests

Office 2007

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.

After you run acceptance tests for each of the plug-in components of the ERP Connector Solution Starter for Microsoft Office Project Server 2007, you can be reasonably certain that the components you install behave as expected when you provide them with data as expected. It is also a good idea to run tests for data and situations that you do not expect.

NoteNote

A detailed explanation of software testing is beyond the scope of this article. Although it is not possible to completely test a software application (that would involve testing all possible valid and incorrect inputs in all possible environments), you can and should include a reasonable number of tests of likely inputs that are not valid in your normal environment.

The ERP Connector components use standard Web methods of the Project Server Interface (PSI). It is possible to change or delete Project Server data by using PSI calls, which can damage your organization's processes or result in costly delays while you restore data that should not have been changed. One purpose of testing is to help reduce those possibilities to acceptably low levels.

The ERP Connector plug-in specifications define error handling, and the plug-ins process as much data as possible. When an ERP Connector plug-in encounters an error, it logs the error and proceeds with processing the rest of the data. To test error handling, you should create and perform tests where incorrect data is mixed with correct data. The malformed XML structure and incorrect input data tests use the SapHRPlugIn component as an example.

Following are two recommended tests for XML input files with incorrect tags:

  • Tag with incorrect spelling   Create an XML file with a spelling error in the XML structure. For example, the sample test file 10R_10M_1S_unsupportedTag.xml has a tag named <FIRSTNAME>; change it to <FIRTNAME>.

    Result   The SapHRPlugIn component validates the input XML structure against an XML schema. The XML structure is not valid; SapHRPlugIn cancels execution of that resource record and logs a warning. Figure 1 shows the warning message in the Event Properties dialog box for the test with 10R_10M_1S_unsupportedTag.xml.

  • Extra tag   Create an XML file with an extra tag. For example, in the sample test file 10R_10M_1S_unsupportedStructure.xml, add an extra <PERNO> tag in the last resource mapping.

    Result   SapHRPlugIn validates the input XML structure against an XML schema. The XML structure is not valid; SapHRPlugIn cancels execution of that resource record and logs a warning.

The Windows Event Viewer in Figure 1 shows custom event logs, including the default SAPMSP log for ERP Connector components. The log name in the SapHrPlugIn.config file is changed from the default value to SAPHRPlugIn, as follows: <Logging Name="SAPHRPlugIn" Level="Info" />. For more information, see Configuring the ERP Connector.

NoteNote

If you change a log name in one of the ERP Connector configuration files, you must restart the Event Viewer after events are added to see the new log.

Figure 1. Warning events in an Event Viewer custom log

Warning events in an Event Viewer custom log

The following test shows how SapHRPlugIn handles an error for incorrect data:

  • Replace number value with text value   In the sample test file 10R_10M_1S_incorrectData.xml, include text in place of a number value for the cost rate of the last resource.

    Result   SapHRPlugIn validates the input XML structure according to the XML schema. SapHRPlugIn processes all of the resources but does not process the resource with incorrect data, and it logs a warning.

SapHRPlugIn and other plug-in components rely on correct configuration of Project Server. Although SapHRPlugIn creates the lookup table and resource custom fields specified in the SapHRPlugIn.config file, it cannot check whether the user has correctly configured other custom fields. SapHRPlugIn tries to write to the specified custom fields. If the write operation fails, the plug-in generates an error that something has failed, and it logs the error. For an example, see Errors in Validating Lookup Tables in Configuring the ERP Connector.

Show:
© 2015 Microsoft