Page 1 of 1

Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 8:44 am
by theraviz
Hi,

When I try to execute a test case I am getting the below error .

"Project is configured as dll and no execution command is specified. You can specify an execution command in the project option"

My project option is as below. Please help to make it executable form Test Suite.
Capture.JPG

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 8:47 am
by odklizec
Hi,

You must change Output type to 'Console' or 'Windows' application.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 9:34 am
by theraviz
Tried both. Its not working still. Please help
Capture.JPG

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 9:47 am
by odklizec
Hi,

Are you sure the project you changed to Console/Windows application is set as Startup project? How many projects do you have in your solution?

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 9:51 am
by theraviz
Hi,

Unfortunately there is no projects or anything in Startup objects as you see in screenshot. (Why so?)

All I could do is to change the “Output Type” value.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 9:58 am
by odklizec
Hi,

To set the project as Startup project, simply right click the project (in Projects view) and select Set as startup project...
SetAsStartup.png

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 10:03 am
by theraviz
Tried to do the same steps. But when I click on "“Set as startup project” I got the same error again!
Capture.JPG

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 10:22 am
by theraviz
Adding to my previous reply.. The error is showing for one project only which I have to execute now.

And for the other one I was able to successfully set it as start up project and able to select the project name from "Startup object" too.

How to fix the other project? :(

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 11:07 am
by odklizec
Hi,

As the error message suggests, the project is still configured as dll (class library). You must set it as Console/Windows application, otherwise, it's not executable.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 11:25 am
by theraviz
When I right click the project and clicked on “Select as Startup project” I got the above error.

Then I went to project properties, selected “Output Type” as “Console Application”. The “startup object” was missing.

Now when I right clicked the project I was able to select “Select as Startup project” with now error and it was set. But the problem is “startup object” drop down is still empty in the project properties even after setting the project as startup.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 11:31 am
by odklizec
Hi,

"Startup object" combo is probably not important. At least I have it empty and all works as expected.
ProjectOutputType.png

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 11:35 am
by theraviz
Ofcourse its all the same. Still no luck :(
Capture.JPG

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 11:42 am
by odklizec
Well, it looks really weird. I think the solution is probably corrupted? What version of Ranorex do you use? Have you tried to reproduce the problem with fresh new solution? I think you will have to contact Ranorex support and send them your solution for review.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 12:08 pm
by theraviz
Its 9.1.2.

Re: Cannot Execute test from test suite

Posted: Mon Oct 21, 2019 1:59 pm
by odklizec
I see a potential issue in your project settings! Please click the button with blue icon under Output type settings and uncheck Configuration-specific option! Or, if you want to preserve this option enabled, you must switch the project Configuration from "Debug" to "Release" and then change the Output type also there! You see, with enabled Configuration-specific option, Debug and Release settings could differ, which is most probably also your case! ;)