SpecRun.exe: run .feature or .playlist file from command line - testing

Good day. I have a several .feature files:
1.feature
2.feature
1.playlist
2.playlist
etc.
I can run they separatelly in visual studio:
-any feature file in debug mode
-any playlist with Test Explorer.
But if i need to run one of they from command line, what i should do?
If i use SpecRun.exe run
SpecRun.exe run %profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log
this performs launch of ALL scenarios in ALL .feature files.

Have a look at the command line switches of the SpecRun.exe here http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/
You are looking for /filter to filter your execution to a single scenario.
The format of it is documented here: http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter

Related

only 1 file is ever executed under my tests/ folder for TestCafe

I have multiple test_*.js files underneath a /testcafe/tests/folder. When executing TestCafe from commandline OR via Visual Studio, only ONE file is ever executed....why would that be?
tests (folder)
test_somefilename.js
test_someOtherfilename.js
test_onlyfileexecuted.js
test_anotherfilename.js
When running the following command, only 1 of the files is ever executed:
testcafe <pathToTestFolder>/tests/*.js
this will only ever execute the file named test_onlyfileexecuted.js
WHY? I can manually type in the command to execute every single file and TestCafe works perfectly, but when doing glob pattern, that is the only tests found/executed....So Confused
Just run testcafe {browser} <pathToTestFolder>/tests/ (no *.js) and Testcafe will automatically pick up all the tests in that directory

Pipe console output of IntelliJ to a script

It is possible to pipe the console output of an intellij application to a bash command so I can pretty-print it on the console directly?
I know I can save the log output to a file, but I still want to keep it on the stout window only, but just parse it through a script.
Piping output is a feature of the terminal shell.
IntelliJ IDEA is not using a terminal to run your app, therefore it's not possible with the default Run/Debug configurations.
You could use an external tool that will open a command line shell and run your app there, but the shell has to be open in a separate window and it will not be possible to get the formatted output directly in the IDE.
There is a related feature request in YouTrack, but it's unlikely to be implemented soon.

Ho to run test complete project using command line?

I have a TestComplete project, called: automation.pjs, which contains some tests.
I want to run those tests using the command line and observe the results in the command line too.
I'm using TestComplete 14 on Windows OS.
Is it possible? Which command shall I run?
Do I need to download a specific plugin?
Thank you.
https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/command-line.html
You can also input these commands into windows task scheduler to have them run periodically!
-specify the path to your testcomplete.exe, input arguments such as /r, /e, /p etc.
e.g
cd ..\..\Program Files (x86)\SmartBear\TestComplete 14\Bin
TestComplete.exe "C:\Users\user.name\documents\ProjectSuite1\automation.pjs" /r /e

JMeter Test Results Monitoring/ Analysis

I want to start load testing by running JMeter from command line for more accurate test results, but how can I monitor the run and then analyze the results after the test finishes.
You can generate JTL (JMeter results) file while executing the JMX (JMeter script) file from command line. A sample command for generating JTL file will look like this..
jmeter -n -t path-to-jmeterScript.jmx -l path-to-jtlFile.jtl
After completion of script execution you can open the JMeter GUI and simply open the JTL file in any listener (as per your requirement).
Most of the listeners in JMeter have an option to save the results into a file. This file contains usually not the report itself, but the samples which are generated by the tests. If you define this filename, you can generate the reports using these saved files. For example see http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report .
If you run JMeter in command-line non-GUI mode passing results file name via -l parameter it will output results there. After test finishes you will be able to open the file with the Listener of your choice and perform the analysis.
By default JMeter writes results in chunks, if you need to monitor them in real time add the following line to user.properties file (lives under /bin folder of your JMeter installation)
jmeter.save.saveservice.autoflush=true
You can use other properties which names start with jmeter.save.saveservice.* to control what metrics you need to store. The list with default values can be seen in jmeter.properties file. See Apache JMeter Properties Customization Guide for more information on various JMeter properties types and ways of working with them.
You can also consider running your JMeter test via Taurus tool - it provides some statistics as the test goes either in console mode or via web interface.

Debugging individual protractor files with WebStorm

I want to be able to right click on an individual protractor test, click debug or run and have it execute. I can do this from the command line but I want to be able to debug with WebStorm to leverage the debugger.
By default when right clicking and debugging a file webstorm runs:
runnerw.exe "C:\Program Files\nodejs\node.exe"
--debug-brk=57698 --nolazy myspec.js
Can I have it run the following substituting the filename which I've selected:
node node_modules\protractor\bin\protractor protractor.dev.conf.js
--specs "/specs/myspec.js"
As a crappy work around I have the following:
This runs a single file but I need to edit the configuration each time to change the spec i'm testing.
protractor.dev.conf.js --specs "myproject/specs/test0043.js"
Does WebStorm allow you to dynamically substitute the test file?
Thanks
Can I do have it run the following substituting the file I've selected:
node node_modules\protractor\bin\protractor protractor.dev.conf.js
--specs "/specs/myspec.js"
and can you run the same not using WebStorm (in command line)? If you can, it's not a problem to do the same in webstorm
try ddescribe and iit
iit('should ...')
Will run only those tests marked with iit.
ddescribe will only run the tests under that suite(s)
Try the ddescriber plugin http://plugins.jetbrains.com/plugin/7233?pr=phpStorm