I am new to using the selenium testing tool and would like to know how to run selenium IDE scripts in selenium RC. I need examples and screenshots please
As far as I know, to run the selenium IDE scripts in RC you have to export them into a particular language (Java, C#, Python). After that, you need to run a RC Server and a RC Client that will send requests to this server.
The first place I would go to get started is this documentation:
http://seleniumhq.org/docs/05_selenium_rc.html
Related
I have tests in .js which runs remotely using selenium webdriver. But, it gets hard to debug issues locally. I am using IntelliJ IDE and would like to integrate with selenium webdriver and run them using IDE.
Jest is the framework which we use.
Can someone please help me figure this out?
Thanks!
Is there a way to run Selenium WebDriver tests in a browser (or just run a test scenario manually in a browser), and get the code coverage of the web-app written in JavaScript? Are there any other code coverage tools except JSCover that can do such task?
Is there a way to run Selenium WebDriver tests in a browser (or just
run a test scenario manually in a browser), and get the code coverage
of the web-app written in JavaScript?
JSCover can when run in proxy mode (without HTTPS). A more robust approach would be to pre-instrument your JS before running your tests, which can be done by JSCOver and other tools (see answer to second question).
JSCover can also save data between pages using local-storage which can be useful for re-using existing selenium suites.
You'll need to add some code to the end of your tests to save the coverage data. To do that with JSCover, see http://tntim96.github.io/JSCover/manual/manual.xml#fileSystemSave.
Are there any other code coverage tools except JSCover that can do
such task?
There is also Istanbul and BlanketJS which may be able to be used with the pre-instrumentation approach.
How can you get in the debug mode in webstorm to debug the frontend (implemented with javascript) in a Django project. I managed to import the js folder of my project but it's not possible to run and debug it through WebStorm, so for now I just run it through Eclipse and use the browser debugger so far. Any recommendations?
Should be possible via JavaScript Debug run configuration: you need to specify the URL of your start page (like 'http://127.0.0.1:8000/mysite/index.html')
as 'URL to open' and set remote URL mappings accordingly (http://confluence.jetbrains.com/display/WI/Starting+a+JavaScript+debug+session#StartingaJavaScriptdebugsession-Startingadebugsessionwhenusingadifferentwebserver). Of course, you can't start Django server from WebStorm, but you can debug javascript served by it...
Now I make my protractor to work. Then I have another question: How to package the spec files and all the dependencies into one file, such as rpm or other format, so I can easily install it on another machine to run it? I searched the Internet and found some tools to package the javascript and CSS and images used in web page. But in my case, I only need to package the javascript I write to do the testing to one file.
I appreciate any suggestions.
The short answer is that's not possible.
When you run protractor on a fresh machine you need to have
an instance of selenium-webdriver server running (with all the browsers you want to test)
nodejs
But, assuming that the new computer you run protractor in has nodejs and selenium-webdriver is set up (i.e. either the local computer has it running, or you're testing over network like using saucelabs), then I guess you can zip up the file to send as one file.
I am building a web application in javascript with a PHP/MySQL backend. The entire UI is Javascript based, except the index.php which only contains a few PHP lines. Out of that, it all works with AJAX calls. Then I have a PHP backend answering the AJAX calls with JSON.
I have a few questions on how to create a "clean" deployment process. My process should contain:
CI Running Javascript & PHP unit tests, backend JSON tests
JS compression
Deployment to a test server
UI/Acceptance testing
Eventual deployment to a prod server
What tools should I use to do that? I see many CI servers, but which one can do Javascript testing and compression and PHP unit testing?
How can I do staging in Javascript and PHP? I don't want my Javascript on the test instance to connect to the prod backend, neither the test backend to connect to the prod database. How should I implement this switch ?
Moreover, would it be better if I split my project in 2 parts - front-end and back-end or is it OK to deploy/test the whole javascript/php thing as one package?
Thank you a lot for you help
You can do CI of heterogeneous projects using Jenkins
Aside of unit tests you can set there coverage, mess detection and even selenium by simple plugins.
You can do simple deployment using any version control software just don't hardcode your javascript urls and dont user absolute urls. Instead base your your config on environmental variables on your staging and production. IDE's like PhpStorm also have deployment systems if you are interested in something more advanced.
CodeShip (www.codeship.com) can do this. It has the ability to run tools like Grunt or Gulp, Bower, NPM and Composer. And it can run phpunit, selenium, qunit etc. and it can deploy.