Protocols/MSNP/Activities/SDK/Samples/SampleSetup: Difference between revisions
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:45:42 +01:00 using Anima's CHM converter based on samples/sample_setup.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= Test Environment Setup = | __NOTOC__= Test Environment Setup = | ||
Line 18: | Line 18: | ||
# Copy the application files to the Web server. In this example, the server name is ls_test_server, and the files are in a Web directory called 3t. The Web structure of the files looks like this: | # Copy the application files to the Web server. In this example, the server name is ls_test_server, and the files are in a Web directory called 3t. The Web structure of the files looks like this: | ||
# Customize the configuration file called MSGRP2P.xml, as described in the topic [[Protocols/MSNP/Activities/SDK | # Customize the configuration file called MSGRP2P.xml, as described in the topic [[Protocols/MSNP/Activities/SDK/Techref/Testing/Localxml|The Local XML File]]. Open the XML file and find the element <span class="clsElement">URL</span>. This element specifies the address from which the application can be loaded. | ||
# Copy the file MSGRP2P.xml to the program directory where MSN Messenger is installed. Typically, this directory is C:\Program Files\MSN Messenger\. The next time Messenger opens a Conversation window, it checks for the existence of the XML file. If it exists and contains valid information, a menu item is added to the <span class="clsUIElement">Actions</span> menu of the Conversation window. The menu item is called <span class="clsUIElement">Run</span><span class="clsGenericItalic"> (Name)</span> where <span class="clsGenericItalic">(Name)</span> is the contents of the <span class="clsXmlElement">Name</span> element in MSGRP2P.xml. | # Copy the file MSGRP2P.xml to the program directory where MSN Messenger is installed. Typically, this directory is C:\Program Files\MSN Messenger\. The next time Messenger opens a Conversation window, it checks for the existence of the XML file. If it exists and contains valid information, a menu item is added to the <span class="clsUIElement">Actions</span> menu of the Conversation window. The menu item is called <span class="clsUIElement">Run</span><span class="clsGenericItalic"> (Name)</span> where <span class="clsGenericItalic">(Name)</span> is the contents of the <span class="clsXmlElement">Name</span> element in MSGRP2P.xml. | ||
# Tictactoe.htm is a multiuser application, so two computers must be set up to test it. Both computers must have a copy of MSGRP2P.xml in the Messenger program directory. | # Tictactoe.htm is a multiuser application, so two computers must be set up to test it. Both computers must have a copy of MSGRP2P.xml in the Messenger program directory. |
Latest revision as of 22:45, 12 August 2022
Test Environment Setup
To set up a test environment, you will need:
- Your MSN® Messenger Activity for testing. An application consists of an HTML file and any associated files, such as images, style sheets, scripts, or ActiveX® controls.
- A Web server. For testing purposes, any type of Web server will work. The only requirement is that the application be accessible with an HTTP request.
- For single-user applications, one computer to run the Messenger client. It can be the same computer that is running the Web server.
- For multiuser applications, two computers are required to run Messenger, because only one client per computer can sign in at a time.
In the following example, the sample application, Tictactoe.htm, is tested.
- Copy the application files to the Web server. In this example, the server name is ls_test_server, and the files are in a Web directory called 3t. The Web structure of the files looks like this:
- Customize the configuration file called MSGRP2P.xml, as described in the topic The Local XML File. Open the XML file and find the element URL. This element specifies the address from which the application can be loaded.
- Copy the file MSGRP2P.xml to the program directory where MSN Messenger is installed. Typically, this directory is C:\Program Files\MSN Messenger\. The next time Messenger opens a Conversation window, it checks for the existence of the XML file. If it exists and contains valid information, a menu item is added to the Actions menu of the Conversation window. The menu item is called Run (Name) where (Name) is the contents of the Name element in MSGRP2P.xml.
- Tictactoe.htm is a multiuser application, so two computers must be set up to test it. Both computers must have a copy of MSGRP2P.xml in the Messenger program directory.
- Sign in to Messenger on both test computers.
- From one computer, send an instant message to the contact that is signed in on the other computer.
- On the other computer, click the instant message. A Conversation window is open on both computers.
- On the Actions menu of either computer, click Run Tic Tac Toe to send an invitation.
- On the other computer, accept the invitation.
- Both computers display Messenger Conversation windows running Tic Tac Toe in the Activity Window.
If the menu item, Run Tic Tac Toe does not appear on the Actions menu, Messenger could not load the MSGRP2P.xml file. Verify that the file is in the correct directory and that it contains valid XML.
If either computer displays the Activity window but does not load the application, the URL specified in the MSGRP2P.xml file may not be valid. Verify that the URL is valid and reachable by the computer.
Activities use event handlers and methods that are only available in the Launch Site environment. If you double-click an Activity file and its HTML file association causes it to display in an Internet browser, the browser may show scripting errors.
Only one Activity can be tested at a time. To test another application, change the URL and Name elements in the MSGRP2P.xml file on both computers to correspond to the new application.