Run single test with RubyMine - ruby

I´m using Selenium IDE and the export function to generate Ruby/WebDriver tests which I then extend step by step so that I end up with a couple of test methods per class.
I would like to run just one single test method from that class, but I don´t find an option within RubyMine to do so.
Thx.

What works for me (rspec, minitest) is placing the cursor in the test case I want to run, or in the beginning of the file if I want to execute all tests within that file, and hitting Shift + F10.
Please consult the Run menu as well for further options.

The name of the test class hast to start with "Test". If this is the case, the methods starting with "test" are recognized as tests, and the context menu offers to execute just that single test.

Related

Run different testcases using panel button in CANoe

I have the different test cases developed in test environment using CAPL.
Now I want to run all the testcases designed in CANoe. It should run using a button from panel in CANoe.
Can anyone give an alternative solution to access the testcases in panel from just only one button?
There are two ways to achieve this.
Easy way: Go to the configuration of the Test Module. Enable the Start condition using a system variable. Now you can attach this system variable to a control in your Panel and you can start the test case from the panel. In this method, you can only Start a Test case. It is not possible to stop a test case using system variable.
Hard way: You can develop a .NET Panel (how-to available under chapter ".NET Panels") and then access the CANoe config via COM. In this method, you can have complete control over your test cases (start, stop, resume, etc.)

How can I see the results of my Unit Tests in VS2017?

I'm running unit tests on my GetModelAsync() and CreateModelAsync() methods in VS17. I then run Assert.Equal checks on the model fields to ensure they match the expected values.
I want to be able to see the final state of my models, which will help me determine why a test is failing or allow me to manually check my models. I'm thinking something similar to tracking variables in the debugger would make sense, although I don't want to actually run the debugger.
Is there a way to do this?
You can write to the console in your tests and it will show up in Test Explorer. You may want to serialize complex objects to JSON first before doing this. For example:
Console.WriteLine(JsonConvert.SerializeObject(myObject));
Note, for Visual Studio's built in test runner, you have to go through a few steps to see the console output. In the Test Explorer window, click the name of your test, then in the results panel click the Output link, which will open a separate window to show the console output. It's all very unintuitive.

Is there any way to add/customize in VSTF the Test Runs colums/information?

As a test engineer we always find the lack of info in the Test Runs tab too confusing and useless when it should be one of the most important tab in order to know which test runs are related to which tests builds, test plans, creators, etc
However I can´t find a way to add more columns or info like in the test plan tab. Is there any way to fix this?
No, you can’t add additional columns to test run in Test>Runs tab, you need to check those information in the summary of a test. (Double click a test run> Test results> double click a test)
There is a user voice that you can vote: Additional columns for test run in test > Runs tab

Test item or test item group start from commandline in TestExecute

Is it possible to start subgroup of tests from TestExecute command line?
I want to be able to start Emulators or SemiReal subgroup(with folder icons on image) or Emulators or SemiReal test.
I tried different combinations from description: http://support.smartbear.com/viewarticle/54705/
Here is the last result but still not working:
"%PROGRAM_FILES%\SmartBear\TestExecute 10\Bin\TestExecute.exe"
"C:\TestProject\LraTestProjectSuite.pjs"
/r /p:EpicIteration /projectitem:SemiReal /e
Result is:
The project item 'SemiReal' was not found in the project 'EpicIteration'.
Test project structure looks like this:
What is the right way to start different subgroups of tests from commandline?
It is impossible to run a specific test item from the command line. The /projectitem parameter you are trying to use for this runs a project item (e.g. Network Suite job or specific keyword test), but not a test item.
You can find a solution that will allow you to run individual test items in this article on the SmartBear web site.

Running tests using the menu vs. shortcut keys

In VS2010, if I click on
Test->Run->All Tests in Solution (CTRL+R,A)
All of my tests will run and I'll be able to see what tests passed and what tests failed.
If I use the shortcut (Ctrl+R,A), then it will break when an exception is thrown.
Why is this experience different? How can I run all my tests through no matter what without going to the menu bar?
The chord "CTRL-R, A" executes
Test->Run->All Tests in Solution (CTRL+R,A)
The chord "CTRL-R, CTRL-A" executes
Test->Debug->All Tests in Solution (CTRL+R,CTRL-A)
So the fact is that you aren't using the shortcut you think you are.

Resources