Keyword driven frameworks in leanft in Java

Keyword driven frameworks are very popular in LeanFT. Please follow below steps to create keyword driven framework.
  • Find main operations and features of the application.
  • Map each feature or operation to a keyword.
  • Write a code to automate specific keyword.
  • 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 JUnit or TestNG test class.
  • Unless you are using JUnit or TestNG to execute the tests, 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.
  • Login to the Flight application.
  • Search for the flights from London to Paris in next week for one person.
  • Verify that flights are displayed from London to Paris only.
Here is the test case to search for a order.
  • Login to the Flight application.
  • Book a flight and note down order number say 88.
  • Search for order with id 88.
  • Verify that flight details are correctly displayed.

Web development and Automation testing

solutions delivered!!