Advanced Coded UI Interview Questions & Answers 2017 | Mindmajix

If you're looking for Coded UI Interview Questions, you are at right place. There are lot of opportunities from many reputed companies in the world. You still have opportunity to move ahead in your career in Coded UI. Mindmajix offers advanced Coded UI Interview Questions that helps you in cracking your interview & acquire dream career.


Q: What do you understand by Coded UI?
Automated tests that can drive our software through its user interface (UI) are known as coded UI tests (CUITs). These tests include practical testing of UI controls. They let us confirm that the whole software or application, including its user interface, is performing correctly. Coded UI Tests are mainly useful where there is validation or other logic in the user interface, like in a web page. They are also commonly used to automate existing manual test.  A classic development experience might be one where, we simply build our software or application and click through the UI controls to confirm that things are working properly. We then decide to create a coded test so that we don’t need to continue to test the software or application manually. Depending on the specific functionality being tested in our software or application, we can write code for either a functional test, or for an integration test that may or may not include testing at the UI level. If we only want to directly access some business logics, we might code a unit test. However, under certain situations, it can be beneficial to include testing of various UI controls in our software or application. A coded UI test can automate the scenario, confirming that code churn does not impact the functionality of the software.
Q: What do you mean by Automation Testing?
Automation Testing is a method where a professional writes the scripts using a specific tool and executes the scripts to test the product, Software or application and compare the anticipated results with actual results and collect outcomes to initiate necessary modifications. Tests can be carried out with these tools repeatedly, at any time. 
Q: Why should we go for Coded UI Automation Testing?
For Coded UI we can exercise Visual Studio IDE to write down scripts.
1. Coded UI scripts can be executed through Visual Studio or by through Microsoft Test Manager (MTM).
2. For Coded UI we can write scripts with Visual Studio, and can use all object programming concepts on need.
3. Coded UI supports windows and web applications, WPF, Sharepoint, Client applications and CRM web client applications.
4. Coded UI offers supports any information source managed by the .NET framework.
5. Coded UI supports file of .csv, .xml or any information sources like SQL server table, access table, etc.
Q: How much percentage of testing will be covered in any case of automation testing?
Following are the prerequisites for automation testing to be implemented:
1. Critical Scenario of the test cases.
2. Repeated test case or not.
3. Time consumption of test cases.
4. Test cases which are difficult to perform manually.
Taking into consideration of the above mentioned conditions, 60-70 % of testing can be covered by automation testing. Moreover, height, width and colors of the controls in application, software or product can’t be tested.
Q: How Many Different types of programming approaches are available in Coded Ui?
Three different types of programming are available in Coded UI.
1. Complete Descriptive Programming.
2. Programming using UI Map.
3. Recording and Playback.
Q: How can controls be recognized in Coded Ui?
There is a specific tool accessible in Coded UI in the name of Test Builder. Within this Test Builder, there is an option named ‘Cross Hair’, with which we can find out the controls and can get the information on properties of the controls.
Q: What do you understand by Test Builder?
Test Builder is a tool accessible in Coded UI, which contains 4 options
>> Record, which is used to record the actions.
>> Show Recorded Steps, which is used to show all of the recorded steps.
>> Cross Hair, which is used to identify the controls and can find out the property information of controls.
>> Generate Code, which is used to generate the code for the recorded actions.
Q: What is the Namespace to work on Coded Ui Controls?
Following are the namespace to work on Coded UI:
1. Using Microsoft.VisualStudio.TestTools.UITesting;
2. Using Microsoft.VisualStudio.TestTools.UnitTesting;
3. Using Microsoft.VisualStudio.TestTools.UITest.Extension.
Q: What is the Namespace to work on the Web Controls?
The namespace to work on Web Controls in Coded UI is Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.
Q: What do you know by TestMethod In Coded UI?
In Coded UI, 1 TestMethod is same as 1 Test case. Every coded UI test is a test method in a coded UI test class. We can add multiple Test methods for each coded UI test class and specify each coded UI TestMethod with the help of  TestMethodAttribute. Test methods can also add validation code for a single UI test control to get the value of a property of a UI test control.
Q: What do you understand by TestInitialize and TestCleanup Coded UI?
TestInitialize and TestCleanup are  attributes which are useful at the time of unit test setup.
TestInitialize - This attribute is required when we prefer to run a function before execution of a test. For example we prefer to run the same test 5 times and prefer to set some property value before running each time. In such cases we can define one function and decorate the function with a TestInitialize attribute.
TestCleanup - This attribute is just the opposite of TestInitialize. Every time the function is decorated with this attribute, it will only execute when test execution finishes. After execution of each and every test if we need to perform some cleanup operation. That time we can write down codes within this function.
Q: What are Attributes in Coded UI? Give some list of Attributes?
[TestMethod] is an attribute before method in class which indicates that the method should be executed to perform a test.
[DataSource(…)] is an attribute which we use for Data Driven Testing.
Similarly, there are many other attributes available in Coded UI:
[TestMethod], [TestCleanup], [TestInitialize], [TestClass] and [AssemblyCleanup]
Q: What is the approach to perform mouse click operation?
Using Click() method we can carry out click operation on any control in Coded UI.
To be precise, there are 10 Click() overload methods which is mentioned below:
1. Mouse.Click();
2. Mouse.Click(ModifierKeys modifierKeys);
3. Mouse.Click(MouseButtons button);
4. Mouse.Click(Point screenCoordinate);
5. Mouse.Click(UITestControl control);
6. Mouse.Click(UITestControl control, ModifierKeys modifierKeys);
7. Mouse.Click(UITestControl control, MouseButtons button);
8. Mouse.Click(UITestControl control, Point relativeCoordinate);
9. Mouse.Click(MouseButtons button, ModifierKeys modifierKeys, Point screenCoordinate);
10. Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate).
Q: What is the Alternative Approach To Perform Click Operations (without Mouse.click())?
We should move the control on to UI element using Keyboard. SendKeys(“{TAB}”); then use Keyboard.SendKeys(“{ENTER}”); to perform click operation.
Q: What Are Search Properties And Filter Properties?
Search properties are the mandatory properties that is used to search the control, and failing to find a control with the matching search properties will fail the search. However, the filter properties are optional in the case that if a matching control with a given filter properties are not found, then the search may still work using other search or filter properties. In other words, we can visualize search properties with logical "AND" operator and the filter properties with logical "OR".
Q: How Many Ui Maps Can Be Created In Coded Ui?
We can crate Any number of UIMaps in Coded UI.
Q: How To Access The New Ui Map Controls From Another Cs File?
Using Get and Set properties we can access the new UI Map controls in another cs files. Below the sample code.
public UIMap UIMap
Q: What is Assertion and its uses in Coded UI?
An assertion is a true or false statement placed in a program to indicate that the developer thinks that the predicate is always true in that place. If an assertion evaluates to false at run-time, an assertion failure is resulted, which typically causes execution to terminate itself.
For more Interview Questions Click Here:: Coded UI Interview Questions & Answers

Comments

Popular posts from this blog

Agile Methodologies

Agile methods

An Introduction of Virtualization in Oracle RAC