1. A method of generating test frames in specification-based testing the method comprising the steps of: receiving a test design as an input, wherein the test design is represented as an extended context-free grammar (ECFG); constructing a context-free grammar graph based on the test design, wherein the context-free grammar graph comprises a plurality of paths; analyzing the context-free grammar graph to generate a first set of paths from the plurality of paths that satisfy one or more pre-conditions, wherein the one or more pre-conditions are associated with choices of the context-free grammar graph; and emitting a set of test frames as an output, wherein the set of test frames is a second set of paths obtained from the first set of paths that satisfy a frame constraint specified in the test design. The method of generating test frames as claimed in claim 1 , wherein individual internal nodes of the context-free grammar graph are associated with non-terminals and individual leaf nodes of the context-free grammar graph are associated with terminals.