Lecture#7 Scripting Technique
Lecture#7 Scripting Technique
User Permissions
Test Case 1: Grant administrator access to a user Keywords:
GrantPermission(User, Administrator)
Test Case 2: Revoke read-only access from a user Keywords:
RevokePermission(User, ReadOnly)
Behavior-Driven Development (BDD):
BDD is an agile software development technique that
emphasizes collaboration between developers, testers, and
business stakeholders. BDD uses a natural language
syntax called Gherkin to describe the desired behavior of
the software. Test scripts are then created based on these
specifications, making them more understandable to non-
technical stakeholders.
1. User Registration: Scenario: User Registration Given the user is on the registration page
When they enter valid registration details And click the Register button Then they should be
successfully registered
2. In this example, the scenario describes the behavior of the user registration process. The
"Given," "When," "And," and "Then" keywords represent the different steps of the scenario.
Test scripts can be created based on this scenario, mapping each step to the corresponding
automation code or manual test instructions.
Model-Based Testing:
In model-based testing, test scripts are derived from models
that represent the expected behavior or structure of the
system under test. These models can be in the form of state
diagrams, flowcharts, or other visual representations. The test
scripts are generated automatically from the models, ensuring
comprehensive test coverage.
Hybrid Approach:
A combination of scripting techniques is used to achieve
effective test automation. Testers may use a hybrid approach
by combining record and playback with data-driven or
keyword-driven techniques to leverage the advantages of each
method and address specific testing requirements.