• Skip to primary navigation
  • Skip to main content
Alexandre Vazquez
  • Home
  • TIBCO
    • TIBCO BusinessWorks
    • Flogo
    • TIBFAQS
  • Architecture
    • API
    • Security
    • Integration
    • Event Processing
  • Kubernetes
  • Monitoring
    • Observability
    • Prometheus
    • Log Aggregation
      • Loki
  • Service Mesh
    • Istio
  • Helm
  • Editorial
  • About Me

Flogo Test: Learn How To Master Tests in Flogo!

Published on 2019-07-15. Last Updated on 2022-09-14 by Alexandre Vazquez

Flogo Test: Learn How To Master Tests In Flogo!
Photo by David Travis on Unsplash

Flogo Test is one of the main steps in your CI/CD lifecycle if you are using Flogo. You probably have done it previously in all your other developments like Java developments or even using BusinessWorks 6 using the bw6-maven-plugin:

Flogo Test: Learn How To Master Tests In Flogo!
GitHub – TIBCOSoftware/bw6-plugin-maven: Plug-in Code for Apache Maven and TIBCO ActiveMatrix BusinessWorks™
Plug-in Code for Apache Maven and TIBCO ActiveMatrix BusinessWorks™ – GitHub – TIBCOSoftware/bw6-plugin-maven: Plug-in Code for Apache Maven and TIBCO ActiveMatrix BusinessWorks™

So, you’re probably wondering… How this is going to be done by Flogo? Ok!! I’ll tell you.

First of all, you need to keep in mind that Flogo Enterprise is a product that was designed with all those aspects in mind, so you don’t need to worry about it.

Regarding testing, when we need to include inside a CI/CD lifecycle approach, these testing capabilities should meet the following requirements:

  • It should be defined in some artifacts.
  • It should be executed automatically
  • It should be able to check the outcome.

Flogo Enterprise includes by default Testing capabilities in the Web UI where you can not only test your flows using the UI from a debug/troubleshooting perspective but also able to generate the artifacts that are going to allow you to perform more sophisticated testing

So, we need to go to our Web UI and when we’re inside a flow we have a “Start Testing” button:

Flogo Test: Learn How To Master Tests In Flogo!

And we can see all our Launch Configuration change and most important part for this topic be able to export it and download it to your local machine:

Flogo Test: Learn How To Master Tests In Flogo!

Once everything is downloaded and we have the binary for our application we can execute the tests in an automatic way from the CLI using the following command

.\FlogoJWTEcho-windows_amd64.exe' -test -flowin .\MainFlow_Launch_Configuration_1.json -flowout MainFlow_out.json

This is going to generate an output file with the output of the execution test:

Flogo Test: Learn How To Master Tests In Flogo!

And if we open the file we will get the exact same output the flow is returned so we can perform any assert on it

Flogo Test: Learn How To Master Tests In Flogo!

That was easy, right? Let’s do some additional tweaks to avoid your need to go to the Web UI. You can generate the launch configuration using only the CLI.

To do that, you only need to execute the following command:

.\FlogoJWTEcho-windows_amd64.exe' -test -flowdata MainFlow
Flogo Test: Learn How To Master Tests In Flogo!

But, how do you know the flows in your application without going to the Flogo Web UI? Just with the following command:

.\FlogoJWTEcho-windows_amd64.exe' -test  -flows
Flogo Test: Learn How To Master Tests In Flogo!
If you find this content interesting please think about making a contribution using the button below to keep this content updated and increased!


Related articles:

Tibco Flogo IntroductionTIBCO Flogo Introduction Installing Flogo ExtensionsInstalling Flogo Extensions Building Your First Flogo ApplicationBuilding your First Flogo Application Flogo Performance: How Performant Can Be Your Services With Flogo? (Flogo Vs Python)Flogo Performance: How performant can be your services with Flogo? (Flogo vs Python)

Copyright © 2023 · Custom on Genesis Framework · WordPress · Log in