How to use sparse checkout options using DSL - maven

I'm not sure how to use sparsecheckoutpaths option in a DSL script. If I don't pass any argument then it works fine, but it's not working when I pass any argument, so I just need the sample code for using this option.
I tried to pass string, list but it's not taking any option.
ERROR: (script, line 13) No signature of method: javaposse.jobdsl.dsl.helpers.scm.GitExtensionContext.sparseCheckoutPaths() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [testValue]

You can not configure sparsecheckoutpath directly via job dsl. You have to use the configure block like in this answer.

Related

What to pass to 'client_config' parameter in the 'local_server_flow' method

For the most part I understand how to use the function 'local_server_flow', but I have looked through the docs trying to figure out what to pass to the client_config parameter but cant seem to fin any real usage examples of 'local_server_flow' that suggest what to actually pass to the client_config parameter.
Any suggestion for what to pass to the 'client_config' parameter?

How to test Azure function with multiple parameters

Via Azure Functions Core Tools I managed to test functions with 1 parameter, for instance http://localhost:7071/api/CheckMail?email=Test#test.test.
But I have not yet found how I test a function when I add a second parameter.
Can you help me out?
Use the & character to add aditional parameters:
http://localhost:7071/api/CheckMail?email=Test#test.test&name=bartvd
In the example URL below, multiple query parameters are separated by the ampersand, &:
http://example.com/path/to/page?name=ferret&color=purple
The order of the queries doesn't matter (name=ferret&color=purple and color=purple&name=ferret both produce the same results) and the exact structure of the query string is not standardized. Methods used to parse the query string may differ between websites.
More information: Query string

How do you mix JMeter command line args with Gui args?

I am trying to run a single recording in various different ways without copying the recorded pages.
I have created two Property File Readers that look for:
C:\performance\jmeter\users_${__P(ttype)}.properties
and
C:\performance\jmeter\${__P(env)}_${__P(region)}.properties
where the ${__P(xxx)} variables are passed on the command line as so:
-Jregion=UK -Jenv=dev -Jttype=isolated
These property files load the following variables (for example):
- usercount=25
- duration=1800
- host.name=server1
- host.port=8546
These are used in the HTTP Request Defaults:
${__P(host.name)}
${__P(host.port)}
and Thread Group:
${__P(duration)}
${__P(usercount)}
This works fine. However, if I want to run the same test in the Gui for a single thread (to check it works), these variables are not populated and the test fails.
I can create a User Defined Variable element but these have the format
${xxx}
so cannot be used interchangeably.
Is there any way to do what I'm trying to do here, please?
Option 1: you can pass the same parameters via '-J` arguments as JMeter in the GUI mode respects them as well
Option 2: you can specify your properties values in user.properties file (located in JMeter's "bin" folder) like
usercount=25
duration=1800
etc.
The properties values passed over the command-line will override those, which are specified in the user.properties
See Apache JMeter Properties Customization Guide for more information on using JMeter properties
By the way, you ain't gonna need this Property File Readers, there is a possibility to add extra properties files in JMeter via -q command line argument.
-q, --addprop
additional JMeter property file(s)
Discovered another way to resolve this issue.
The __P() function can take a second argument that acts as the default if the first value isn't resolved.
So
${__P(host.name)}
${__P(host.port)}
become
${__P(host.name,server1)}
${__P(host.port,1234)}
This works as well.

Runtime Test Data for Testscript in TestComplete

I started using Test Complete to automate Desktop application.
The issue is scripts holds the value which i entered while recording and the value is hard-coded.
i want the pass the value during run time. how can i achieve it?
This depends on how you want to do this. If you want to put it to your test as a parameter from another test or using a project's test item, you can define a keyword test parameter (see Keyword Test Parameters).
If you want to make a human user specify a value on runtime (although this is not very "automated"), you can create a user form that will request this value (see User Forms - Overview).
And if you want to pass a parameter to your test using command line, you can use script to read parameters from the TestComplete command-line, assign a project variable with this value and then use this variable instead of a hard coded value. See ParamStr Method, ParamCount Method and Project And Project Suite Variables.
And if you want to feed your test with some data from an external source, you can do this using the data-driven testing feature of TestComplete. See Data-Driven Testing.

how to pass parameter in custom command in Gocd tool?

I am trying to use go cd for continuous delivery and create a pipeline for the same. I m able to get success result after running the job but in that job i did not pass any parameter.I want to pass parameter in custom command to reduce repetition within my configurations.
We can pass parameter via a environment variable -eg If you want to pass a version in your custom command and value is 1.2.4 so define the value in environment variable and pass the value in your command for example ./abc #{version}.
You might get error while editing the command (Parameter is not defined error) add the same varibale in parameter tab as well .[![enter image description here][2]][2]
I could not get the clear picture of what you are expecting. But as far as I could understand, you want to perform a custom command task by passing few parameters as input.
When you choose custom command, you will get something like
In Arguments block, you could give the input parameters you need to pass for that particular task.
Edit : I think this may help you.
Parameterize your Configuration
Please go through this link and see whether this helps you. They had explained about defining and using the parameter in a pipeline

Resources