Can we choose environment(endpoint) from Jenkins to run ReadyAPI tests? - ready-api

I'm trying to run tests from Jenkins integrated with ReadyAPI and Maven.
currently, i'm switching the environment from a database and running the testcases.
Now, we want to choose the environment from Jenkins, is there any possibility to do so ?
Thanks

You can pass the environment to the command line test runner by using the
-E YourEnvironmentName
parameter.

Related

Fastlane working on terminal not on Jenkins

I am able to configure Fastlane locally and working well with terminal, but when I am trying to run it with Jenkins(I have configured Jenkins locally on my macbook) it is failing every-time(i have installed ruby 2.5.0 again).
Any help on the same would be highly appreciated.
I am attaching SS for your reference.
Jenkins run its build scripts using specified user 'jenkins'. You might want to check if 'jenkins' user had installed requires dependencies to run fastlane, for e.g ruby ...
Have you set up your PATH in Jenkins? In the configuration of your node, in the environment variables section, you'll want to include /usr/local/bin/ with Jenkins's PATH by entering /usr/local/bin/:$PATH.

Azure DevOps Release Pipeline Inline Powershell script failing to run python unittest suite

I have a release pipeline setup in Azure DevOps to run a regression test suite. I am running these tests remotely on a Microsoft self-hosted Windows Agent using Selenium (Python bindings) and the Python unittest framework, which invokes chromedriver.exe to run tests.
When the release job reaches the task Run Python Unit Tests however, it freezes and I don't see any output (although, when I open the task manager on the agent
I can see chromedriver and chome instances running which suggests that something is happening).
Other info -
I am able to connect to the agent sucessfully as all my repos and latest commits are pulled down (from an earlier task in the pipeline)
the Chromedriver path is set as an environment variable on the agent
I am using Chromedriver 2.43
I am using Python 2.7.14 as the interpreter (also set as an env variable in the Path)
The inline powershell task has the following in the Script to run field -
cd C:\path\to\folder\with\tests
python tests.py staging
The message displayed when this task runs in DevOps pipeline is -
Waiting for console output from an agent...
console output
When I run the tests locally on the agent with the exact same command (opening the cmd.exe terminal on the agent), I can see chromedriver opening and the tests running as expected (with output in the terminal too)
Why am I unable to run see these tests running when invoked from the inline powershell task in the release pipeline but able to see the tests run when invoked on the VM? And why does the output still not show as the tests are running?
(I have also tried a normal cmd.exe task in place of the inline powershell task, the same issue was encountered)
Any help would be much appreciated, thank you :)
EDIT:
Ran a simple selenium test to check everything was working and got a successful result. However -
I was still unable to see console output as the test was executing
I was still unable to "see" anything executing on the VM (so it appeared to be running as a background task but could not see chrome launching and navigating to pages etc)

Automate test run using Selenium IDE

I have used Selenium IDE to automate some basic screens of a website and they are working fine. However, just wanted to understand if there a way to automate scripts to run every 10 or 15 mins using Selenium IDE ? Please help?
You can run your ide tests from the command line:
http://www.seleniumhq.org/docs/05_selenium_rc.jsp#running-selenium-server
using the htmlSuite option:
https://wiki.mozilla.org/Running_IDE_scripts_with_Selenium_RC
Then you can run it from the command line with a cron job or you can use a Jenkins plug in: https://wiki.jenkins-ci.org/display/JENKINS/Seleniumhq+Plugin

How to configure Nant plugin in Jenkins

I have Jenkins with Nant-plugin. I have one job with nunit tests. When building the project I get an error:
Executing command: cmd.exe /C ""NAnt.exe ./nant.build && exit
%%ERRORLEVEL%%"" [GuiTests] $ cmd.exe /C '"NAnt.exe ./nant.build &&
exit %%ERRORLEVEL%%"' 'NAnt.exe' is not recognized as an internal or
external command, operable program or batch file.
Does it mean that I should install nant and manually set up environment variable? So why Nant-plugin?
Yes, like ANT plugin it requires an external installation. You can configure an automatic installation on the main Jenkins configuration page (http://<jenkins-server>/configure, search for Nant Builder), but in my experience it is better not to get involved with Jenkins automatic installations - they are rather quirky.
The reason for the plugin is portability of your builds. With the plugin you do not have to specify different build steps for, say, your Linux (Execute Shell) and Windows (Execute Windows batch command) builds, but rather can use the same Execute NAnt build step.

How to further automate Teamcity

I have successfully configured my project for build in TeamCity. Going a step more, I want to run a deployment script once a build completes successfully. The deployment script is a simple bash command. To make the question more simpler, how would I invoke a shell command once a build successfully completes in Teamcity.
Please help
TeamCity 6.0 has a new feature called Multiple Build Steps:
Multiple Build Steps: Now any build configuration can be comprised of unlimited number of build steps, where each step is represented by a build runner. Don’t limit yourself, and combine as many build runners into one configuration as you need. Feel free to call a NAnt script before compiling VS solutions, run inspections and duplicates finder after your ANT build, add NUnit tests after your Rake build, and so on.
So you can add a new build step with the command line runner which will execute your shell script.