I am running my protractor tests in PhpStorm 8.0.1. The issue is despite of providing the parameter correctly in Application parameters section, the script does not run, and even then it outputs a success run in the console. Here is the output.
[12:45:30] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[12:45:30] I/launcher - Running 1 instances of WebDriver
Started
1..0 # All tests disabled
# 0 specs, 0 failures, 0 skipped, 0 disabled in 0.014s.
# NOTE: disabled specs are usually a result of xdescribe.
SUCCESS: 0 specs, 0 failures, 0 skipped, 0 disabled in 0.015s.
No specs found
Finished in 0.016 seconds
[12:45:34] I/launcher - 0 instance(s) of WebDriver still running
[12:45:34] I/launcher - chrome #01 passed
Process finished with exit code 0
My application parameter is configured like this.
http://screencast.com/t/HOqAW6ya4oe
And here is my folder structure which accordingly is correctly configured.
http://screencast.com/t/xK98JrDlc2a
This was working earlier fine and now all of a sudden I get this output. Any suggestions on how to resolve this would be of great help.
specs: [ '../specs/WP-lam_spec.js' ], I think it is a couse change it to :
specs: ['spec/**/*[sS]pec.js'],
so it will start all your specs you got in your spec folder, also i think it might be problem with lack of '' in parameter from screenshot so just change to:
protractor --specs='path\to\file.spec.js'
My spec.js file was in src.com.sam.scriptjs package so giving like below in config.js was solved my issue .
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['src/com/sam/scriptjs/firstScript.js']
}
If the tests are in the same folder as the config file, you can try to add ./ before your spec:
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['./helloWorld.js']
}
Related
I am using JHipster v5.8.2 on Windows operating system and I am trying to run Jest client side tests by running the command:
npm test
But I get an error that says:
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\IdeaProjects\pomzen
274 files checked.
testMatch:
C:/IdeaProjects/pomzen/src/test/javascript/spec/**\+(*.)+(spec.ts) - 0
matches
testPathIgnorePatterns: \\node_modules\\ - 274 matches
testRegex: - 0 matches
Pattern: - 0 matches
npm ERR! Test failed. See above for more details.
I recently also had this problem. I used workaround from here:
https://github.com/DorianGrey/ng-webpack-template/pull/22/commits/fe95926607ed8bd01476c7d04b5b930a965ad282
Fix:
Open jest.conf.js file
Replace
testMatch: ['<rootDir>/src/test/javascript/spec/**/+(*.)+(spec.ts)']
with
testMatch: ['**/*.spec.ts']
Local Environment :
Windows 10
Node v6.10.3
Npm v3.10.10
Protractor v5.1.2
Issue Summary
I am running Protractor for the first time (following this guide http://www.protractortest.org/#/tutorial) and the Protractor test runner is not executing properly. With Selenium running in the background via webdriver-manager start the following error (partial stack trace) gets thrown when executing the command protractor conf.js.
The path to the driver executable must be set by the
webdriver.chrome.driver system property. E/launcher - Process exited
with error code 199
According to the documentation found on GitHub (https://github.com/angular/protractor/blob/master/lib/config.ts), the path to the Webdriver can be specified in the configuration file which is what I did.
Below is an example, how my conf file looks like.
conf.js
----
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['todo-spec.js'],
capabilities: {'browserName': 'chrome'},
directConnect: false,
chromeDriver: 'C:\Users\user_name\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.29.exe'
};
The same error is being thrown after updating the conf file. Any help would be greatly appreciated.
Solution:
I threw a hail mary, reset my computer, and the issue was then resolved. More specifically, the path to the chrome webdriver that was specified in the conf file fixed the error. What I was running into was a persisted selenium process that failed to shutdown. After killing the persisting selenium process via system restart, I was able to run the protractor test-runner successfully.
OK, so I have been searching a lot to get proper solution to the blocker I am facing right now. Let me give you a background of what I have done so far :
I want to run protractor tests (located on Linux machine) on IE 11 of Windows Server 2012 R2 (IP : 10.81.73.248). My protractorTest.conf.js has below :
exports.config = {
seleniumAddress: 'http://10.81.73.248:4444/wd/hub',
baseURL: 'http://10.81.78.137:80000/',
capabilities: {
browserName: 'internet explorer',
platform: 'ANY',
version: '11'
},
On my Windows Server 2012 R2 machine, I've downloaded IEDriverServer_Win32_2.47.0 and placed it under C:\Windows\System32, environment variable PATH has been updated with above location. Protected mode settings are same for all zones. Windows machine also has selenium-server-standalone-2.48.2.jar placed under C:\Users\Selenium.
On Windows machine, I am starting selenium server using below command :
java -jar selenium-server-standalone-2.48.2.jar -port 4444 -Dwebdriver.ie.driver="C:\Windows\System32\IEDriverServer_Win32_2.47.0\IEDriverServer.exe" , which starts selenium server fine.
With above settings, I run protractor tests from my Linux machine using grunt protractor_test, which launches IE browser on Windows machine, shows localhost:dynamic port and a message as : This is the initial page of webdriver server and within 2 seconds, closes the browser.
The exception I get on selenium server terminal is as below :
Session ID is null. Using WebDriver after calling quit() ?
This is where I am stuck at. I looked at various posts which describes similar issue (?) as mine along with the potential solution, but I am unable to resolve my issue here.
Is there anything I might be doing wrong to setup the connections ? or am I missing some steps to get me through ?
I would really appreciate if you guide me in resolving this long time pending blocker.
I think you are trying to run using old selenium version.It should be 2.53.x something.
Few basics things to check first regarding IE execution:
1).IE Setting for protractor(Selenium)
http://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/
2).Take IE driver of 32 bit(don't take 64 it has known slowness issues) and manually copy on the following path:
Root Folder\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer_Win32_2.53.1
3). IE Driver can be downloaded from following path:
http://selenium-release.storage.googleapis.com/index.html?path=2.53/
**OR**
Please upgrade your protractor version to latest like 4.0.11 by changing the version in package.json file and do from command prompt(inside project root directory):
npm update
and then give update your selenium driver with following command from command prompt
webdriver-manager update --ie
it will update the selenium version of IE driver to latest and then try running your tests again.
Has anyone gotten Intern 3 to run iOS tests on SauceLabs?
I've tried many configurations for the environment, including what's written on how to run Intern's self-tests on mobile on SauceLabs? and what's suggested by https://docs.saucelabs.com/reference/platforms-configurator, but I can't even get it to start without giving some error like about Repeated sequence for session ...: 238 last 0 cur.
Sometimes I'm able to follow Kitson's advice and use
{ browserName: 'iphone', platform: 'OS X 10.10',
version: '9.0', deviceName: 'iPad Retina' }
It just fails intermittently.
We have started migrating our one of several projects to team city as part of CI. Below is how we have setup teamcity build. We are trying to deploy WebSite.
1) Build Step 1 (Package installation)
Using "command line " runner type install required package.
2) Build Step 2 (Build)
Using Runner type "Visual Studio (sln)" (Visual Studio 2010) build website.
3) Build Step 3 (Deploy Web Site)
Using ".Net Process Runner", deployer.exe (x86 built with .Net Framework 4) deploy site.
Deployer.exe reads config file. Config file contains "BuildId", "Environment" and "Servers" where we want build to be pushed.
<buildType id="bt52">
<env name="Debug">
<server path="SERVER1" />
</env>
<env name="QA">
<server path="SERVER2" />
<server path="SERVER3" />
</env>
<env name="UAT">
<server path="SERVER4" />
<server path="SERVER5" />
</env>
</buildType>
Deployer.exe is called with required parameters as below. Which reads config and deploys site to Server2 and Server3.
Deployer.exe "bt52" "QA" "siteQA" "E:\BuildAgent\work\2483052e33e5e1e8\src\diy\" msdeploy.exe
Problem area is step #3.
When we run deployer.exe using .Net process runner as part of team city we see its hanging and not responsind sometime even for 45 minutes. When we try to execute same deployer.exe from build server using command line script executes within couple of seconds.
E:\TeamCity_custom_applications\deployer>Deployer.exe farm1-1 QA siteQA E:\BuildAgent\work\2483052e33e5e1e8\src\diy\ msdeploy.exe
Info
: Processing batch run ... Info : Processing command ...msdeploy.exe
-verb:sync -source:contentPath="E:\BuildAgent\work\2483052e33e5e1e8\src\diy\" -dest:contentPath="siteQA",wmsvc="SERVER2",userName="*****",password="******",authType="Basic"-skip:objectName=filePath,absolutePath=web.config -skip:objectName=dirPath,absolutePath="bin" -enableRule:DoNotDeleteRule -allowUntrusted Info : output >>Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0
bytes copied) Info : error >>(none) Info : ExitCode >> 0 Info :
Processing command ...msdeploy.exe -verb:sync
-source:contentPath="E:\BuildAgent\work\2483052e33e5e1e8\src\diy\" -dest:contentPath="siteQA",wmsvc="SERVER3",userName="******",password="******",authType="Basic"
-skip:objectName=filePath,absolutePath=web.config -skip:objectName=dirPath,absolutePath="bin" -enableRule:DoNotDeleteRule -allowUntrusted Info : output >>Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters ch anged, 0
bytes copied) Info : error >>(none) Info : ExitCode >> 0
Info: Deploy Script Complete.
One more thing we observed is running deployer.exe through teamcity I see that site content gets copied but only for 1 server and teamcity build status stays in "Running" mode. I am wondering if someone can please put little bit of insight on how can I look into this issue.
Update 1:
Thanks for your time looking into it !! What we ended up doing is, Instead of running command "msdeploy.exe" from "cmd.exe" we added "msdeploy.exe" location as Environment variable and executed "msdeploy.exe" in loop for # of servers. This has resolved issue of hanging. Now I am just curious to know why would it behave in such manner where if you execute "msdeploy.exe" from "cmd.exe" it would hang while running directly "msdeploy.exe" it would execute successfully. Any insight into same would be greatly appreciated.
Update 2:
I have added image which explains behavior using process explorer. If we kill msdeploy.exe from process explorer than for next all deployments to that server will not have the issue of build hanging. Please see below image
To be honest, it sounds like you're running into issues with redirecting input/output streams. TeamCity is running your application in a totally headless environment and then you, in turn, are attempting to redirect and parse the output of msdeploy.exe
If that's the case, I'd recommend looking into using the MSDeploy API instead of msdeploy.exe. The latter is just a command line wrapper for the former, so all the functionality is available to you. There's a sample deployment application available on the IIS blog if you need help getting started.
It seems you have NUnit build step configured in TeamCity and invoke cmd.exe from your test. This looks like an issue with the test code then. Most probably it will reproduce without TeamCity if you run the test in question with NUnit directly.
As Richard noted, most probably the issue root cause is related to stdin/stdout processing.
If you want to fix it in your code, you can try to experiment by explicitly closing stdin or the other way around, try writing something into it, etc.
Work around we did is, we observed msdeploy doesn't take more than 3-5 seconds to execute and deploy (Even for our biggest project which is almost 300mb website). So we set timeout of 20 seconds. So far since last 1 weeks we have not seen any issue with it and hopefully it will not cause more trouble but still we are not sure why such behavior.