Welcome to ZAPTEST tutorials! In this tutorial we will show you how to create a test that includes API and UI related steps. During this lesson you will learn How to use an iteration as an index for an array element How to create and use a dynamic path for an API response And how to combine API calls and UI steps in one test In the tutorial exercises we will be using demo web services provided by ZAPTEST for educational purposes. The servers address is displayed here We will start by defining a new API server Object; here we will type the name for the server’s object, the demo API server’s URL; and select the check box to load the WSDL data. Next, we will select the Get Test Accounts API Method and drag it to the script view. From the list of operations, we will select Execute. This method returns an array of test user accounts. To retrieve a username from the server’s response we need to provide a path; in addition, we need to use the data table Iteration number as an index in the path. In the script we will make a new variable Element ID and will use the Iteration as the path index. Now we will use the paths string to extract the username value; to define a step for this we will type a name for the variable; drag the method from the API Explorer; select the Get Member Response operation; and use the path variable for its argument. We will add a custom report step to output the username value to the test results. Now, we can save our test and run it. Once the test run is complete, we will open the test results and verify the username value. We will use the username for login to the ZAPTEST website. Next, we will add steps to perform the login. We will start by using the GUI scan to scan a browser window with the ZAPTEST homepage. On this view we will select and keep two objects for the ZAPTEST logo and the Login link. Next, we will scan the login page. On this view we will keep objects required for the username and password entry. We can change names for the edit field objects. Next, we will scan the user zone page; on this view we will select and keep the object for the Welcome message. Once we have all these objects, we will add steps to our test. Using the Data Table tab we will define a new parameter for the browser type For its values we will enter Firefox, Chrome and Internet Explorer This test will run three iterations on different browsers For the next step in our test we will drag the ZAP Application Object and select the Launch Method. For the arguments we will use the browser parameter and type the URL of the ZAPTEST website. Next, we will add steps to validate the home page; click the login link and validate the login page. For the username type step, we will use our username variable; in the password type step, we will include enter keyword to submit the login form. After a login we need to validate a Welcome greeting; which includes a dynamic username. To make its text we need to concatenate two strings; Welcome text and the Username value. We will use the Welcome object and Set Property Method to update its text property value from the variable. In the last step we will use the Welcome Object and the Exist Method to validate it. Our test is ready, we will save and run it after closing any open browser windows. After the test run has finished, we will open the test results and verify that all the steps have a passed status. Also, different test user accounts must be used in different iterations. In this tutorial lesson, you have learned How to use an iteration to extract an array element How to use a dynamic path to parse an API response And how to combine API and UI related steps in the same test Thank you for using ZAPTEST!