Lync Synthetic Tests: What They are and When They Don’t Work – Part I
Synthetic test cmdlets are a great feature in Lync Server 2010. They allow you to test core functionality by simulating interaction between users, computers, etc. without having to fire up test workstations with the client installed. In Lync 2010 with the June 2012 updates installed, we see the following test cmdlets available:
cmdlet | purpose |
Test-CsAddressBookService | Tests the ability of a user to access the server that hosts the Address Book Download Web service. |
Test-CsAddressBookWebQuery | Tests the ability of a user to search for, and return, information from the Address Book by using the Address Book Web Query service. |
Test-CsAVConference | Tests the ability of a pair of users to take part in an audio/video (A/V) conference. |
Test-CsCertificateConfiguration | Returns information about the Microsoft Lync Server 2010 certificates being used on the local computer. |
Test-CsClientAuth | Determines whether or not a user can log on to Microsoft Lync Server 2010 by using a certificate downloaded from the certificate provisioning service. |
Test-CsComputer | verifies the status of the Microsoft Lync Server 2010 services running on the local computer. The cmdlet also verifies that the appropriate Lync Server 2010 Active Directory groups have been added to the corresponding local groups on the computer, and that the necessary computer firewall ports have been opened. |
Test-CsDialInConferencing | Checks to see if a user can take part in a dial-in conferencing session. |
Test-CsDialPlan | Tests a telephone number against a dial plan (formerly known as a location profile) and returns the normalization rule that will be applied to the number as well as the translated number after the normalization rule has been applied. |
Test-CsFederatedPartner | Verifies the ability to connect to a federated domain. |
Test-CsGroupExpansion | Tests the ability of a user to employ group expansion. Microsoft Lync Server 2010 enables users to configure an Active Directory distribution group as a contact. When you “expand” a group you will see the name and presence information for each member of the group. |
Test-CsGroupIM | Tests the ability of two users to conduct an instant messaging (IM) conference. Test-CsGroupIM is a “synthetic transaction”: a simulation of common Microsoft Lync Server 2010 activities used for health and performance monitoring. |
Test-CsIM | Tests the ability of two users to exchange instant messages. |
Test-CsKerberosAccountAssignment | Verifies the configuration of the Kerberos account assigned to a site. |
Test-CsLisCivicAddress | Tests one or more civic addresses against the Master Street Address Guide. |
Test-CsLisConfiguration | Tests the Location Information Server (LIS) configuration. |
Test-CsLocationPolicy | Runs a test to determine the location policy that will be used based on the criteria specified in the parameter values. The location policy contains the settings that will determine whether and how Enhanced 9-1-1 (E9-1-1) will be applied. E9-1-1 enables those who answer 911 emergency calls to determine the caller’s geographic location. |
Test-CsMcxConference | Tests the ability of three users to participate in a Microsoft Lync Server 2010 Mobility Service conference. The Mobility Service enables users of mobile phones such as iPhones and Windows Phones to do such things as exchange instant messages and presence information; store and retrieve voice mail internally instead of with their wireless provider; and take advantage of Microsoft Lync Server 2010 capabilities such as Call via Work and dial-out conferencing. |
Test-CsMcxP2PIM | Tests the ability of a pair of users to exchange instant messages by using the Microsoft Lync Server 2010 Mobility Service. The Mobility Service enables users of mobile phones such as iPhones and Windows Phones to do such things as exchange instant messages and presence information; store and retrieve voice mail internally instead of with their wireless provider; and take advantage of Microsoft Lync Server 2010 capabilities such as Call via Work and dial-out conferencing. |
Test-CsMcxPushNotification | Verifies that the push notification service is working. The push notification service (Apple Push Notification Service and Microsoft Lync Server 2010 Push Notification Service) provides a way to send notifications about events such as new instant messages or new voice mail to mobile devices like iPhones and Windows Phones, even if the Microsoft Lync 2010 application on those devices is currently suspended or running in the background. |
Test-CsOUPermission | Verifies that the required permissions needed to manage users, computers, and other objects have been set on the specified Active Directory container. |
Test-CsP2PAV | Tests the ability of a pair of users to conduct a peer-to-peer audio/video (A/V) call. |
Test-CsPhoneBootstrap | Verifies that a user can log on to Microsoft Lync Server 2010 using a Microsoft Lync 2010 Phone Edition-compatible device. |
Test-CsPresence | Tests the ability of a user to log on to Microsoft Lync Server 2010, publish his or her presence information, and then subscribe to the presence information published by a second user. |
Test-CsPstnOutboundCall | Tests the ability of a user to make a call to a phone number located on the public switched telephone network (PSTN). |
Test-CsPstnPeerToPeerCall | Tests the ability a pair of users to conduct a peer-to-peer call over the public switched telephone network (PSTN) gateway. |
Test-CsRegistration | Tests the ability of a user to log on to Microsoft Lync Server 2010. Test-CsRegistration is a “synthetic transaction”: a simulation of common Lync Server 2010 activities used for health and performance monitoring. |
Test-CsSetupPermission | Verifies that the required permissions needed to install Microsoft Lync Server 2010 or one of its components have been configured on the specified Active Directory container. |
Test-CsTopology | Verifies service activation and group permissions for your installation of Microsoft Lync Server 2010. |
Test-CsTrunkConfiguration | Validates a trunk configuration against a phone number. |
Test-CsVoiceNormalizationRule | Tests a telephone number against a voice normalization rule and returns the number after the normalization rule has been applied. Voice normalization rules are used to convert a telephone dialing requirement (for example, you must dial 9 to access an outside line) to the E.164 phone number format used by Microsoft Lync Server 2010. |
Test-CsVoicePolicy | Tests a telephone number against a voice policy and determines which voice route would be used against that policy for that number. |
Test-CsVoiceRoute | Tests a telephone number against a voice route number pattern and returns a Boolean (true/false) value stating whether the supplied number matches the number pattern for the route. Number pattern is just one of the properties used by voice routes to tell Microsoft Lync Server 2010 how to route calls from Enterprise Voice users to phone numbers on the public switched telephone network (PSTN) or a private branch exchange (PBX). |
Test-CsVoiceTestConfiguration | Runs test voice configurations to ensure voice routing and policies work as expected. |
Test-CsVoiceUser | Identifies the route that a phone call from a given user would take to be completed based on voice rules, routes, and policies. |
Test-CsWebApp | Verifies that authenticated users can use the Microsoft Lync Web App to join a Microsoft Lync Server 2010 conference. |
Test-CsWebAppAnonymous | Verifies that anonymous users can use the Microsoft Lync Web App to join a Microsoft Lync Server 2010 conference. |
However, it should be noted that the last two shouldn’t be used in Lync 2010. And, with the June 2010 updates installed, Test-CsClientAuth appears to be broken.
The user related test cmdlets can be run one of two ways. You can manually specify users when calling the cmdlet, such as
Test-CsIm -targetFqdn [front end pool FQDN] -SenderSipAddress [string] -ReceiverSipAddress [string]
or, you can configure two accounts to always be used with user-related synthetic tests. This is done with New-CsHealthMonitoringConfiguration. Lync MVP and MCM Tim Harrington has a good article on setting this up: Configuring Accounts for Synthetic Transactions in Lync Server 2010. Once configured, you can then run tests with a much shorter command line.
Test-CsIm -targetFqdn [front end pool FQDN]
You can also use the synthetic test accounts when Using the Lync Topology Validator, although when doing this, you can’t disable the accounts as Tim’s article mentions. Additionally, you can configure synthetic tests in System Center Operations Manager (SCOM) for more detailed monitoring and reporting.
Synthetic tests work great and are a great tool when setting up and configuring Lync Server as they cut down on the time you need to log into Lync from test workstations and test functionality by IMing yourself. However, they should not be used as a complete replacement for enduser testing.
An important note about most of the synthetic tests is that they need to be run from a true Lync Server. That’s because they look for topology information in the (local)\rtclocal database, which only exists on Lync servers. It’s not on management workstations with the Lync Management Tools installed, SQL servers, etc. And the errors you may get can be ambiguous enough to have you thinking that your Lync SQL server is down. Here’s an example. We run the Test-CsCertificateConfiguration cmdlet from a management workstation. It fails:
We open the log file, and we notice that it’s trying to connect to (local)\rtclocal:
But notice the error text in red.
When we head over to an Enterprise FrontEnd server and run the same cmdlet, we get the results we expect:
As you can see, the synthetic test cmdlets can be a powerful tool when run from the right location. In the second part of this series, I cover an issue with the naming convention for synthetic test accounts.
Follow Me