Wednesday 22 July 2015

VB Naming Convention for Coded UI Test Automation

Naming Convention details for our reference:


Project Name: Module Name
Eg: "Talentoz.Test.Core"






  Folder Name: Sub Module as Folder
    Eg: "EPM"






        File Name: Project.Test.Functionality
        Eg: "manageemployee"




            Class Name: ClsFunctionality
            Eg: "ClsManageEmployee"




                Test Method Name: Mtdtestobjective
                Eg: "Mtdaddemployee"




                    Step Method Name: Actionname
                    Eg: "Loginasemployee"




                        Parameter Name: pdataname
                        Eg: "pEno"


Monday 20 July 2015

Coded UI Automation Training Tutorial

1)Add Browser Automation to Your Unit Tests With Selenium | Pluralsight
https://www.youtube.com/watch?v=UXzpzRkeODc


2)https://www.youtube.com/watch?v=Yp3YrG1Zmqk
CodedUI Cross Browser Demo


3)Cross Browser Testing with Coded UI Testing -- Part 26 (CUIT Video Series)
https://www.youtube.com/watch?v=jcELt9WWuqA

4)Taking Data Driven Web Testing For A Spin with Test Studio
https://www.youtube.com/watch?v=UY9c5dj4Ces

5)Test Automation with Microsoft Visual Studio 2010: Coded UI Tests and Lab Management
https://www.youtube.com/watch?v=rZ8Q5EJ2bQM


6)Test Impact Analysis with Team Foundation Server | Pluralsight
https://www.youtube.com/watch?v=GVb00RCoBlU


7)Test Your Unit Tests with Intellitrace
https://www.youtube.com/watch?v=C6hl8txBGcc


8)Using CSV, XML & SQL data for test automation | Pluralsight
https://www.youtube.com/watch?v=nsF-yZXC8TY


9)Visual Studio 2012 Test Explorer: Continuous Testing, Testing Triangle and multi-targeted testing
https://www.youtube.com/watch?v=y6KTlywXZZE

Wednesday 8 July 2015

How have Multiple Test in a VB file

Multiple Test in a File

Steps to Create Multiple Test in a Coded UI Test File -

1) Create a Coded UI Test File

2) Copy the automatic loaded file and paste below end class

3) Rename created class and method

4) Create required coded UI test

5) Select sub method and run

Friday 3 July 2015

Methods to Create CSV File to Pass Parameter in CodedUI and to integrate in code

Content:

1.      Create Test and Set Data

A.     Create Record and Assertion method

B.      Move Created methods from UIMap.Designer to UIMap.vb file

C.      Create CSV file

D.     Change Property settings for CSV file

E.      Add parameter values

F.       Save the CSV file through Advanced Save option

2.      Pass the input parameter from CSV file to Recorded Method

A.     Create Data source.

B.      Find Text value

C.      Assign the CSV file value to Text value in main method

3.      Pass the Expected value from CSV file to Assertion Method

A.     Declare data as string for assign the CSV file value

B.      Create object for the main class

C.      Call the data through the object

D.     Pass the data to Expected values

1-A : Record and Playback method created for

1, Login as User

2, Check Assertion for Username

3, Logout


1-B : Move Method from UI.Designer file to UI.VB file for editing the Method

Double Click on UIMap.uitest -> Right Click on Method -> Select Move Code to UIMap.cs/vb

1-C : Method for Create CSV file to pass parameter

Right Click on Project -> Add -> New Item

Model Window opened for Add New Item

General -> Text File -> Rename as Sample.csv -> Add
CSV File Got Created under the Project

1-D  : Change the Property Settings for CSV file

Right Click on CSV File -> Properties -> Copy to Output = Copy if newer

1-E,F : Save the CSV File

1, create the Parameter and Pass the value

2, Go to File -> Select Advanced Save Option -> Select Unicode (UTF-8 without Signature) – Code Page 65001 -> OK


2-A : Pass CSV file value through Data Source

1, Declare property for Employee name

2, Create Data source

3, Pass Data from CSV file to Property

2-B : Methods to change the Recorded code to pass the Parameter value

GO To Method SubLoginAdmin :

To Verify the Text Value:
2-C : Assigned the value for Username and Password
3 :  Pass the CSV file parameter value as Expected value in Assertion Method:

1, Create object for the class

2, Call the data through the object
3, Pass the Expected value for EmpName from csv file