In the previous lecture, we learned how can we work with tables to handle test data from the feature file.I will paste the feature and step definitions from earlier lecture and then we will talk about the shortcomings and how Specflow.Assist.Dynamic can help us to overcome them Feature File Feature : SpecFlowFeature2 In order to show specflow capabilities for working on tables We are going to write some scenarios here Scenario : Verify specflow can read data from table and print on console Given I have dummy student data as below | StudentId | StudentName | Division | Age | | 100 | James | Engineering | 30 | ...
One can manage a group of items/objects using arrays or collections, we have already talked about arrays in the previous lecture, today we will talk about collections Collections provide a more flexible way to work with a group of objects. Yes flexible, collections can grow and shrink dynamically . One of the greatest advantage over Arrays. There are many collections provided by .Net framework, we will look at the most used collection classes Generic List Strongly typed list of elements that can be accessed by using positional index number. Declaration List < string > EmpNameList ; Declared EmpNameList which will hold elements of type string Initialization EmpNameList = new List < string >(); Operations //Add Element EmpNameList . Add ( "Employee1" ); //Re...
In our automation project, we would come across scenarios where we need to deal with a group of items, some examples below We got employee data from the application, which contains 20+ records and we need to check if a specific employee exists or not We need test data for testing application, say 20 records of the employee (employee name, Id, Address etc). And Many more... Well, you will say, One can use Arrays to deal with a group of items. You are right. One can manage a group of items/objects using arrays or collections, we will take look at both in this lecture Arrays Arrays are fixed size list of elements that can be accessed using a positional index number. Arrays are used mostly when the size of the list is known at design time. We will look at some array operations Array Declaration //Declaration string [] EmpName ; Here we have declared EmpName Array which will have string elements Array Initialization ...
Comments
Post a Comment