Can I reuse/call existing API in Selenium-Java Framework into the Protractor Framework? - angularjs

Please bear with me if this is a silly question. But thought of getting an idea.
We have a very sophisticated Selenium Webdriver-Java framework. But now some parts of our application is being implemented in AngularJS. We would like to use protractor for test automation. But we have some API in the existing framework which we would like to reuse. Is there a possibility to do so or do we need to re-write all the existing API in protractor?
Thanks

Not probably the answer you are looking for. But, this can give you some hope.
Unfortunately there is no protractor java port at this moment. I use Selenium C# and my project started using some Angular recently. And, fortunately, there is a Protractor-net project done by some great people to accomplish same thing you are struggling with. I must say, if your project is big enough to leverage some time to write a java port for protractor you can follow this project easily. It's not that extensive. I am personally using it and started writing about this on my blog

Some one is trying to develop jProtractor - An angular/protractor implementation for Java Selenium API. https://github.com/caarlos0/jProtractor
This is still under development(not in a position to use yet), but this could be the right tool for people who are in similar situation as me.

Related

AngularJS 2.1.0 official scaffold & style?

Google knows best… but they're inconsistent!
The official ng CLI generates a scaffold one way, whereas the official tutorial chooses a different way.
I'm not talking just directory layout, typings.json vs types in package.json choices are also particularly worrisome.
What style am I meant to work with?
Angular 2's tutorial basically just shows the quickest and easiest way to get up and running with the framework. It omits mentioning things that could scare away a potential newcomer to the ecosystem, it is meant to be simple.
angular-cli on the other hand actively incorporates best practices, latest technologies like Webpack 2 Beta and tries to give developers a piece of software to quickly scaffold and develop scalable production apps without worrying about build-tools and configuration.
QuickStart
This is not the perfect arrangement for your application. It is not designed for production. It exists primarily to get you started quickly with learning and prototyping in Angular
angular/quickstart/README.md
angular-cli
The Angular2 CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!
https://cli.angular.io
See also: https://angular.io/styleguide

Adding functional tests to a Backbone.js application

I'm sorry if this question isn't appropriate: I'm new to test-driven development, especially on JavaScript.
I have a working Backbone.js application, and I'd like to add some JavaScript tests to it. But I don't really know where to start.
Specifically, I'd like to write tests that are passed a URL, and check that the rendered page contains particular DOM elements. (So functional tests, rather than unit tests, I guess.)
What is a good way to do this? Could anyone recommend good practical resources for getting tests like this up and running?
Apologies for the newbie question.
I have faced the same problem lately and Ryan Roemer book Backbone.js Testing (http://backbone-testing.com/) is a great place to start.
His process is not purely TDD, but he gives some nice tips.
When taking it to practice, I will recommend a Yeoman generator like:
https://github.com/mrichard/generator-marionette (Marionette)
https://github.com/revathskumar/generator-backbone-mocha (Backbone and Mocha)
https://github.com/richistron/generator-cornelio (Karma and Backbone)
They will save you some time on the setup. Also, if you are using Rails, Konacha https://github.com/jfirebaugh/konacha has been pretty handy for me.
Good testing!
Selenium is on de-factor way to run functional tests in the browser. Selenium has a firefox plugin that will record actions and replay them. That would be the easiest way to start. You can look at Selenium's API docs to write code to interact with the browser.
Sause Labs (http://saucelabs.com/docs/quickstart) has selenium in the cloud which is useful so you don't need to have a browser window open on you desktop and run the tests. PhantomJS can also run a "headless" browser (it does't open a window on you computer, just runs in the background).
Once you have selenium working you might want to look into acceptance testing. The tests are written in plain english use Gherkin (or similar) syntax and it runs functions to run the test and output reports if there were errors or not.
I wrote an article how to use Selenium for Acceptance Testing http://alex-craft.com/blog/2014/acceptance-testing-for-web-app
Tools: WebDriver (Selenium or Phantom.js), wd.js, node.js, mocha.js.
There's an example with explanation how to use meaningful names instead of CSS selectors, eventual conditions, etc.

What are the prerequisites in learning google app engine for java?

i want to try learning GAEJ but i dont know where to start.. do i need to start learning java first? then xml and then proceed to GAEJ? or go straight for GAEJ w/o learning java and xml? any suggestion would be appreciated...
It depends on what you are doing. You actually don't need to know any Java at all to host an application on GAE. HTML and the Eclipse Plugin are good enough.
If you want to do more complex things, though such as using the Datastore or User Authentication, then I suggest learning Java. You can try to use GAE as an outlet to learn Java, i.e. learn them simultaneously.
I don't know if you've seen Google's getting started documentation yet, but it's got a great DIY tutorial for getting an app up and running.
You are going to be at a bit of a disadvantage if you don't know Java yet, but that's no reason not to dive right in to GAEJ -- just make sure you have the Java API handy to look things up as you go.

Making development with Ext JS fast

Ext JS is a nice framework for web UI, but I found that building and putting stuff together takes a long time and painfully slow.
This might be a general problem when working with JavaScript, but does anybody have any way to speed things up?
What can I use? Better IDE with good JavaScript suppport? GUI designers? Code generators?
I need some way to speed up common things like building grids and forms but yet let me do complex things like creating custom components easily.
I'm using ASP.NET MVC. Coolite seems nice at first, but I feel that I'll be having trouble when creating any custom components later on.
There's always Ext GWT, which lets you use Eclipse tooling (and all of the advantages that gives you, such as refactoring, swift code navigation, etc.) to create your Ext/JavaScript app.
When you download the ExtJs library, you find lot of sample applications for common requirements like Grid panel, forms, form elements etc.
Regarding IDEs, you dont find mature productive tools, but check the below link and wish it could be of help to you
http://www.extjs.com/blog/2008/02/01/ides-plugins-and-tools-for-ext-js-20/
But if you really wish to develop custom components, you need to get through knowledge,start approaching with ExtJs-provided sample apps.
If you want to get faster at anything, practice it until you fully understand how it works and how to make it do what you want. If you are just starting out, why would expect to be able to work as quickly as you do when you are working on something that you are very familiar with?
Things I use to make ExtJS less painful
Chrome, for it's developer tools, or Firefox with Firebug.
snipMate: snippets for Vim, so I can quickly produce boiler plate code for classes.
JSLint as a command line tool. Especially good for detecting rogue commas.
Sencha forums.
ExtJS IRC chat (Server: irc.freenode.net Room: #extjs).
API documentation.
Sencha and Saki's ExtJS examples.
Beer.
ExtJS is building a designer right know so you can look forward it, the only problem I think is not gonna be free.
you can see a video demo there, in term of release date I think this is due to the first quarter of this year.
I say learn the framework. But to develop apps, I use IntelliJ IDEA, which has partial code completion, etc. It costs money though.
Once you have some practice and understanding of how ExtJS works, you'll get faster at it. By using the examples for reference, and building up my application in small pieces, I've gotten much better (and faster) at developing stuff with ExtJS. A great way to get started is to find an example (or two) that kind of do what you need, and modify (or combine) them to see how they work together.

wcf and wpf application source code for beginner

I am beginner for .net 3.5, have to work on app where I need to build desktop version as well as web version for selected modules like reporting. I think WCF will help me out to create a base from where I could call functions in both(desktop as well as web )
Let me know the any available source code sample projects to go through. It would be good if those are following any design pattern like MVC.
Here is a good place to start with WCF
and Here is a good start with WPF.
Have Fun.
You can take a look at the DinnerNow.net sample application. There's quite a bit that goes into setting it up but I think if you're ready to tackle both technologies at once it'll help a great deal.

Resources