Coded Ui Interview Questions & Answers

4 avg. rating (80% score) - 5879 votes

Coded Ui Interview Questions & Answers

Are you in search of CODED Jobs? Then you are at the right place. We provide you with the complete CODED Ui interview Question and Answers on our page. What is Coded UI Test (CUIT)? CUIT are automated tests that drive your application through its user interface (UI). Hence, the name coded UI tests (CUITs). These tests involve functional testing of the UI controls. There are numerous leading companies that offer various job positions in Coded Ui like Coded Ui test engineer, Senior Engineer/ Senior Staff Engineer, Software test Engineer, Coded testing, QA Engineer and many more. To clear any interview, you must prepare well for interview, so we provide a complete and tricky Interview questions on our page. To know more about interview question and answers and for various positions in Coded Ui visit our website Wisdomjobs.com.

Coded Ui Interview Questions

Coded Ui Interview Questions
    1. Question 1. What Is Automation Testing?

      Answer :

      Automation Testing is a process where tester writes the scripts using automation tool and execute the scripts to test the product/Software/application by comparing the actual results with expected results.

    2. Question 2. Why Going For Coded Ui Automation Testing?

      Answer :

      • For Coded UI we can use Visual Studio IDE to write scripts.
      • Coded UI scripts can be executed using Visual Studio or by using Microsoft Test Manager (MTM).
      • For Coded UI we can write the script with Visual Studio with which we can use all object programming concepts if required.
      • Coded UI supports windows applications, web applications, WPF applications, Sharepoint applications, Client applications and CRM web client applications.
      • Coded UI offers support to any information source managed by .NET framework. Coded UI supports file formats of .csv, .xml or information sources like SQL server table, access table etc.

    3. Question 3. How Much % Of Testing Will Be Covered For Automation Testing?

      Answer :

      In automation testing, mostly the below conditioned test cases can only be automated:

      • Critical Scenarios test cases.
      • Repeated test cases.
      • Time consuming test cases.
      • Test cases which are difficult to perform manual test cases.

      Considering the above situations 60-70 % of testing can be covered for automation testing. Also height, width and colours of controls in application/software/product can’t be tested.

    4. Question 4. How Many Types Of Programming Approaches Available In Coded Ui?

      Answer :

      3 Types of programming available in Coded UI.

      1. Complete Descriptive Programming.
      2. Programming using UI Map.
      3. Recording and Playback.

    5. Question 5. How Controls Will Be Recognized In Coded Ui?

      Answer :

      There is a tool accessible in Coded UI named Test Builder. In this Test Builder there is an option named ‘Cross Hair’, using this cross hair we can recognize the controls and can view the property information of controls.

    6. Question 6. Explain About Test Builder?

      Answer :

      Test Builder is a tool accessible in Coded UI which contains 4 options

      1. Record: is used to record the actions.
      2. Show Recorded Steps: used to show all the recorded steps.
      3. Cross Hair: is used to recognize the controls and can view the property information of controls.
      4. Generate Code: used to generate the code for the recorded actions.

    7. Question 7. What Is The Namespace To Work On Coded Ui Controls?

      Answer :

      Below the namespace to work on Coded UI:

      using Microsoft.VisualStudio.TestTools.UITesting;

      using Microsoft.VisualStudio.TestTools.UnitTesting;

      using Microsoft.VisualStudio.TestTools.UITest.Extension;

    8. Question 8. What Is The Namespace To Work On Web Controls?

      Answer :

      Below the namespace to work on Web Controls in Coded UI

      using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;

    9. Question 9. What Is Test Method In Coded Ui?

      Answer :

      In Coded UI, 1 TestMethod is same as 1 Test case.

    10. Question 10. What Are Test Initialize And Test Cleanup Coded Ui?

      Answer :

      Test Initialize attribute is same as TestMethod which executes before a TestMethod by default. Browser launch, login functionality will be scripted in Test Initialize.

      Test Clean Up attribute is same as TestMethod which executes after a TestMethod by default. Closing the browser, clearing cache, clearing cookies and log out functionality will be scripted in Test Clean Up.

    11. Question 11. What Is Attribute Coded Ui? And Give Some List Of Attributes?

      Answer :

      [TestMethod] is an attribute before method in class and indicates the method should be executed to perform a test.

      [DataSource(…)] is an attribute which is used for Data Driven Testing.

      Like wise there are many attributes available in Coded UI:

      [TestMethod]

      [TestCleanup]

      [TestInitialize]

      [TestClass]

      [AssemblyCleanup]

    12. Question 12. What Is Approach To Perform Mouse Click Operation?

      Answer :

      using Click() method we can perform click operation on any control in Coded UI.

      Total there are 10 Click() overload methods mentioned below:

      • Mouse.Click();
      • Mouse.Click(ModifierKeys modifierKeys);
      • Mouse.Click(MouseButtons button);
      • Mouse.Click(Point screenCoordinate);
      • Mouse.Click(UITestControl control);
      • Mouse.Click(UITestControl control, ModifierKeys modifierKeys);
      • Mouse.Click(UITestControl control, MouseButtons button);
      • Mouse.Click(UITestControl control, Point relativeCoordinate);
      • Mouse.Click(MouseButtons button, ModifierKeys modifierKeys, Point screenCoordinate);
      • Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate);

    13. Question 13. What Is Alternative Approach To Perform Click Operation(without Mouse.click())?

      Answer :

      Move the control on to ui element using Keyboard.SendKeys(“{TAB}”); then use Keyboard.SendKeys(“{ENTER}”); to perform click operation

    14. Question 14. What Are Search Properties And Filter Properties?

      Answer :

      Search Properties are Mandatory (Primary) Properties which perform AND operation

      Filter Properties are Secondary properties which perform OR operation

    15. Question 15. How Many Ui Maps Can Be Created In Coded Ui?

      Answer :

      Any number of UIMaps can be created in Coded UI.

    16. Question 16. How To Access The New Ui Map Controls From Another Cs File?

      Answer :

      Using Get and Set properties we can access the new UI Map controls in another cs files. Below the sample code.

      public UIMap UIMap

      {

      get

      {

      if ((this.map == null))

      {

      this.map = new UIMap();

      }

      return this.map;

      }

      }

      private UIMap map;

    17. Question 17. Assertion And Uses?

      Answer :

      Assertions is same as validations which helps to verify if the actual output is same as expected output.

      Below are some important classes used in Coded UI:

      • Assert
      • StringAssert
      • AssertFailedException
      • AssertInconclusiveException

    18. Question 18. Why We Are Going Assertions Instead Of If-else?

      Answer :

      When IF-Else is used and if test case fails still Coded UI passes the TestMethod, to overcome this issue Coded UI introduced Assertions.

    19. Question 19. How Many Assertions Can Be There In A Test Method?

      Answer :

      There can be any number on Assertions.

    20. Question 20. Difference Between Assert.isequal() And Assert.aresame()?

      Answer :

      Assert.IsEqual() refers to control value.

      Assert.AreSame() refers to reference of the control.

    21. Question 21. What Is Synchronization?

      Answer :

      Making sure that the speed of automation scripts execution should be in sync with application under test (AUT) response/speed.

    22. Question 22. Levels Of Synchronization?

      Answer :

      Two levels of Synchronization:

      1. Test level Synchronization.
      2. Statement level Synchronization

    23. Question 23. What Are Conditional Statements In Synchronization?

      Answer :

      Statements executes depending on some condition. In coded UI there are 8 Conditional Statements:

      • WaitForControlReady()
      • WaitForControlEnabled()
      • WaitForControlExist()
      • WaitForControlNotExist()
      • WaitForControlPropertyEqual()
      • WaitForControlPropertyNotEqual()
      • WaitForControlCondition()
      • WaitForCondition()

    24. Question 24. What Are Unconditional Statements In Synchronization?

      Answer :

      Statements executed without any condition. In coded UI there is 1 Unconditional Statement Playback.wait().

    25. Question 25. Explain Waitforcontrolenabled, Waitforcontrolexist And Waitforcontrolready?

      Answer :

      WaitForControlEnabled(): Waits for control to be enabled.

      WaitForControlExist(): Waits for control to exist on UI.

      WaitForControlReady():Waits for the control to be ready to accept keyboard or mouse input.

    26. Question 26. What Is Mouse Click Using Coordinates?

      Answer :

      Mouse.Click(control, new Point(49, 3));

      Coded UI will perform click operation exactly on 49,3 point of the control.

    27. Question 27. Explain About Data Directory?

      Answer :

      Data Directory means Project Directory/Project folder.

    28. Question 28. Explain Playback.playbacksettings.continueonerror?

      Answer :

      Generally in Coded UI at the time of script execution if any error occurs the execution will stop and test method fails.

      If the execution wants still to continue if any error occurs then the below statement is helpful

      Playback.PlaybackSettings.ContinueOnError = true;

    29. Question 29. How Many Types Of Ddt Available On Coded Ui?

      Answer :

      Data Driven Testing can be done in Coded UI using 5 Data Source types:

      • Using CSV 
      • using XML
      • using Excel
      • using SQL 
      • using Test case in TFS

    30. Question 30. What Are The 4 Major Steps In Ddt?

      Answer :

      Below are the 4 major steps for DDT in Coded UI:

      1.Prepare the test data.

      •     If working on CSV/XML/EXCEL, create respective file and add the test data.
      •     If working on SQL/TFS directly add the test data to respective table/test case.

      2.Add the Data Source Attribute.
      3.Get the test data from file and map to respective control.
      4. Right click on file, go to properties and change the Copy to Output Directory value to ‘Copy always’.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Software testing Tutorial