Angular Scenario Runner vs Protractor - angularjs

Am I correct in saying that Protractor must have the Protractor/Selenium Webdriver installed on the machine where the tests are being run but Angular Scenario runner executes within the browser?
I would essentially love to be able to run tests/scenarios remotely to give potential interviewers an insight into the behaviour/nature of a site I am developing.
I have used iMacros in the past, however, the tests weren't strictly portable between Firefox and Chrome?
Is my assumption about the difference between Protractor and Angular Scenario runner correct?
Thanks,
Mark.

Protractor wraps the WebDriverJS - javascript selenium bindings, and adds quite a lot on top of it, specifically to testing Angular sites but not necessarily. When you run Protractor, you need your application to be served and accessible, you may need to start the selenium server or use the direct connect feature available for Firefox and Chrome, see also:
Difference running Protractor with/without Selenium?
Protractor: How it works?
Angular Scenario runner on the other hand is something you should not be considering - it is currently deprecated and is in the maintenance mode.

Am I correct in saying that Protractor must have the
Protractor/Selenium Webdriver installed on the machine where the tests
are being run but Angular Scenario runner executes within the browser?
If you are using NPM then you can have Protractor/Selenium Webdriver as local dependencies. They don't have to be installed globally. See https://github.com/angular/protractor.
I would essentially love to be able to run tests/scenarios remotely to
give potential interviewers an insight into the behaviour/nature of a
site I am developing.
Do you mean a live demo of the site using protractor or something like that to show the workflows and usecases? If so then you might be over engineering the solution. A Youtube video would have the same effect.
I have used iMacros in the past, however, the tests weren't strictly
portable between Firefox and Chrome?
Protractor tests are portable, you just need the correct webdrivers and make sure to point to the browser binaries.
Is my assumption about the difference between Protractor and Angular
Scenario runner correct?
I cannot answer this. I don't know enough about Angular Scenario Runner.
I would advise against it though as it is depreciated, see note at top of page https://docs.angularjs.org/guide/e2e-testing.

Related

What alternatives to Selenium WebDriver can I use for automated UI testing of a web application?

I'm working on a project that currently uses Selenium WebDriver to run automated UI tests for a web-based application. However, Selenium is no longer being approved for use on this project. My team is currently investigating alternative solutions. We need something that can be used with a CI/CD pipeline and that supports testing for multiple browser types. It would also be great if it can be integrated with Cucumber, which we also use currently, but this is not strictly necessary. I would love to hear your suggestions for anything that we can use. Thank you in advance!

Running selenium test through physical device

I work on test automation for a mobile version of a website. I have several tests that I generally run through ChromeDriver or Browserstack. However, what I would really like to do is hook up my phone and run my tests through the phone. I have tried appium but I am starting to realize that it is only used for apps and not mobile versions of websites.. Does anyone have any experience in running tests through a physical device? If so, what tools did you use or do you know of any good online tutorials?
Appium IS for testing websites on mobile devices.
You must pass the appium server the browserName parameter instead of the app parameter.
I suggest reading the appium documentation.
I have used Appium, Selenium Grid and testNG to run parallel tests for websites on real devices, so if you need any further guidance feel free to ask.
Hope this helps,
Liam.
Yes of course you van use Appium for mobile web application test. In fact you can use native browser or chrome browser in Android. And Safari browser in IOS.
If you want to start the web automation for Android i suggest you to follow the following tutorial with the example code.
appium-web-application-automation-in-android
I am writing this off the top of my head, not while I am doing it. This often leads to it not being 100% correct. There might have to be made some adjustments.
iPhone
This is what I have done:
Download and run Appium Server
Install xCode Tools
Run iPhone Simulator
Get your devices ID, in console, type
instruments -s devices
Set capabilities
WebDriverManager.setGlobalExtraCapability("platformName", "iOS");
WebDriverManager.setGlobalExtraCapability("platformVersion", "14.4");
WebDriverManager.setGlobalExtraCapability("deviceName", "iPhone 11");
WebDriverManager.setGlobalExtraCapability("appium:automationName", "xcuitest");
WebDriverManager.setGlobalExtraCapability("appium:udid", "your devices ID");
WebDriverManager.setGlobalExtraCapability("browserName", "Safari");
WebDriver driver = WebDriverManager.getWebDriver();
On the phone you have to set some mode, but I can not find anymore, which one that was. (Please write in comments if you know.)
Run Test
I hope I have not forgotten anything, as this was a process.

