Running Cucumber Ruby Tests on Octopus

(Chrisgilroyqa) #1

Hi!

I am new to Octopus and have been commissioned by my company to wire in our UI automation tests into an Octopus pipeline and have been running into problems. We are using Cucumber/Ruby (Watir) for our automation tests. I have gotten the pipeline to pull down the code to a tentacle and execute the tests, using the Script steps, but when the tests execute, they all fail because they can’t find the object in the browser. Any Screenshots that are taken by the execution are black boxes.

I think the tentacle doesn’t use the UI which is what is causing the tests to fail, but I need to get them to work in the pipeline. I did try to give the OctopusDeploy Tentacle access to interact with the desktop. That didn’t work. I would like to avoid running the tests headless if possible, so what are my options here? Does Octopus work with Watir? Do I have any UI test executions options here?

Thanks for your feedback, I was looking for something related to this on the forums, but I wasn’t able to find anything that specifically touched on my problems here.

(Michael Richardson) #6

Hey Chris,

I suspect your diagnosis is exactly right. The problem is Tentacle runs as a non-interactive Windows service.

From past user experiences, your options are:

  1. Run the tests headless. I mention this option first as you have already said you’d prefer not to, and I understand this. If you do change your mind, my colleague wrote a detailed blog series on running Selenium WebDriver tests.
  2. Run the tests in interactive mode. One way to achieve this is to run Tentacle as a process rather than a service. This StackOverflow answer details their approach. Another way is to indirectly launch the test process interactively; this response indicates they achieved this via a scheduled task.

When you say

In what way did this fail? Did the Tentacle fail to start, or were the screenshots still blank?

(Chrisgilroyqa) #7

When you say

chrisgilroyqa:

I did try to give the OctopusDeploy Tentacle access to interact with the desktop. That didn’t work.

In what way did this fail? Did the Tentacle fail to start, or were the screenshots still blank?

The screenshots are still blank and the script fails still. Thanks for the reply I will look into those resources and update this post with my results!

1 Like