How to write a functional test script

In this article, we will cover a different type of Keyword Driven Framework — the one where the keywords are mapped at Functional Level. How its actually implemented may vary from project to project.

How to write a functional test script

The standard Test Case format is: The format is generally: Test Step Number - to keep your Test Steps in order and to give a point of reference when you find a defect, e.

Expected Result - this is what should happen when the Tester takes the action specified. Each Test Step should be a logical continuation of the previous Test Step. This is a very basic example, and generally Test Cases are much more involved, but this is only to illustrate a point: There are two principal fields of thought with regard to the level of detail that Test Steps should have.

The first is similar to the example I just gave, where each step of the login process is specified, with the result of that step also specified. The other is that only a general instruction needs to be given, for example: Both approaches have their advantages and their disadvantages. The more detailed approach is more time-consuming both to write and to execute.

But it can be executed by someone who has little or no prior knowledge of the application. In the instance of logging in to an application, this is perhaps a trite example, as a login process is fairly standardised.

But say, for example, you started a new job and were faced with a Test Step that said simply: How do you raise an order, create a contract, or issue a refund? In this situation, step by step instructions would be very useful to you. In their absence, you would need instruction in how to do these things.

One option is to ask someone else. The upside of this is that when you have started a new job as a Tester, talking to people is good and helps to develop a good relationship with your new colleagues.

The downside is that they will probably be busy, and since most people are not natural teachers, they would probably not teach you very well. And the final option - which is also the most common - is to just battle through until you have worked it out by yourself.

When you become more familiar with the application, you too, will be able to raise an order, create a contract, issue a refund, without detailed instructions. When you reach this stage, you would probably find the step by step instructions to be laborious and time-consuming, and would just automatically give each of them a Pass until you reached the part of the application that you needed to test.


Detailed instructions, though, allow the Test Case to be executed by anyone - not just by someone who is starting a new job. If one of the Test Team is off sick, or you just have a lot of tests to get through to meet a deadline, you can borrow a Tester from another team, and they will be able to start executing tests immediately.

how to write a functional test script

One of my clients had a particular issue with Test Cases. They had acquired another company, which had an application for which general tests had been written.

No-one in the acquired company knew how to execute the tests - they had all been written by temporary contract Testers who had moved on just to add to the issue, the Developers were also temporary contract Developers who had moved on, and nobody knew where the Specifications were.

The only option open to them was to get some frontline users to demonstrate the various functions of the application. To cut a long story short, it cost my client a lot of time and money, just to get to the point where they were ready to start the integration.

Shortly afterwards, they introduced a new policy on Test Case clarity, which was that all Test Cases should be sufficiently clear to allow an unfamiliar Tester to execute them. Most of the time, you will find yourself using a Test Management Tool. This allows you to enter your Testable Conditions and ensure that each of them is covered by at least one Test Case.

It also allows you or your Test Manager to produce reports on Test Coverage, how many tests have been executed, how many passed, how many failed, on which version of the application, etc, etc.Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.

Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of .

how to write a functional test script

To test a certain piece of the application’s UI, you would use functional or GUI testing. Can your QA department write automated test scripts or is there a need for keyword testing?

Thus, in order to perform these tasks, you should have QA engineers that know the script language provided by the automated testing tool. How To Write Your Test Cases - Introduction How to prepare Test Cases from Requirements will be discussed later, but let's start by explaining the structure of a Test Case.

Before writing Test Cases, let's look at the definition of a Test Case. The following sequence is based on the book Test-Driven Development by Example. 1. Add a test In test-driven development, each new feature begins with writing a test.


Write a test that defines a function or improvements of a function, which should be very succinct. JavaScriptMVC is an open-source framework containing the best ideas in jQuery development. It guides you to successfully completed projects by promoting best . This article provides information about the basic components and flow of keyword driven framework mapped at functional level.

Designing Keyword Driven Framework mapped at Functional Level - Part 1 - XX - XX