Export (0) Print
Expand All

Test user-initiated operations that involve Project Professional 2013

Published: July 16, 2012

Summary:  Learn about operations involving Project Professional as the main user interface.

Applies to:  Project Server 2013 

The most frequent operations that belong to this category include the following:

  • Open a project

  • Save a project

  • Publish a project

Project Server 2013 does not support multiple instances executing in the same user session. Therefore, in order to test many concurrent users, 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 user session. This would make it very difficult to integrate Project Professional tests in Visual Studio Team System 2008 Test Edition. However a community-based tool able to automate Project Professional tests inside multiple Terminal Services sessions has been developed and is available at Microsoft Project 2010: Project Server Stress Testing (http://go.microsoft.com/fwlink/p/?LinkId=190625) in the MSDN Code Gallery. The Thick Client Test Framework tool implements a controller-agent architecture that is conceptually similar to the Visual Studio 2008 Test Edition architecture. In all, the controller pushes information about a 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 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. Data collection is still performed with Visual Studio Team System 2008 Test Edition running at the same time.

Access the Project Web App home page

You can use the Web Test Recorder tool available with Visual Studio to record all the HTTP requests occurring when a user accesses the PWA home page. Once you have recorded the web test, set up the credentials in order to simulate different users in the load scenario. Then 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 or CSV file, or any other data source that is convenient for you. As an example, you can use the Resources.xml file described above as the data source for user credentials. The same approach can be used for all the other tests also.

Open projects in the Project Server 2013 test environment

The sample code included in the "Thick Client Test Framework" in the "Project Server 2013 Stress Testing" solution shows how the opening of a project from Project Professional can be automated. The code is dynamically loaded and run by the Test Framework agent. The Open function receives two parameters in 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 or in read-write mode. The function returns the number of milliseconds elapsed for the operation, or zero in case of error. The two parameters can be set through the controller UI.

Save projects in the Project Server 2013 test environment

The Resource Center test resembles the Project Center test, because it also contains the JavaScript Grid control.

Access the My Tasks page

Project Professional only sends the actual changes to the server when it saves. Therefore, in order to perform a meaningful save test, you have to apply some changes to an opened project before you save it back. One's imagination is the only limit to what can be done for generating meaningful changes before you save. One simple example is to change the start date of the project, which typically affects all of the tasks in the project, which generates a significant change set to be saved.

The sample code included in the Test Framework CodePlex solution shows several sample functions, which can be set to be run in sequence by defining a workflow in the controller application. Two examples are as follows:

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

  2. A Save function, which saves back 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 in case of error.

Publish projects in the Project Server 2013 test environment

The sample code included in the "Thick Client Test Framework" in the "Project Server 2013 Stress Testing" solution shows how to automate the publishing of a project. The Publish function receives three parameters as input. The first parameter is a Boolean that indicates whether the whole project (true) or only the changes (false) will be published. The second parameter indicates the URL for the optional URL for the project workspace to be provisioned. The third parameter is a Boolean that indicates whether the publish operation needs to be skipped in case the opened project is in read-only mode. The function returns the number of milliseconds elapsed for the operation, or zero in case of error.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft