11.5.1 Editing an Object - Server Application Tests

11.5.1.1 Editing Embedded Objects in a Server Application Started by a Client Application Test Case Svr-10

Precondition

A client application document contains an embedded object. This test is used to verify that the server application sends the latest presentation data and Native data. This test is described more fully in the section "File Update" in this chapter.

Procedure

1.Invoke edit in the client application to start the server application.

2.Change the object data in the server application.

3.Choose File Update.

The client application should have the latest presentation data from the server application.

4.Close the server application document without sending a new update.

5.Start the server application again from the client application.

Postcondition

A new server application document should be open for editing and it should have the changes that were made in the preceding procedure.

11.5.1.2 Editing Linked Object Data when the Link is Open Test Case Svr-11

Precondition

The client application document containing a linked object is open and a server application is opened with the source document. The link is open to the object and it is an automatic link.

Procedure

1.Change the object in the server application.

The client application should get the latest presentation data from the server application immediately.

2.Save and then close the document in the server application.

3.Start the server application again from the client application.

Postcondition

A new server application document should be open for editing which should have the changes made in Step 1.

Similar Cases

Try this test by starting the server application, opening the document with File Open, and establishing a link (unlike establishing it by starting the document from the client application).

11.5.1.3 Setting New Color Schemes and Updating Embedded Objects from Client Application Test Case Svr-12

This tests how the server application handles OleSetColorScheme with an embedded object. The test applies to a server application that has implemented the SetColorScheme callback function. For other server applications, check that they return an error from this function.

Since CLTEST.EXE allows sending a new color scheme, it is used as the client application in this test.

Precondition

CLTEST.EXE contains an embedded object from the server application.

The document containing the embedded object is open for editing.

Procedure

1.Start CLTEST.EXE and use the right mouse button to bring up the popup menu and choose Set Colors.

2.Choose a color scheme in the displayed dialog box. CLTEST.EXE will create and fill in the appropriate entries in the LogPalette structure and then call OleSetColorScheme to send the LogPalette structure to the server application.

Postcondition

If the server application handles OleSetColorScheme, the picture may change depending on the color combination chosen in the preceding procedure.

Update the picture from server to client to determine if the server sends a new picture to CLTEST.EXE.

Similar Test Cases

Try this case when the embedded object is not open. Choose a color scheme and open the server object. CLTEST.EXE at the time of activation will send the color combination chosen in the preceding procedure.

11.5.1.4 Setting New Target Devices and Updating Embedded Objects from a Client Application Test Case Svr-13

This tests how the server application handles OleSetTargetDevice with an embedded object. This test applies to a server application that has implemented the SetTargetDevice callback function. For other applications, check that an error is returned from this function. You can use any client application that allows the sending of a printer target device.

The following procedure uses CLTEST.EXE as the client application.

Precondition

CLTEST.EXE contains an embedded object from the server application.

The document containing the embedded object is open for editing.

Procedure

1.Start CLTEST.EXE and use the right mouse button to display the pop up menu and choose the command "Set TargetDevice".

2.Select a printer name from the dialog box.

CLTEST.EXE will get the appropriate device information for the printer device chosen and call OleSetTargetDevice to send the device information to the server application.

Postcondition

If the server application handles printer device information, the picture may change depending on the selected printer type.

Update the picture from server to client to determine if the server sends a new picture to CLTEST.EXE.

Similar Test Cases

Try this test when the embedded object is not open.

CLTEST.EXE, at the time of activation, will send the printer device information chosen in the preceding procedure. This should return the same picture as in the preceding test case.

Printer information can also be used for a linked object. Paste Link the object in CLTEST.EXE, send the printer device information, and determine if the proper picture is sent

Try it with two linked objects at the same time. Set the printer information for one object only. Make sure that both the pictures are correct. (It will be easy to see this if the pictures are different and the printer device is chosen).

11.5.1.5 Locking a Server Application with the LockServer Command Test Case Svr-14

The client application can lock or unlock the server application using OleLockServer or OleUnlockServer. Locking the server application means that the client application starts the server application and starts the system-level conversation.

A client application usually locks the server application when it wants to optimize repeated starting of the server. For example, if a client application will be doing lots of updates to objects from the same server application in one session, it is better to lock the server application and do the updates. Otherwise, the client application will have to start and restart the server application to get the updates. Locking helps by eliminating the repeated starting and closing, which speeds things up considerably.

UnlockServer will terminate the conversation. Test these two functions with a server application to make sure that the server application is started but has no open document.

This test uses CLTEST.EXE to test the server application as it allows the locking and unlocking of the server application.

Precondition

CLTEST.EXE contains an embedded object from the server application.

The server application is not running.

Procedure

1.Start CLTEST.EXE and use the right mouse button to choose the Lock Server command.

This will start the server application but may keep it hidden. If, by default, the application always appears on the screen, try to open the application and choose different commands.

2.Choose the Other/Unlock Server command in CLTEST.EXE and unlock the server. It may try to close the server application. Make sure that the application does not hang around in the system. This will be true if it was launched by LockServer and not any other command.

Similar Test Case

Try this case when the server is running.