PCD Test Tools The subfolders of this directory contain the install builds for the following tools: BnwsTest command line tool ImgMaker (formerly PxTkImgMaker) PunchingBag toolkit simulation server BACnetWsPlusTester.exe (formerly known as PcmWsTest) NucleusWs proxy server for published data The installation/release builds of these tools can be found in the unit_test area of SVN, at https://svn.eaton.com/svn/pcm-tk/trunk/unit_test/soapsvr/win32 and the source code projects can be found at All of these tools are C# based and were developed with Visual Studio.NET 2005 (and.net 2.0 technology). The PunchingBag and NucleusWs are ASP.NET-based and should be placed under an IIS server. These tools provide various test functions for the Power Chain Device Toolkit web services (BACnetWS+). BnwsTest 1. Tool type: command-line web service tester 2. Tests: single BACnetWS+ web service methods from command-line arguments 3. Best for: o early development, when you want to see the effect of a single ws method call o script-driven testing 4. Other features: o Saves its configuration parameters (eg, target URL), so they don t have to be entered on every command. o Typing BnwsTest.exe with no arguments will cause it to print out its extensive usage message (see below) o Typing BnwsTest cmds will show which WS methods are implemented, and the arguments each requires.
5. Usage message: Program BnwsTest.exe -- Version 1.2.0.12 -- Usage: BnwsTest -h -? -- provide Usage information BnwsTest [-U<URL>] [-L<name:psswd>] [-A+ -] [-O<options>] [-S] where <URL> is the path to the web services <name:psswd> are the login name and password -A+ turns on Async methods, -A- uses Synchronous <options> is the string of options to send with each method Use "persist" option to set persistently into the CDS -S means to Save these settings BnwsTest cmds show supported web service methods and their usage BnwsTest <method> [<path> [<value>]] BnwsTest <method> [<path1;path2;...> [<value1;value2;...>]] Run <method> with the given path(s) and value(s) You may add cmd options before the <method> Examples: BnwsTest -A+ getvalue /:Children BnwsTest setvalues /DevA/Limit;/DevB/State 1234;stop BnwsTest [-(options)] <list rlist vlist rvlist> <path> List the nodes starting at <path> in this way: list: List the attributes and children of <path> rlist: Recursively list " " " at and below <path> vlist: List just the values of the children of <path> rvlist: Recursively list the values of all nodes below <path> Current settings: <URL> = http://10.222.51.97/bacnetwsplus/publisher <name:psswd> = admin:admin Async = false <options> = locale=en-us Installing BnwsTest: 1. Get the setup.exe and BnwsTest_Install.msi files from the SVN server. 2. Run the setup program. It will install the program at C:\Program Files\Eaton Corporation\BnwsTest 3. Use the shortcut placed under your Programs menu to get to the folder, and use the WebService Command Prompt shortcut to open a DOS session to run the program.
ImgMaker Tool type: GUI with built-in Discovery and Simulation functions Tests: Only uses a few BACnetWS+ methods, but is useful for testing the data contents of a Power Chain Device server and for testing extensive BACnetWS+ client-server interaction Best for: o Discovery: viewing the tree of devices and their data points ( nodes ) with all BACnetWS+ attributes displayed o Simulation: Can download a full set of device data to a Power Chain Device server (using the Test methods, which are Eaton extensions) o Save, Edit, Playback: Can save a SnapShot of the device tree, edit it with an XML editor, and then download the updated contents for a new simulation Other features: o The user can alter individual data Values and some Eaton-extension attributes and update the server with these new values. o User can change the configuration (eg, target URL) via Configure dialog The three panels here display a complete data hierarchy in 3 stages: a) The Device hierarchy presented by the Power Chain Device server b) The nodes for a selected device c) The Attributes of a selected node, with edit fields
Installing ImgMaker: 1. Get the files under unit_test\soapsvr\win32\imgmaker from the SVN server. 2. Run the setup program. It will install the program in a hidden location on your PC. 3. Use the shortcut placed under your Programs menu to run the ImgMaker program. Setting up MS Internet Information Services (IIS) and ASP.NET: For the PunchingBag Server, NucleusWs Server, and BACnetWsPlusTester, it is necessary to have IIS running and properly configured for ASP.NET. Follow these steps to do this: 1. Verify that IIS is installed. a. Control Panel -> Add or Remove Programs -> Add/Remove Windows Components -> Internet Information Services (IIS). 2. Verify that the computer has ASP.NET version 2.0 (Available from Windows Update). 3. Integrate ASP.NET into IIS. If your PC has not had ASP.NET integrated into IIS already, you ll need to register it with this command line: a. Open a DOS Command prompt session. b. Enter the command C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -enable -i c. For help with this tool, look for the topic ASP.NET IIS Registration Tool (Aspnet_regiis.exe) in MSDN. 4. Open the IIS manager: a. From the Start Menu, select Programs->Administrative Tools->Internet Information Services, or b. Open a Command window and enter the command inetmgr or c. Start the Computer Management tool and go to Services and Applications->Internet Information Services 5. Configure default settings for Web Sites a. Navigate to Web Sites ->Default Web Site in the IIS Manager, and open its Properties.
b. Navigate to the ASP.NET tab and set to version 2.0 c. Navigate to the Directory Security tab->anonymous access and authentication and enable Anonymous access and Integrated Windows authentication 6. Add the right hosts to Security Settings for the web server root: a. Browse to C:\Inetpub\wwwroot (or wherever your default web server is located)
b. Right click on that folder and select Sharing and Security c. Under the Security tab: i. Verify that the ASP.NET Machine Account exists with Full Control ii.verify that the Internet Guest Account (IUSR_your_machine_name) exists with Read & Execute privileges. d. Under the Sharing tab: i. Verify that you are sharing this folder as wwwroot$ or wwwroot. 7. Set the Windows Firewall settings to allow web server port 80: a. From Control Panel->Windows Firewall->Advanced tab->local Area Connection->Settings, on the Services tab as shown here enable (check) the Web Server (HTTP) entry.
8. For a test, to leave aside ASP.NET configuration questions, just try to access the root of the web server: http://10.222.51.98 (whatever your PC s IP address is). It should take you to either default page: http://10.222.51.98/localstart.asp or http://10.222.51.98/iisstart.asp (for IE or non-ie browsers, respectively).
PunchingBag Tool type: ASP.NET web service application (new style; see Introduction to Web Application Projects http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/wap.asp ) Tests: Simulates a Power Chain Toolkit-enabled server Best for: o Validating BACnetWS+ client programs o Simulating a BACnetWS+ server when you don t have real hardware available Other features: o Useful in debugging client programs; if you run it from VS in debug mode, you will see the error messages printed out or can single-step and examine problem areas. (Since it s a server, there s no real picture to show; here is the IIS Admin Tool s view of it:) Installing the PunchingBag server: 1. See the section above Setting up MS Internet Information Services (IIS) and ASP.NET 2. Obtain the PunchingBag directory from SVN or by other means. 3. Place the folder on your computer at a permanent location (C:\Inetpub\wwwroot\PunchingBag is recommended) 4. Using IIS Admin Tool, right click Default Web Site (local computer -> Web Sites) and select New -> Virtual Directory 5. In the dialogs that follow: a. Alias = PunchingBag b. Directory = location of PunchingBag (C:\Inetpub\wwwroot\PunchingBag for example) c. Access Permissions: Read, Run Scripts 6. Select the new PunchingBag site and verify that its Properties are like these:
Make sure that, on the ASP.NET tab, the ASP.NET version selected is 2.0.
BACnetWsPlusTester.exe (PcmWsTest) Tool type: GUI with fixed test scripts Tests: Provides unit testing of the web service methods, making calls and validating the responses Best for: Validating BACnetWS+ web services implementation and regression testing of web services Other features: o Saves the results in a color-coded RTF log file, PcmWsTestLog.rtf o User can select which group of tests to run o User can change the configuration (eg, target URL) via Configure dialog o Shows Published data results on a second tab and in a second log file, PcmWsPublishedDataLog.rtf Installing the BACnetWsPlusTester and NucleusWs server: 1. See the section above Setting up MS Internet Information Services (IIS) and ASP.NET 2. Install NucleusWs per the directions in the next section. NucleusWs is a required component of BACnetWsPlusTester. 3. Get the files under unit_test\soapsvr\win32\pcmwstest from the SVN server. 4. Run the setup program. It will install the program in a hidden location on your PC. 5. Use the shortcut placed under your Programs menu to run the BACnetWsPlusTester program. 6. Be sure to start with (the menu) File->Configure and set the correct IP address for both your Target Device URL and the Published Reply URL; the latter uses the IP address of the PC where you have installed NucleusWs and BACnetWsPlusTester. 7. Publishing Ping Test for.net Remoting You can quickly validate whether you have the TestNucleusWs web server and.net Remoting correctly configured and authorized by using the Publishing Ping Test under the Manual Tests of BACnetWsPlusTester s menu. Success or failure is indicated by messages on both the main Command Output tab and the Published Data tab.
NucleusWS Tool type: ASP.NET web service application Tests: Receives published onupdate calls from the web server, and, using.net Remoting, gets the data back to the BACnetWsPlusTester program. Best for: o As a critical adjunct to BACnetWsPlusTester.exe, validates the publishing of data from a BACnetWS+ server. o As the BACnetWsPlusTester triggers subscription and data changes in the web server, this small web server applet receives the published data updates, alarms, and events and feeds them back into BACnetWsPlusTester (on the Published data tab). Installing the NucleusWs server: 8. See the section above Setting up MS Internet Information Services (IIS) and ASP.NET 9. Obtain the NucleusWs directory from SVN or by other means. 10. Place the folder on your computer at a permanent location (C:\Inetpub\wwwroot\TestNucleusWs is recommended) 11..NET Remoting for NucleusWs You will need to make one configuration change to get.net Remoting correctly configured to receive published data back. This change is in the Web.config file in the TestNucleusWs folder. a. Open the file Web.config with Notepad. b. Toward the end of the file is this section: <applicationsettings> <NucleusWs.Properties.Settings> <setting name="remoteconfigfile" serializeas="string"> <value>c:\inetpub\wwwroot\testnucleusws\wslistenerclient.exe.config</value> </setting> </NucleusWs.Properties.Settings> </applicationsettings> Make sure that the yellow highlighted area contains the actual path to your TestNucleusWs folder, where the WsListenerClient.exe.config file is to be found. This setting tells NucleusWs where to look for the.net Remoting configuration file that describes the.net Remoting configuration that is agreed upon between NucleusWs and BACnetWsPlusTester. 12. Using IIS Admin Tool, right click Default Web Site (local computer -> Web Sites) and select New -> Virtual Directory 13. In the dialogs that follow: a. Alias = TestNucleusWs b. Directory = location of NucleusWs (C:\Inetpub\wwwroot\TestNucleusWs for example) c. Access Permissions: Read, Run Scripts
14. Select the new TestNucleusWs site and verify that its Properties are like these: Make sure that, on the ASP.NET tab, the ASP.NET version selected is 2.0. 15. Security: Verify that Integrated Windows Authentication is enabled, from IIS Manager for TestNucleusWs-> Properties->Directory Security->Anonymous access and authentication control, as shown in the next figure: