aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Engineering

Test Cases In Dialogflow CX

  • aster.cloud
  • January 31, 2022
  • 3 minute read

As a developer, you want to ensure that as you develop new features for your Dialogflow CX agent, you want to ensure that it passes a fixed number of Test Cases that you have marked as Golden Test Cases. Dialogflow CX not only provides you with a feature to manage a list of Test Cases that you can run against your agent but also understand Test coverage.

This blog post will take a sample Dialogflow Agent and will highlight how you can get started today with not just testing the agent but capturing those test runs as golden test cases, building up a test suite and also understanding test coverage.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Sample Agent : ABC Holiday Resorts

We will utilize an existing Agent that has been made available for download here. Go ahead and restore the sample Agent (ABC Holiday Resorts) into a sample Agent project following the steps given over here. Once you have restored the agent, you should be able to see the sample flow that is shown below:

 

The Sample agent has a single flow and the agent currently supports users in three different areas:

  • Get Information on current offers/deals
  • Get Information on current cities in which resorts are present
  • Reserve a vacation in one of the resorts

Given that the objective here is to highlight the Test Cases feature of Dialogflow, the Agent has been kept simple and does not have any external integrations and complex validations.

You can try out the Agent by using the Test Agent feature in Dialogflow CX console with the following phrases:

  • What are the current offers?
  • Where are the resorts?
  • Book a vacation
Read More  Save Big By Temporarily Suspending Unneeded Compute Engine VMs—Now GA

Test Cases and Coverage

The first up step is to visit the Test Cases feature in Dialogflow CX console. Go to the Manage tab and then the Test Cases section as shown below:

 

\

 

Since we do not have any Test Cases provided as part of the initial restore of the Agent and the fact that we have not captured any so far, the list is empty.

Click on Coverage and you will see the coverage for various Flows, Intents, Route Groups in the Agent. This is also currently not there since we do not have any Test Cases.

 

Capturing a Test Case

We can capture a Test Case via the Test Agent feature in the console. The steps to capture a Test Case is given below:

  • Assuming that your Agent is open in the Dialogflow CX console, click on the Test Agent button.
  • Provide the utterances as you go through the flow.

A sample test case is shown below. This exercises the option of asking the Agent about current offers/deals.

 

Once the flow is complete, click on the Save button.

This will ask you for the Test Cases, which we can provide as shown below and finally click on the Save button. This will save the Test Case.

 

Viewing Test Cases and Coverage

You can view the current list of Test Cases, via the Test Cases link in the Manage Tab, as shown below:

 

There are a couple of Test Cases that we added and you can also check the Coverage by clicking on the Coverage option in the screen above.

Read More  Control Access To Microservices With GRPC And Traffic Director

 

The Transition coverage is shown above and you can see the value for Yes for the two test cases that we captured. Additionally, you can also see the Intents coverage via the Intents option above. The screen is shown below:

 

You should go ahead and try out other flows and scenarios via the Test Agent feature. Capture those Test Cases and take a look at the overall coverage. This will ensure that you are testing the transitions and intents and if there are newer versions of the Agent, you can ensure that there is no regression by running these Test Cases at any time via the Run option.

Additionally, if you would like to look at Test Cases in detail, we suggest looking at the prebuilt Agents that are available as part of Dialogflow CX. Import one of the pre-built Agents like Travel : Car Rental Agent or Travel : Baggage Claim Agent and visit the Test Cases.

This concludes our overview of Test Cases in Dialogflow CX. Feel free to reach out to me on Twitter @iRomin for any questions or feedback. Do check out the references in the next section for learning more about Dialogflow CX and Test Cases.

References

  • ABC Holiday Resorts – Sample Agent File
  • Dialogflow CX Documentation
  • Dialogflow CX Testing
  • Dialogflow CX prebuilt Agents
  • Travel : Car Rental Agent
  • Travel : Baggage Claim Agent

 

 

By: Romin Irani (Developer Advocate)
Source: Google Cloud Blog


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Dialogflow CX
  • Google Cloud
You May Also Like
Points, Lines and a Question
View Post
  • Architecture
  • Design
  • Engineering
  • People

What Is The Point In Making Points?

  • November 26, 2025
View Post
  • Engineering
  • Software Engineering

Development gets better with Age

  • October 9, 2025
View Post
  • Engineering
  • Technology

Apple supercharges its tools and technologies for developers to foster creativity, innovation, and design

  • June 9, 2025
View Post
  • Engineering

Just make it scale: An Aurora DSQL story

  • May 29, 2025
View Post
  • Engineering
  • Technology

Guide: Our top four AI Hypercomputer use cases, reference architectures and tutorials

  • March 9, 2025
View Post
  • Computing
  • Engineering

Why a decades old architecture decision is impeding the power of AI computing

  • February 19, 2025
View Post
  • Engineering
  • Software Engineering

This Month in Julia World

  • January 17, 2025
View Post
  • Engineering
  • Software Engineering

Google Summer of Code 2025 is here!

  • January 17, 2025

Stay Connected!
LATEST
  • 1
    IBM Study: One in Four Malicious Breaches are AI-Enabled, Costing Companies $6 Million on Average
    • July 29, 2026
  • 2
    Accelerating the frontiers of scientific discovery: Google’s $40M commitment to the Genesis Mission
    • July 26, 2026
  • 3
    3 Questions: Neural transparency and the future of AI design
    • July 17, 2026
  • 4
    Intel Invests €5 Billion to Expand Manufacturing in Europe
    • July 13, 2026
  • 5
    IBM and Red Hat Expand Lightwell with New Offerings to Build the Trust Infrastructure for AI-Era Open Source
    • July 8, 2026
  • 6
    When I Was Young
    • July 4, 2026
  • 7
    The Fastest AI Fried Chicken In The World
    • June 29, 2026
  • 8
    Zed Approves | How to Stay Cool in Extreme Heat
    • June 29, 2026
  • 9
    The AI investment surge hasn’t produced the expected results yet. That could change in 2026
    • June 26, 2026
  • 10
    Zed Approves | It’s Prime Day 2026! Time to Upgrade Your World Cup Viewing Setup and Beat the Heat
    • June 25, 2026
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Zed Approves | The Best Prime Day PC Deals: Top Gaming Rigs, Workstations, and Everyday Laptops
    • June 24, 2026
  • neon-cart 2
    Zed Approves: How to Gear Up for GTA 6 This Amazon Prime Day (2026 Quick Guide)
    • June 22, 2026
  • zedreviews-valerion 3
    Father’s Day Outdoors – Build Dad the Ultimate Backyard Watch Party
    • June 20, 2026
  • zedreviews-fathers-day-50830 4
    Father’s Day Outdoors, Round Two – Gear for the Action, the Tailgate, and Beating the Heat
    • June 20, 2026
  • zedreviews-fathers-day-2147684744 5
    The Ultimate Father’s Day Gift Guide – Home Entertainment Upgrades Dad Actually Wants
    • June 20, 2026
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.