Friday, 20 December 2013

Microsoft Test Manager - Test Scribe Exporting test cases in to Excel or Word - Unexpected Behaviour

While opening a test plan summary document in Office, if you get the warning: “The file Test Plan Summary cannot be opened because there are problems with the contents” (with Details: ‘The file is corrupt and cannot be opened’), click ‘OK’. Then, click ‘Yes’ to recover the contents of the document. This will then open the document in Office. The same problem is not found in Office 2010 an 2013.
Here is the solution.
Note: all manipulation can be performed with closed MTM
1) Go to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\TeamTest
and found
2) Open it with WinZip or another archiver (possible with .zip extension addition)
3) Open for Edit \TestPlan\
4) and remove all test fragments ".ToPlainText()"
Another scenario - to get file from MTM 2010 to replace in MTM 2012
5) Save file and try to Generate report.
Now you will be able to generate reports using test scribe. 

One bad thing in TestScribe is it will consume more system resources while generating reports. So MTM, or at least Test Scribe, doesn't appear to be designed to be conservative in its use of memory, and when memory is tight it sometimes behaves in less than optimal ways. We don't see anything complex in these reports that would require that much RAM.  The reports are requiring a simple process like a list of Test Cases is built, a single Test Case is opened, maybe a Shared Step is opened as well, copying the text from the test case, formatting is done, it's written to a file, and then everything is closed, proceed to the next Test Case. 

Let's hope, in next releases TestScribe may overcome these issues.

Sunday, 8 December 2013

Common Tasks for Web Application Testing

1) Launching Browsers
    How you can run web browsers from your tests.
2) Navigating to Web Pages
    How to navigate to web pages in a running browser.
3) Waiting For Web Pages
     Approaches to waiting until a web page finishes loading.
4) Checking if Browser Is Running
    How to check whether the web browser is running from your tests.
5) Closing Browsers
    How to close the web browser from your tests.
6) Finding Objects on Web Pages
    Methods for locating web page elements.
7) Using Checkpoints With Web Controls
     How you can verify web pages and web page elements.
8) Handling Dynamic Identifiers
    How to identify web objects whose identifier changes dynamically.
9) Testing Dynamic Web Pages
     Testing web pages whose contents change dynamically.
10) Accessing Native Web Attributes and Methods
      How you can use native attributes, properties and methods of web page elements in your tests.
11) Handling JavaScript Popups and Browser Dialogs
      How you can automate modal dialog boxes such as JavaScript alerts, prompts, confirmations and so on.
12) Accessing DOM document Object
      How you can access a web page’s DOM document object and use it in your tests.
13) Executing JavaScript on Web Pages
      How you can run arbitrary JavaScript code on a tested web page.
14) Changing Browser Settings from Tests
      How you can read and modify browser settings as part of your tests.

Saturday, 7 December 2013

Testcomplete Android Testing Features

source: SmartBear 
Mobile tests can be created as keyword tests, scripts or a mix of both. A test consists of a sequence of operations with the device and objects of the tested application. Test operations include, but are not limited to -
  • Touching controls (including long touches).
  • Simulating dragging and swiping events.
  • Simulating keystrokes.
  • Pressing on-device (physical) buttons.
  • Emulating GPS locations.
  • Controlling sensor values.
  • Performing various verifications and checks.
  • Installing applications on tested devices and starting activities.
  • And more.
When you perform various actions in this window like touches, swipes or keystrokes, TestComplete passes them to the device, emulator or virtual machine under test. Similarly, any changes on the device screen are reflected in this window. In other words, you can use the Mobile Screen window to work with the mobile device, emulator or virtual machine without accessing this device, emulator or virtual machine.
The Mobile Screen window makes the device screen as accessible as your computer’s desktop. For instance, creating a keyword-test operation or checkpoint may require selecting an Android control from the device screen. To do this, you display your application in the Mobile Screen window and then choose the needed control from it in the same way as if you chose the control from the desktop. 

Recording and Playing Back Gestures

Multi-touch events (gestures) are complex events that cannot be recorded in TestComplete’s Mobile Screen window. To record them, you need to use a physical mobile device like a phone or a tablet and switch TestComplete to a special mode in which it can register such events.
TestComplete records gestures as “movies” and stores them in the Android Gestures project item. You can then play back the gestures from scripts or keyword tests or do this in the Mobile Screen window.
For complete information on working with multi-touch events, see the topics of the Simulating Multi-Touch Events (Gestures) section.

Object Hierarchy and Object Properties

The top-level test object for mobile testing is Mobile. It contains methods and properties for accessing and enumerating mobile devices to which TestComplete is connected. You can see these methods and properties in the Object Browser:
The Mobile object has child Device objects that correspond to the connected mobile devices, emulators and virtual machines (see the image above). The properties of these objects provide information about the device and the operating system version installed on them. Methods help you simulate various test actions on the device: swipes, keystrokes, pressing physical (on device) buttons and so on.
The object hierarchy below the Device object depends on your application type:
  • If your Android application is a white-box application, you will see a hierarchy of application objects. TestComplete detects the controls’ class names and identifiers and uses them to name the test objects: TextView("textView1"), EditText("editText1"), Layout("verticalLayout1") and so on.
    For detailed information on naming objects and creating tests, see Creating Tests for White-Box Android Applications.
  • If your Android application is a black-box application, you will not see test objects under the Device item. For these applications, TestComplete does not create test objects that are wrappers for mobile controls, nor does it provide access to native methods and properties of these controls. To work with mobile application controls, TestComplete uses images of the controls stored in the Image Repository. To get access to images in tests, you use the following syntax:
