Start test by cc.net on remote machine - nunit

folks!
I am a newbie for cc.net tool. And i have got problem.I use a chain c#+webdriver for chrome + nunit (2.6) + cc.net ( 1.6.7981.1).I want run my test tasks on remote machine (no cc.net server machine).I have investigated this issue, but didnt found clear answer about distributed launching webdriver tests.
Is it possible for current cc.net?

i resolved issue by next way:
I shared a folder on remote machine and include in cc.net config a few tasks.
Task for copying a code to remote machine (xcopy)
Task for launch psexec which start bat file on remote machine
bat file includes 2 commands:
run msbuild
run nunit-console
After test work cc.net catch testresult file and send mail.

Related

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)

Is there any way to start a selenium server from the command prompt with out internet

i would like to run the selenium server from the command prompt with out the internet connection. Every time when i run below command
webdriver-manager start will always needs internet connection to start the server because this commands is checking for new binaries .
But i would like to run the selenium server with the binaries which are already downloaded to my system with out checking for new binaries.
When i search for above question i found a below solution.
webdriver-manager start --versions.standalone version number
Even though i am using above command and try to run the selenium server by specifying the version number still it is depends on internet connection.
Can any one help me how to start the selenium server with out internet . I dont want checking process while starting the server
Actually, webdriver-manager start execute a Java CLI after query latest binary, so you can just execute the Java CLI directly if you have download the binary to avoid access internet to query latest binary.
set Webdriver_Basedir=C:\Tools\npm-global\node_modules\webdriver-manager\selenium
java
-Dwebdriver.chrome.driver=%Webdriver_Basedir%\chromedriver_2.35.exe -Dwebdriver.gecko.driver=%Webdriver_Basedir%\geckodriver-v0.19.1.exe -jar %Webdriver_Basedir%\selenium-server-standalone-3.9.1.jar -port 4444
1.Download Selenium Remote Control from http://seleniumhq.org/download.
2.Extract the ZIP file.
3.Start a Command Prompt or a console window and navigate to where the ZIP file was extracted.
3.Run the command java –jar selenium-server-standalone.jar
Please try this the above

Bamboo deploy using Powershell script

When trying to Deploy IIS content files using powershell, I am seeing the following error:
Failing task since return code of [powershell -ExecutionPolicy bypass
-Command /bin/sh file.ps1
We are trying to deliver web content (several web service folders) and a set of associated web.config files to an IIS server using a powershell scrpt. The script and config files are stored in SCM (Stash) and pulled across as part of a checkout task in Bamboo which are then published as artifacts to the bamboo deploy job.
The deploy job is failing.
Does anyone know the correct way to set this up both in the Bamboo Deploy job or on the Windows Server?
Many thanks in advance.
For anyone trying to resolve this issue in future, I resolved this issue by installing a Bamboo agent onto the Windows Server.
This means that the powershell script gets checked out onto the Windows server as part of the deploy job (using the Sourcecode checkout task) and so can then be run as powershell rather than the Bamboo local agent which is running on a Linux box trying to run the powershell script as a linux shell.
The only other issue that had to be overcome was ssl certs needed to be installed into the JKS (cacerts) file on the Windows Server (where the remote agent is running) as we have Bamboo running over https.

Run jar file in remote computer

I need to run some jar file in another machine in LAN.
java -jar start.jar
How to run a jar file on remote computer?
Thx!
I faced the same issue in my project while accessing resources in a distributed systems environment. If you working on Windows, you need PsExec v2.x.
Create a batch file to execute java -jar start.jar from remote cmd.
Now run the batch file from ur local machine by PSEXEC \\othermachine z:\program.exe. You will need administrator privileges on the target machine.
Visit for documentation.
Lastly, if you demand platform independency and wish to run your jar on remote machine having OS other than the OS on your local machine, then you should go with socket programming.
Via remote client like ssh, teamviewer or custom solution with server-client connection.

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.