--- title: "QuickStart API Automation" slug: "quickstart-api-automation" description: "Test Modeller QuickStart API Automation Tutorial series. Getting started, Modelling out combinations, Generating & Running test cases and Publishing a test suite all for API testing." tags: ["Learning Portal", "QuickStart", "Test Modeller"] updated: 2024-09-27T14:10:15Z published: 2024-09-27T14:10:14Z canonical: "knowledge.curiositysoftware.ie/quickstart-api-automation" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt > Use this file to discover all available pages before exploring further. # QuickStart API Automation Welcome to the Quality Modeller QuickStart API Automation Tutorial series. In this series, we are going to take you through Getting started, Modelling out combinations, Generating & Running test cases and Publishing a test suite all for API testing. Watch the 3 tutorials to guide you in using QuickStart API Automation in Quality Modeller. **Objectives:** By the end of the series, you'll be able to: - Create and/or edit an Automation Model - Navigate the Quality Modeller UI - Understand the directory structure in Quality Modeller - Name and Configure a Project - Identify Components and Actions - Connect an API using Connectors in Quality Modeller - Overlay Logic onto a Model - Identify Subflows (subprocesses) in a Master Model - Link nodes on the model canvas - Generate Test Cases - Run, Execute and Review Pass and Fail Tests --- ## Create a Project This clip, on API Automation introduces the basics of Quality Modeller’s default API Request modules, how to test them, then build them into a model ahead of generating and running tests through Quality Modeller’s API Automation QuickStart framework. Specifically, this API Automation clip focuses on how to create a project through the Quality Modeller interface. [Embedded content](https://www.youtube.com/embed/lxVK-DfQxJc??list=PLd_AqXM4vM-D2sNLNa3B2J4Q8HSN5Qiqx&wmode=opaque&rel=0) **Tutorial Steps** **Step 1** - For Quality Modeller to build the automation library and initial assets you need to set up a Project. So in the main portal click Create Project. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1691667825304.png) Name the Project, give it a description, and select Next. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h25_14.png) On the Next Step scroll and select API Automation Framework. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h25_40.png) On confirming by clicking the green Create Project button the automation code with assets are built and a 'Project Type: API' is started. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h27_16.png)Now you'll see Quality Modeller spin up a ready to use API Automation Project. Select the appropriate project from the context bar. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h27_56.png) A folder labelled Components will be available which contains the API automation actions. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-17_10h21_15(1).png) **Step 2 -** To see the underlying edit Functions, click on the Components folder > Actions. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h29_16.png) Click on APIGeneralActions > 'Assert JSON Path' as an example, and the underlying Edit properties include: Parameters, Return, Code. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/Screenshot%202023-08-10%20123724-A(3).png) ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_12h35_54.png) ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/2023-08-10_14h11_52.png) --- ## View and Create Modules Now with a Project set-up, API Automation shows how to test an API Request prior to using it as part of a Model. This is shown through use of an example API Automation Login action or function type that you’ll modify through a Parameters tab as part of a broader Module Collection. [Embedded content](https://www.youtube.com/embed/KGR27SsDgIs?&wmode=opaque&rel=0) For the Login function, type Parameters are taken from an example open API website which are email, password and responseCode. Additionally, the site’s URL is input as Post under the API Request tab through which Values can further be parameterised under the Body tab. And finally, for returning a specific Status Code, ie 200 or 400, this is added under the Assertions tab. The next step is to ensure an API Token is pinged back to verify the API Request is working as expected. This is done by clicking Run in the Edit Function popup, and in the Name and Value popup, just add in the credentials described in the open API website and click Execute. This API Request is now validated and can be built into models for the purpose of testing the API Requests more vigorously. Generally API Request functions can be created in Quality Modeller in a number of ways including of course manually, but also importing Swagger specifications, and also tools like Postman and API Fortress amongst others. --- ## Create a Model and Run Tests Now having verified the API Request is returning as expected. API Automation shows how to build out the API Request in a model to not only pull out the successful test cases but also the edge case, update specific Test Data, and then to Run and see test results. [Embedded content](https://www.youtube.com/embed/aScaoASSQUA?&wmode=opaque&rel=0) To set up a Model, you’ll next open a folder called Scenarios in the Explorer and click New Model. Once named, the canvas gives a start and end block, and so click the start node and locate the Login API Request and you’ll see it expands on the canvas. Knowing there are two scenarios to test, the first being a 200 successful response but also a 400 error response, you’ll see how these are set up using the end points and get connected to the Positive Login and Negative Login Waypoints accordingly. With the blocks connected to Email and Password you can now parse in specific Test Data from the original website you are testing against. To do so you’ll click on each block, then copy the data from the example open API site, into the Variables field in the Test Data pane in Quality Modeller. Ahead of running the automation, at this point you’ll set-up and generate the tests which will be in the Scenarios pane. In this example you’ll see 3 paths which are individual test cases used to test the API Request. So now you’ll click Run and select Automation Code from the wizard. Instantly you’ll see that 3 tests are executed. Finally, to view the automation results in isolation, this is done by clicking the cog icon in the Scenarios pane on the path concerned and then choosing Results from the context menu. Quality Modeller is Curiosity's flow-driven model-based tool which provides a range of accelerators and connectors for building flowcharts rapidly. Align all stakeholders to quality outcomes and create critical assets early, delivering superior software at speed. Modelling or modelling systems or functions is the main function of Modeller. Modelling or system modelling is the use of models to conceptualize and construct systems in business and IT development. A common type of systems modelling is function modelling, with specific techniques such as the Functional Flow Block Diagram and BPMN Diagrams. A Model is a canvas and the Flow that is built onto it. Automation - Designed for creating Automated Test Cases. This Model type is used to define Automation Flows, and links well with Selenium and other automation software. It has Test Data & Automation and Test Generation tabs. A Project in Modeller represent the current collection of work the user is working on. Users can create multiple Projects within Modeller and switch between them at any time, this can be used to manage Models and User Teams. A Connector is a link to an API. Quality Modeller has many built-in connectors including Excel, Word, Visio, Gherkin, Disco, BPMN, Jira, Confluence and draw.io. As many new connectors can be created as needed for a project. Do this in the Connectors sub-section of the Profile section within Management on the Navigation Panel. A Model is a canvas and the Flow that is built onto it. There are several types of Model, some of which display different tabs and tools on the toolbar in Quality Modeller. Subflows are used to quickly embed and re-use models within a master model. Subflows hide detailed or complex modelling and make the master Flow more readable. They enable scalability by building out the complexity from smaller, more step-focussed Models, rather than building giant, complex, inflexible Flows. The Master Model is simply a model which combines Subflows into one large Model. Master Models are used to join together a range of system models, visualise them and test them as a whole. The Explorer section of Quality Modeller is the main location for finding all your models, data sheets, scans and variables. This will be the main view you use in Modeller and where you create new models and edit existing ones. A Waypoint is used between a Start and End point in a path, and enables test automation to be overlaid at that point in the model. Test Data Variables are sets of data that can be attached to blocks in models. This data can be custom, synthetic, automated etc. Variables are basically assigned data values and rules to blocks, and this data is used when automation is run. ## Related - [Quality Modeller](/get-started-with-test-modeller.md) - [QuickStart Tutorials](/quickstart-tutorials-1.md) - [Quality Modeller 101](/test-modeller-101.md)