Getting Started - Working With Context Objects¶
We need the
"Hello World!" string that we created using Custom Steps more than once. We want to store it globally so that one change will modify it across the project. This is achieved by using Context Objects, which are defined in the configuration.
Working with Context Objects¶
project.conf file that you already used for defining your Glue Path. Define a
hello Context Object in the
project.conf file as well, which will allow us to reference the Context Object simply by using the name:
Change the step invocation in the
FeatureWithCustomStep.feature file as the following:
Run the test and it will print
"Hello World!" in the console:
The "Getting Started" tutorial started off by walking you through intaQt Studio's main features, used to create a project and its associated files. We then introduced the main concepts used to construct test cases including Feature Files, Scenarios and Scenario Outlines, Stepdefs, Configuration Files, and Context Objects.
Now that you have finished this part of the tutorial, you are ready to start with intaQt. We recommend returning to the Tutorials section of the intaQt Resource Center, which includes other tutorials that are informative and will guide you through intaQt.