Keyword driven frameworks in LeanFT in Visual Studio

Keyword driven frameworks are very popular in LeanFT.

Please follow below steps to create keyword driven framework.

  1. Find main operations and features of the application.
  2. Map each feature or operation to a keyword.
  3. Write a code to automate specific keyword.
  4. Create test sheet containing test cases made up of one or more keywords. You can store the test sheet in Excel file, Database or in the form of Unit test class.
  5. Unless you are using Unit test class, you might need to create a driver script to execute each test case.

Here is the case study on WPF Flight application provided by HP.

In this application, we can create a keyword for each major feature like log in to the application, searching a flight, selecting a flight, Placing a order, Searching a order, Deleting the order, Cancelling the order, Book a flight, Verify flights.

Then we can create test cases for various user scenarios using same keywords as mentioned above.

Here are couple of test cases created using above keywords. Note that in below test cases, we have re-used login keyword.

Here is the test case to search for a flight.

  1. Login to the Flight application.
  2. Search for the flights from London to Paris in next week for one person.
  3. Verify that flights are displayed from London to Paris only.

Here is the test case to search for a order.

  1. Login to the Flight application.
  2. Book a flight and note down order number say 88.
  3. Search for order with id 88.
  4. Verify that flight details are correctly displayed.

 

You may also like...