If you’re writing code you should be thinking about ways to test it. This should apply even if what you’re writing is not immediately familiar as code. HP Operations Orchestration (HP OO) is an orchestration tool with a visual IDE. It’s used to create workflows by dragging and dropping operations together and then connecting them. The idea is to provide a simple interface for operations engineers to automate tasks they would otherwise perform manually. Despite the simple interface, it is still possible to create quite complex logic within these workflows. Add to this, the fact that your workflows probably connect to lots of systems, and you soon realise why you need to test the content you are creating.
Testing Operations Orchestration content is not entirely easy. The best way to start is by creating some simple test wrapper flows around the workflows that you want to test. They should take the flow you are working on, hardcode some test inputs and check the output of the flow, the response should be “resolved” if everything worked. These are somewhere between a unit test and an integration test. Once you have these created, you can run them directly from studio to test the flow you are working on. It’s up to you how thorough you want to be with this. You’ll also want to think about setup and teardown for each flow you test.
Once you are ready to commit the workflow you’ve written, you need it to be built into a content pack and deployed to an OO central. Then you should run each test workflow to check that they work for that particular build. This gives you confidence that the flow can reach all the endpoints it needs to and that any other criteria in the test flow is met.
To automate this and turn it into a proper pipeline you’ll want to use something like Jenkins or Team City to create the builds, do the deployments and run the test workflows. To make this easier, I’ve written a command line tool (https://bitbucket.org/automationlogic/oo_client) that can build content packs, deploy them and run workflows using the OO REST API. It also has a test runner that will run all flows matching a pattern and aggregate the results. This means you’ll get a non zero exit code if any of the test flows fail. To set it up you should just create three jobs for each content pack. The first one is a build job, it should take the SVN/Git checkout and build a content pack, like this:
svn co svn://localhost/srv/svn/mmb-oo #Your CI tool will probably do this for you. cd mmb-oo/trunk/test-content/ mkdir target hpoo -a build -bp ./
The deploy job should take the created content pack and run this:
hpoo -a deploy -cp ./target/test-content-cp-2.0.1-109-SNAPSHOT.jar -c https://central.local:8443 -u admin -p admin
Finally, you can run your test flows with a job that runs this:
hpoo -a integration_test -cp test-content --filter tests/integration_tests/test_ -c https://central.local:8443 -u admin -p admin
For full examples, check out the README
Hopefully that has given you some ideas for how to speed up your development of OO content whilst ensuring that you are creating something that can be tested.
We work with our clients to de-risk and accelerate their business goals realisation. Our approach is based on tailoring our services to fit your needs leveraging our portfolio of strategy, execution, innovation and service delivery offerings to help you reach your objectives
We’re always on the lookout for exceptional talent and people who share our values. Even as we continue to grow, we maintain a family environment with respect and teamwork core to our culture.
Companies can start deploying containerised workloads to Kubernetes In days not months, by leveraging Automation Logic’s Kubernetes Platform Accelerator.
Largest Irish-Founded Tech Employer Surpasses 3000 Employees Signing 15th and 16th Acquisition Deals Version 1, a leading digital transformation partner, is to acquire Automation Logic – for an undisclosed sum as part of its ambitious growth strategy for 2023 and beyond. The Automation Logic deal is subject to clearance by the National Security and Investment […]
Automation Logic were recognised as one of the UK’s best Workplaces again for the 5th year running! We also placed 29th in best workplaces for women. This highlights the great work that we are doing as a business, including all the wonderful work being put in by the employee-led DE&I groups. This award means so […]