Here, ImageRepository is the reserved name of the top-level ImageRepository object that provides access to the repository data, ImageSetName is the name of the image set as you can see it in the Project Explorer panel, and ItemName is the name of the desired item (control) in the image set. The “item” objects provide methods for interacting with the corresponding control. 

Testing Android Applications with TestComplete

TestComplete supports testing of mobile applications built for the Android operating system. This topic helps you get acquainted with the Android testing functionality supported by TestComplete.
Requirements and Preparations
Before you start creating and running tests for your Android applications, you need to perform a number of actions:
  • TestComplete works with Android devices via Android Debug Bridge. This Bridge comesup with Android SDK package. To create tests for your mobile apps, you have to download and install the Android SDK on your test computer. Also, you need to install Java runtime environment and modify certain TestComplete settings. You should also check whether the needed TestComplete plug-ins are installed and active.
  • There is no need to install special packages on devices, emulators and virtual machines in order for them to be “visible” to TestComplete. However, you may need to enable certain Android developer settings on the device. If you are using an Android virtual machine, you need to make sure it is available on the local network.
Also, it is recommended to install TestComplete Android Agent on the device. It's a helper utility that is shipped along with TestComplete. It is needed to test white-box Android applications. Also, it simplifies testing geolocation activities and simulating keystrokes.
  • TestComplete can test any Android applications running on the Android versions mentioned above, including those applications that do not have the android:debuggable attribute in their manifests. In other words, with TestComplete, you can test even release builds of your applications.
It is recommended to prepare Android applications for testing. In this case, TestComplete will be able to recognize individual controls in the tested applications, detect their type and offer control-specific methods and properties for easier simulation of user actions on the controls. TestComplete will also be able to access the controls’“native” methods and fields. All these will help you create robust tests that will run on various devices.

Saturday, 30 November 2013

Test complete - Access to feature, HASP protection key or functionality denied

In testcomplete, you will get this message when you tried to launch an instance of Testcomplete.
If smartbear HASP license manager is installed in your machine and you are connected with internet,you wont get this message

When Testcomplete process started, it communicates with smartbear servers for testcomplete license verification.
If you have a genuine license, you wont get this message.
Still, you are getting this issue, please verify your internet connection settings.

Testcomplete - Creating Mobile Browser Profiles

Mobile browser profiles to be used in tests are specified in the Open Applications | Web Testing | Virtual Browsers settings of a test project. TestComplete includes predefined emulation profiles for the browsers used in Apple iPhone and iPad, Samsung Nexus, Nokia Lumia and other devices. You can also create custom browser profiles for other devices and orientations.
To add a mobile browser profile to your test project:
  • Go to Tools | Current Project Properties.
  • Select the Open Applications | Web Testing | Virtual Browsers category.

  • Click Add.
In the dialog that appears, enter the following:
  • The browser screen size, in CSS pixels (used in CSS declarations such as font-size:14px).
    The browser screen size is not necessarily the same as the device’s physical screen size. For example, Apple devices with Retina displays have double pixel density and display 1 CSS pixel using 4 physical pixels (2×2). While iPhone 5’s physical resolution is 1136×640, its browser screen size is 568×320 CSS pixels.
    For common mobile browser screen sizes, refer to:
    Specify the browser screen size according to the needed orientation - portrait or landscape. For example, if the browser screen size is 480×320:
    • For portrait orientation, use Screen width = 320 and Screen height = 480.
    • For landscape orientation, use Screen width = 480 and Screen height = 320.

  • The browser name that will be used in tests. It can be the same as the mobile device’s name. Examples: Kindle Fire HD, iPad landscape, Android 4.2 - Nexus 4.

  • Click OK to close the dialog.
  • Tick the Enable check box. If you leave it unchecked, the browser will not be available in the Run Virtual Browser and Virtual Browser Loop keyword test operations, and in the VirtualBrowsers scripting object.
  • Save the project.
You can also define custom browser profiles in Default Project Properties. In this case, your custom profiles will be automatically added to any new test project you create.

Solution - TestComplete Chrome Extension is not Installed or is Disabled

TestComplete retrieves data from Google Chrome via a special extension which is installed into the browser. This message is shown when TestComplete is unable to access the extension. Possible causes and solutions are listed below:
The extension is disabled:
  • Launch Chrome.
  • Open the Extensions page: select Tools | Extensions from Chrome's main menu or enter chrome://chrome/extensions/ into the address box.
  • In the list, find SmartBear TestComplete Extension and turn on the Enabled option.
The extension was not installed:
The TestComplete Chrome Support is installed only if the Chrome browser is already installed for the current user.
To add the TestComplete Chrome Support afterwards, you can perform the following steps:
  • Install Chrome.
  • Modify the existing TestComplete installation by re-selecting the Open Applications Support feature in the Select Features screen.
  • Proceed with the installation.
The extension was removed from Chrome:
Once the extension was removed from Chrome, it is added to a sort of a blacklist. To revert this and re-install the extension, you need to perform the following actions:
  • Open the Extensions page in Chrome.
  • Navigate to the <Program Files>\<Common Files>\SmartBear\tcCrExtension\<alphanumeric_ID> folder and locate the extension file - the tcCrExtension.crx file. This is the packed TestComplete Extension.
  • Drag the tcCrExtension.crx file to the Extensions page.
  • Confirm the installation when prompted.


Copyright @ 2013 Software Quality Assurance.

Designed by SQAGeek & Sponsored By SqaGeek