Category "groovy"

How to handle a Zoho CRM autocomplete in Katalon Studio test cases

I'm at an impasse on this ever-present autocomplete widget in the Zoho app that I'm to test. It pops up on the CRM pages under test, and to handle it, I had the

getting springboot to support groovy 4.0 (apache packaging) | needed 3.0.0-M2 and more

spring-boot > 2.3.1 will grab groovy-bom from codehaus instead of org.apache.groovy packaging, even if you declare org.apache.groovy dependendices I found th

Groovy Script error: Unable to process url

I am actually trying to list the files available in artifactory url. But getting the error groovy.json.JsonException: Unable to process url: at ConsoleScript27.

Add double quotes to JSON input using groovy script

I'm working with Json file and the json structure is incorrectly formatted. I would like to add double quotes (") in the below JSON using groovy scripting. Inpu

how to run GroovyTestCase in Eclipse?

I'm new to both Eclipse and Groovy. In Eclipse, I set up a new project. I added a new Groovy script that looks like this println "Hello jerkface! I can hit the

Pass parameters to Jenkins shared library

I just simply want to pass the repo name cloud-nates in shared pipeline, so i've passed the parameter deployName from jenkinsfile to shared library. below is th

How to re-trigger a stage in a Jenkinsfile

I have a situation where in 2 Stages in a Jenkinsfile I have to do the following things: Push a Docker image to artifactory. This push is to a folder on artifac

Java code to Convert JSON into a Map with specific fields as Key and values

I have a JSON as follows [ { "a": "John", "id": "6", "c": "val1" }, { "a": "Jack", "id": "6", "c": "

how to run java selnium junit Tests using groovy

I am using ReadyAPI which use Groovy as Scripting language. But, I built a Selenium 4 framework which Tests some IHMs in my work using java8 and Junit4, and it

Groovy script to get translations using Google Translate API gives java.lang.NoSuchMethodError

I am trying to write a Groovy script to get translations from Google Translate API (using an API key, stored in as the GOOGLE_API_KEY environment variable1) but

Script section is not working in pipeline script in shared library

My Jenkins file: @Library("shared@dev")_ Start() My Start.groovy pipeline script: def call() { pipeline { agent any stages {

Groovy LinkedHashMap returned from a Jenkins shared library is converted to String

I have a function in a Jenkins shared library which builds and returns a map object (class java.util.LinkedHashMap): #!/usr/bin/env groovy def call(Map config)

In groovy, how can i iterate over a csv file and call a function for every "group" that as a different value on some of the columns?

In Groovy and running on a jenkins pipeline, I am using the readFile function from jenkins to read the csv file. Example csv: name val1 val2 John 2 122 John 2

How to generate numbers in order from 1 to 10000 in groovy?

I need to parameterize the script so that the numbers are used in order

Escape & character in groovy script while using curl

I'm using bash execution of curl in groovy script: descr = """ curl --silent -k -u test:test "https://bitbucket/rest/api/1.0/projects/test/repos/test/pul

Jenkins active choice options populated with gke cluster namespaces

I am trying to create a Jenkins pipeline with active choice parameter options populated with GKE Cluster namespaces. I can Run a single shell command and get ou

Fill Map<String, Object> with two strings

I want to fill my Map with two strings. For my Map I have to use <String, Object>. Using <String, String> would instantly solve my problem, but that

Running Groovy in Email Extension Plugin Jenkins

I need to create a url and send a mail from the Jenkins Email Plugin. I simply need the filenames to creat the url. The files are in the workspace itself. After

Call helpers in a Jenkins Shared Library

I have a Jenkins Shared Library organized like that : +- src | +- main | +- jenkins_shared_library | +- helpers |

How to reset a method mock in Spock?

I had a mocked bean in a configuration: @Profile('test') @Configuration class TestSecurityConfig { private final mockFactory = new DetachedMockFactory() @Pr