Karma vs Chutzpah

I have been trying to figure out what is the best way to write/run automated jasmine tests in visual studio. Currently, I am using jasmine with Resharper (using PhantomJS) and the test can be run from visual studio. Now I want to run the tests as part of continuous integration and very are using TFS. Searching online give me few options which made me rather confused.
1) Use Chutzpah as a test runner to execute jasmine tests.
2) Use Karma as a test runner (but it also requires Chutzpah test adaptor for visual studio).
I get the feeling that using Karma is somewhat better than anything else but I couldn't understand the benefits of Karma instead of just using Chutzpah. Can anyone please clarify what should be the usage?
DISCLAIMER: I am the author of Chutzpah so take anything I say with a pinch of bias.
Both Karma and Chutzpah are both good tools to be able to run JavaScript unit tests. Karma is the more active open source project and has a large group of people contributing to it. It is very configurable and lets you (as Sean says) target browser besides Phantom. There are VS plugins for it as well but I have not used them much.
Chutzpah is a mature product that is also very configurable. It will always run your tests in PhantomJS but does let you open them in a new browser in order to debug. Chutzpah VS integration is mature and seamless.
The biggest benefit of Karma over Chutzpah is it can be configured to use Chrome (or any other browser) to be the test runner which makes tests a lot easier to debug with browser developer tools.

How to write selenium webdriver automation scripts for Flex applications

I am in the process of writing automation scripts for Flex applications using Selenium-Web driver but i don't know exact steps and the ids capturing for Flex application.have goggled several times but I couldn't get any exact solutions and answers.
Please let me know clear steps to write the automation scripts and capturing ids using any tool or from Selenium IDE.
Currently they provided me only application URL by using the application URL only I need to write the scripts using Web driver.
Although this only works with Selenium 1 (not webdriver), take a look at Flex Monkey:
http://www.gorillalogic.com/testing-tools/flexmonkium
Install the console and then start up a selenium server, loading the user extensions provided in the zip file (also available on the download page).
If you open up the page you are testing and then open the console, the console should indicate it is connected - you will then see actions in the selenium IDE.
If not, you need to deploy the application under test with the appropriate SWC projects for Flex Monkey to recognise the objects on the page.
As far as I know, You are not able to automate Flex web app using webdriver (at least the easy way). You can do it with Selenium RC, adding FlexUISelenium extension to RC and compiling application with Flex libs.
I've heard about writing Your own javascript methods with flex handling, but I didn't try (will investigate it soon).
Check this link.
However I do hope that I'm wrong, because I'm facing this problem now ;)

Resharper support for Silverlight Unit Test Application

HI All
Is there a version of Reshaper that can be used to run Silverlight unit test. I am using Resharper 4.5 although it shows test icons against test methods in the class, but it does actually run the test.
Thanks
I'm the author of the AgUnit plugin.
Silverlight 3 support is currently working if you build the plugin from source, a new release is coming in the next couple of weeks.
If you want to run the tests on a build server, you should take a look at StatLight: http://statlight.codeplex.com/ You should be able to set it up easily with TeamCity.
Update: Silverlight 3 support should be working in the new 0.2 release of AgUnit.
I doubt it, although I am happy to be proven wrong. The test runner for MS Silverlight Unit Test suite is actually a Silverlight app, that runs in the browser. This is done in order to simulate the Silverlight runtime environment, which is different from desktop runtime.
Try this:
http://agunit.codeplex.com/

Resources