How to input multiple karma reporters in command line? - karma-runner

Is it possible to input more than one reporter I want to use from the command line?
I have tried the following combinations none of seems to work
> karma start karma.conf.js --reporters progress summary
> karma start karma.conf.js --reporters progress, summary

Okay found out! Turns out I should not have whitespace between reporters
That is, the input to the command line should looks as following
> karma start karma.conf.js --reporters progress,summary

Related

Setting cucumber tag via System property

My entire feature stack is divided into #sanity(10 scenarios) and #smoke(2 scenarios) and whole stack is considered as #regression (no tag required, and total scenarios: 37). My question is how can I pass tag value via command line. Please note this is a cucumber-testng project
Below is how my runner file looks:
Please note, I have tried below command line commands but it still runs #smoke and #sanity both cases (meaning 12 scenarios)
./gradlew -i test -Denv=release -D"cucumber.options=--tags #sanity" ---> It runs 12 scenarios
./gradlew -i test -Denv=release -Dcucumber.filter.tags="#smoke"---> It runs 12 scenarios
If you want to run the tests from command line only, try removing the tags=#sanity or #smoke from your runner file first and then try ....-Dcucumber.filter.tags="#smoke" from the command line again.
So this worked. Apparently I had missed adding below line in my build.gradle file

VS Code and Pycharm test command line

In PyCharm you can set the command line parameters you want to test in your program in Run|Configurations. Where is this hidden in VSCODE? And I assume it does not exist in Wing?
Project| [filename] properties
click on Debug
Enter the command line on the Script Arguments line/

Running a Pydev Program with Task Scheduler

I am trying to schedule a daily run of a pydev eclipse program that prints the output to a text file. My file is called automated.py, and my command is
/c automated.py > logall.txt
It starts in C:\Users\cmai\eclipse-workspace\test, which is the location of the file. However, when I run the command, the text file it produces is blank. Thank you for your help!
The fact that it was created on PyDev is probably not relevant to executing it in Python.
Shouldn't your command be something as:
python automated.py > logall.txt?

Protractor Cucumber : how can I capture web driverjs errors in cucumber html report

I was about to use cucumber-html-report plugin to generate the html reports for my framework but I noticed that the report doesn't print the errors which I see on the Command line- for example -"an element not found for locator..".Rather it prints the time out errors. How can I capture the actual errors that I see on the Command line.
Any advice??
Cheers
you can use the tee command to save the Command line - output to a file while also seeing it on command line
cucumber (+options) | tee -a logFile.txt
It's not as pretty as an html report, but it probably gives you the additional information you want for debugging in an extra file.

Protractor - run test with different arguments

I'm trying to find a way to run a test with different arguments through command line. to be more specific- I want to send different login credentials every time I'm calling-
$ protractor conf.js
maybe something like
$ protractor conf.js username,password
I know that I can use the configuration file, but it is also hardcoded.
thanks!