R#SDK functional tests. Error running NUnit tests.
Hello.
I have a problem with launching tests on my project "mockmetrics". There is one assembly with functional tests for resharper plug-in. Resharper SDK creates an in-memory instance of ReSharper, a solution and a project for this tests, so it takes a lot of time. Currently test assembly contains only one test. I try to perform it on AppVeyor, and it takes 40 minutes(build 0.0.1.14). And then message appears: "Error running NUnit tests.". What does it meаn? Is there a problem or just test has failed?
Kozhevnikov Dmitry.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 30 Oct, 2013 03:25 AM
Hi Dmitry,
How long does this test take on your dev machine?
Have you tried running NUnit console using script (to see output) like described in this article? http://www.appveyor.com/docs/custom-build-scripts
-Feodor
2 Posted by d.o.kozhevnikov on 30 Oct, 2013 03:46 AM
It takes 40-50 seconds on my machine.
I tried running build script: "nunit-console.exe /result:%OutFolder%\myresults.xml MockMetrics.Tests.dll", and got an error: "The given path's format is not supported." What is wrong with this script?
Support Staff 3 Posted by Feodor Fitsner on 30 Oct, 2013 03:50 AM
Try
nunit-console.exe /result:%NUnitResults%\myresults.xml MockMetrics.Tests.dll
or evennunit-console.exe MockMetrics.Tests.dll
just to see if it goes through.4 Posted by d.o.kozhevnikov on 30 Oct, 2013 04:01 AM
Got "Build script file could not be found: nunit-console.exe MockMetrics.Tests.dll".
It seems, that I am doing something wrong =). I choose Script in "Settings\Build\Buil Scenario" and type "nunit-console.exe MockMetrics.Tests.dll" into "PowerShell or batch script file" textbox. And nothing more.
Support Staff 5 Posted by Feodor Fitsner on 30 Oct, 2013 04:15 AM
Oh,
PowerShell or batch script file
should be a path to a script, not a command itself :) for examplescripts\run-tests.cmd
....I will think how to make this part of UI more clear.
6 Posted by d.o.kozhevnikov on 30 Oct, 2013 04:45 AM
My mistake.
Where in solution cmd file must be, to maked available to appveyor?
Support Staff 7 Posted by Feodor Fitsner on 30 Oct, 2013 05:14 AM
Any location within repository. Path to a script is the path relative to repository root. For example, if there is
scripts
folder in the root of repo with all build scripts then path should bescripts\myscript.cmd
.8 Posted by d.o.kozhevnikov on 30 Oct, 2013 07:25 AM
Ок. Cmd file is found. Build log contains error:
Could not find file 'd:\Builds\rnkf7tg7ps\src\MockMetrics.Tests.dll'.
Support Staff 9 Posted by Feodor Fitsner on 30 Oct, 2013 01:55 PM
When build script runs the working folder is
src
, so you have to provide full path to DLL, something likeproject\bin\debug\myassembly.dll
.10 Posted by d.o.kozhevnikov on 31 Oct, 2013 01:39 AM
Ok.
Looks like, everything works fine. Build takes 2 minutes 51 second. Nunit console reports, exactly as expected, that:
Tests run: 2, Errors: 0, Failures: 0, Inconclusive: 0, Time: 123.3104733 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Support Staff 11 Posted by Feodor Fitsner on 31 Oct, 2013 01:54 AM
Great to know! Then where was the problem? :)
12 Posted by d.o.kozhevnikov on 31 Oct, 2013 02:23 AM
When AppVeyor seek and perform tests itself, as I post yesterday, it takes over 40 minutes, and then failed. I choose build scenario "Visual Studio Solution", and then test type "Run Tests". I expect, that after succesfull build AppVeyor takes assembly, that has reference to nunit-framework, and run all tests. May be I am doing something wrong again.
Support Staff 13 Posted by Feodor Fitsner on 31 Oct, 2013 04:11 AM
Well, maybe AppVeyor is picking up a wrong assembly.
Could you please try specifying this particular assembly in "include" list on "Tests" tab?
For VS Solution scenario the path would be
<projectname>\assembly.dll
.14 Posted by d.o.kozhevnikov on 31 Oct, 2013 05:32 AM
Unfortunately, tests were not found. I have tried over 15 configurations, besides what you suggest.=( Every time the run-tests-phase takes 1-2 minutes, but tests were not run or even found.
Support Staff 15 Posted by Feodor Fitsner on 31 Oct, 2013 04:50 PM
I will take a look what's wrong. Might be a bug.
Is it a public project?
16 Posted by d.o.kozhevnikov on 01 Nov, 2013 12:24 AM
Yes, it is public.
17 Posted by d.o.kozhevnikov on 12 Nov, 2013 06:47 AM
Hello.
Are there any optimistical news? =)
Kozhevnikov Dmitry.
Support Staff 18 Posted by Feodor Fitsner on 12 Nov, 2013 02:50 PM
I haven't looked into it yet - I mean why Appveyor could not discover NUnit tests in that assembly. But I filed a bug to resolve later.
Working hard on the next release which will have more transparent progress reporting and log - easier to troubleshoot any issues.
19 Posted by Sumit Pandey on 22 Apr, 2014 12:11 PM
Hi, i extracted test case from selenium as webdriver/nunit/c# and running from visual studio integrated with nunit..... when i run those script from NUnit it shows error on a line whereas same script which i recorded using selenium when run from selenium runs correctly without any error.
what should i suppose to do????
driver.FindElement(By.LinkText("Skill")).Click(); error is on this line
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.