Testing user-initiated operations involving Project Professional
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2016-11-14
This article discusses ways of testing operations that involve Project Professional as the main user interface. The most frequent operations belonging to this category include the following:
Open a project
Save a project
Publish a project
Microsoft Office Project Professional 2007 does not support multiple instances executing in the same user session. Therefore, in order to test many concurrent users, the use of Terminal Services is required, unless you have dozens of servers. On the other end, the Visual Studio 2008 Test Agent cannot be instantiated in multiple sessions on the same computer. Therefore it is difficult to integrate Project Professional tests in Visual Studio Team System 2008 Test Edition. However, as already mentioned, a community-based tool that can automate Project Professional tests inside multiple Terminal Services sessions was developed and is available at the Project 2007 Test Framework on the CodePlex site. The Test Framework tool implements a controller-agent architecture conceptually similar to the Visual Studio 2008 Test Edition architecture. In a nutshell, the controller pushes information about a Microsoft SQL Server database, while agents pull job information and update status information about their jobs from the same database. Every job is composed of one or more operations, implemented by using custom .NET Framework components and taking advantage of the Project Professional client object model.
The three Project Professional tests described in the following paragraphs are implemented by using the Test Framework tool, while data collection is still performed with Visual Studio Team System 2008 Test Edition running at the same time.
Access the PWA home page
You can use the Web Test Recorder tool available with Visual Studio 2008 to record all the HTTP requests occurring when a user accesses the PWA home page. Once you have recorded the Web test, you have to set up the credentials in order to simulate different users in the load scenario, and let Visual Studio randomly select a user from a list for every test run. You can bind user credentials to a data source, which can read data from a database, an XML file, a CSV file or any other possible data source that is more convenient in your scenario. As an example, you can use the resources.xml file described previously as the data source for user credentials. The same approach can be used for all the other tests also.
Open projects
The sample code included in the Test Framework CodePlex solution shows how the opening of a project from Project Professional can be automated. The code will be dynamically loaded and run by the Test Framework agent. The Open function receives two parameters as input: The first parameter is the file name of the project to be opened. (Using '*' as the file name causes the function to automatically select a project from the server-side list, in sequence order.) The second parameter is a Boolean to indicate whether the project should be open in read-only mode or in read-write mode. The function returns the number of milliseconds elapsed for the operation, or zero if there is an error. The two parameters can be set through the controller UI.
Save projects
The Resource Center test resembles the Project Center test, because it also contains the Grid ActiveX control.
Access the My Tasks page
Because Project Professional only sends the actual changes to the server when you save, in order to perform a meaningful save test, you must apply some changes to an opened project before you save it and publish it back to the server. Any meaningful change is suitable for this purpose. One simple example is to change the start date of the project, which typically affects all of the tasks in the project, thus generating a significant change set to be saved.
The sample code included in the Test Framework CodePlex solution shows several sample functions. They can be set to be run in sequence by defining a workflow in the controller application. Two examples are as follows:
A ChangeStartDate function, which picks a random date in the [today ± 30 days] range and changes the project start date to the randomly selected date
A Save function, which saves the active project. The function receives one Boolean parameter as input that can be used to skip the save operation if the active project is opened in read-only mode.
Both of the functions return the number of milliseconds elapsed for the operation, or zero if there is an error.
Publish projects
The sample code included in the Test Framework CodePlex solution shows how to automate the publishing of a project. The Publish function receives three parameters as input: The first parameter is a Boolean indicating whether the whole project (true) or only the changes (false) will be published. The second parameter indicates the optional URL for the project workspace to be provisioned. The third parameter is a Boolean indicating if the publish operation must be skipped, which would be necessary if the opened project were in read-only mode. The function returns the number of milliseconds elapsed for the operation, or zero if there is an error.
See Also
Concepts
Planning a Project Server 2007 test lab
Key metrics for Project Server 2007 performance
Setting up a Project Server 2007 test environment
Testing user-initiated read-only operations involving Project Web Access
Testing user-initiated writer operations involving Project Web Access
Testing Project Server 2007 background operations
Extracting and analyzing lab test data