Thursday, January 5, 2017

Microsoft CodedUI Test Automation


Links:

·         http://codeduiadda.blogspot.in

       http://codeduitutorial.blogspot.in

       https://blogs.msdn.microsoft.com/gautamg/tag/coded-ui-test/










·         http://amir-shenodua.blogspot.in/2012/01/best-practices-for-coded-ui-tests.html

Coded UI Test Basic Walkthrough

http://www.dotnetfunda.com/articles/show/1241/coded-ui-test-basic-walkthrough


Analyzing Coded UI Tests Using Coded UI Test Logs

https://msdn.microsoft.com/en-us/library/jj159363.aspx

Specifying Test Settings for Visual Studio Tests

https://msdn.microsoft.com/en-us/library/ee256991.aspx




Selenium components for Coded UI Cross Browser Testing

https://marketplace.visualstudio.com/items?itemName=AtinBansal.SeleniumcomponentsforCodedUICrossBrowserTesting
https://www.youtube.com/watch?v=jcELt9WWuqA


  CodedUI readily does not support XPath Traversal,  but we can download a supporting dll and add its support. 






Dll is  html-agility-pack,  can be downloaded http://html-agility-pack.net/?z=codeplex

https://blogs.msdn.microsoft.com/gautamg/2011/12/28/sample-xpath-utility-for-coded-ui-test/



Note:
FilterProperties are  not applicable or used in Window and WPF Controls but are used in HtmlControls a lot 


Best practices for codedui automation:
https://msdn.microsoft.com/en-us/library/dd380782.aspx


Default value of PlaybackSettings :

  • Playback.PlaybackSettings.DelayBetweenActions :100
  • Playback.PlaybackSettings.ContinueOnError :False
  • Playback.PlaybackSettings.ImeLanguageList :System.Collections.Generic.List`1[System.Int32]
  • Playback.PlaybackSettings.LoggerOverride : State
  • Playback.PlaybackSettings.MatchExactHierarchy :False
  • Playback.PlaybackSettings.MaximumRetryCount :1
  • Playback.PlaybackSettings.SearchInMinimizedWindows :False
  • Playback.PlaybackSettings.SearchTimeout: -1       : 120Sec
  • Playback.PlaybackSettings.SkipSetPropertyVerification :False
  • Playback.PlaybackSettings.SmartMatchOptions :None
  • Playback.PlaybackSettings.ThinkTimeMultiplier :1
  •  
  • UITestControl.WaitForControlReady:     60s
********************************************************************************

CodedUI


https://msdn.microsoft.com/en-us/library/jj835758.aspx

https://marketplace.visualstudio.com/items?itemName=AtinBansal.SeleniumcomponentsforCodedUICrossBrowserTesting

*****************************************************************************



today is a beautiful day

2. OffSet point:
Point location = control.BoundingRectangle.Location;
 location.Offset(control.BoundingRectangle.Width / 2,
 control.BoundingRectangle.Height / 2);
 Mouse.Click(location);

3. Disable User access control http://www.howtogeek.com/howto/4820/how-to-really-completely-disable-uac-on-windows-7/



1. This is a CodedUI blog which serves as a - One stop solution blog for all CodedUI related information
http://codeduiadda.blogspot.in/2014_05_01_archive.html

2. Experience guide for Enabling OpenGL Support for vGPU in Server 2016
http://social.technet.microsoft.com/wiki/contents/articles/31771.experience-guide-for-enabling-opengl-support-for-vgpu-in-server-2016.aspx

3.System Center 2012 – Virtual Machine Manager (VMM) Error Codes [19999-20999]
http://social.technet.microsoft.com/wiki/contents/articles/4924.system-center-2012-virtual-machine-manager-vmm-error-codes-19999-20999.aspx

4. Search Configurations for the control in CodedUI
AlwaysSearch
DisambiguateSearch
ExpandWhileSearching
NextSibling
VisibleOnly
http://codeduiadda.blogspot.de/2014/11/search-configurations-for-control-in.html

5.Data Source Types and Attributes [CSV, Excel, XML, SQL Express]

  • How to Click or find control by scrolling page in CodedUI
  • TryFind vs WaitForControl(Ready/Exist)
  • Database Testing with CodedUI
  • Using a App.config file to have different Sections in CodedUI project
  • Limit TestMethod Timeout in CodedUI
  • Execute CodedUI TestMethod() through command prompt
  • Schedule Coded UI Test to Execute At a Specific Time
  • Invoking a TestMethod from TestCleanUp in CodedUI
  • unexpected popups handling in CodedUI
  • Installation and Configuration of Test Controller and Test Agent without TFS
  • Record one application only in CodedUI Test
  • Usage of Cordinate based actions in CodedUI
  • Why does application close after each test in Coded UI Test

    ApplicationUnderTest aut = ApplicationUnderTest.Launch("ApplicationPath");
                aut.CloseOnPlaybackCleanup = false;

  • Searching a UI Test Control with an invalid property : this.mUISearchEdit.FilterProperties["InvalidFilterProperty"] = "foo-bar";
  • How to schedule Microsoft coded UI test execution without microsoft TFS



http://codeduiadda.blogspot.de/search/label/CodedUI

5. Agents for Visual Studio 2012 Update 4
https://www.microsoft.com/en-us/download/details.aspx?id=38186



===============================================
Running CodedUI Test From Another Application
http://blogs.microsoft.co.il/shair/2010/07/15/running-codedui-test-from-another-application/


******************************************************************************
CodedUI Search and Filter properties

https://willcodefor.wordpress.com/2012/10/19/search-and-filter-properties-of-coded-ui/

Search Properties are checked first. So the more search properties you have listed, the longer it will take the test to locate the specific object. Then the filter properties are tested against the objects found by the search to locate the exact object needed.

Best Practices in Object Identification for Performance Improvement:

Make the unique property as the ‘Search property’ of the object. And remove other Search and Filter properties.
If there are some properties in ‘Filter Property’ which can help in identifying the object uniquely, make that property as a ‘Search Property’.

Make prudent use of Search and Filter properties and Disable the Smart Match Identification.

*************************************************************************

CodedUI interview Questions

http://software-testing-zone.info/coded-ui/coded-ui-interview-questions-answers/

**************************************************************************

Resize window - CodedUI

https://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx

 [DllImport("user32.dll", SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hwndInsertAfter, int x, int y, int cx, int cy, uint uFlags);

in a method call this:

         SetWindowPos(UICNCstartWindow.WindowHandle, (IntPtr)(-1), 0, 0, UICNCstartWindow.BoundingRectangle.Width-50, UICNCstartWindow.BoundingRectangle.Height-100, 0x0002 | 0x0040);
     





No comments:

Post a Comment

JMeter Simple Controller

  Simple Controller is just a  container  for user request.