Page Object Pattern for web testing [closed] - nightwatch.js

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking into several javascript frameworks that can be used for e2e automated testing, mainly: Webdriver.io, theIntern and Nightwatch.
And I really want to get some feedback from developers on which framework could best support the page object pattern?

Intern supports that pattern (and it's a general enough pattern that I'd assume the other two do as well). There are a couple of ways to implement it with Intern.
One possibility is mentioned in the Intern Guide. The Command object used to control a remote browser is wrapped in another class that adds page-specific functionality.
A different style of implementation that's a bit more flexible is described here. Setting up a Command wrapper to allow more than one custom call to be chained can be tricky. The second implementation uses Command helper functions, which can be easier to work with.

Here are some of the main pain points I've experienced with various framework page object implementations:
must allow creation of elements/locators once and not repeat them elsewhere (DRY)
how it handles a basePage (ie. page elements/methods not specific to a single page (eg. hitEnter()))
how it handles repeated elements across pages (eg. a nav bar that exists on multiple pages)
does it allow for readable tests
Opinion will certainly factor into these... which is fine. Answer these questions for your framework of choice, and you'll have your answer.

Related

GUI test for an app written mainly with Tcl/Tk [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Would really appreciate your help with Tcl/Tk testing framework. I am supposed to test a windows application written with Tcl/Tk, twapi, gdi 0.9.5.1. Do you know a black-box and/or white-box test framework that will help me with GUI testing (generate mouse event, etc etc, and drive the application)? What I expect from the test framework is something like what WindowsLicker allows you to do for Swing.
Tk can generate events with the event generate command, but it will only send these events to itself. You can combine these with the tcltest package to do such testing as you require.
That said, I actually advise splitting up your code so that there is a clear separation between the GUI and the functionality that powers it (the “business logic layer”, to borrow a phrase from server architectures). You can then test your baseline functionality thoroughly without having to fiddle around with testing GUIs, which is enormously easier. Once your BLL is working robustly, testing your GUI then becomes a matter of ensuring that actions in the GUI manipulate the view correctly or translate into appropriate BLL calls (which you know will either work correctly or fail in a way that is clear).

Wordpress multilanguage plugin [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have a blog on Wordpress in which I need to serve contents in several different languages. I don't want to translate the articles, I just want to have some in each of the languages and just have a way of switching between them. I was looking for a wordpress plugin that allows such functionality but so far I found only xLanguage but it's not what I intend to use if for, although it's pretty close.
What this plugin allows is to have a contents in the post that is localized for one specific language and it's not displayed in other languages. However it's main flaws are
you cannot translate post titles
if I define the post in just some of the languages my site supports the post will appear blank (I would like that it won't appear at all in this language)
Does anyone knows if there is a plugin that I could use or I should start thinking of developing one myself. As I mentioned I don't really need a translation functionality, just the ability to mark the post to appear in only one selected language.
I guess I could also set up several instances of wordpress, each for every language but then I will need to replicate every configuration change in all the instances and that's something I would really like to avoid.
Update
Actually I just noticed that I can hide untranslated messages by specifying a parameter in options but there is still one problem.
The rest of the page (links, other text generated by Wordpress) doesn't get translated while switching the page. So I have my contents translated by still see default language in navigation etc.
Gengo looked interesting, but development seems to have stopped.
But the qtranslate plugin (author's page, plugin page) offers the things you need. It not only manages article translations but also switches the complete site (“user interface”) language.
Articles (including titles) can be stored in several languages. If you need a translation elsewhere (i.e. a widget title), you can use special markup (language tags): <!--:en-->english<!--:--><!--:de-->Deutsch<!--:-->
I'm still testing it myself, but it mostly works alright. There may be surprised (e.g. date fields), so better test it on a offline copy of your site.
Also, check this older stackoverflow question
I have built several multilingual sites and I use the WPML plugin and have found it to be best option out there. http://wpml.org/

Any books on design website UI without referring to images? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm weak enough in art,so this kind of books will really help me lot,if there is.
Typically you don't want developers to design graphics and you don't want designers to write code. Assume you have someone else creating graphics for you (or use one of the many services on the web that do this sort of thing cheaply). Just use placeholder images while you are learning; i.e. load up mspaint (or gimp or whatever floats your boat) and just make something that you can recognize.
But it is unrealistic to try to do modern webdesign using zero images. Even with some of the advanced awesomeness of CSS.
You can start by reading this book: Don't Make Me Think: A Common Sense Approach to Web Usability
No offence, but you can't do website design without images, or even without having a strong creative/artistic streak. Now web development you can do without any creative talent, and minimal knowledge of CSS. Often the two roles blur, but you're going to have to either work with someone who does the design side, or learn how to do web design - images and all.

RapidWeaver-like editor for windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
After seeing a friend using RapidWeaver and producing wonderful results in a few clicks, I was astonished and started searching if a tool like that exists for Windows. Unfortunately, so far my search yielded no result, so I'm writing here the criteria I'm using hoping that anybody will come up with a relevant suggestion:
WYSIWYG HTML editor
Must work (well!) on Windows (Vista/7)
Must not be web based (I don't care about webapps allowing me to create sites off of crappy templates)
Template-based (and possibly with many templates available)
Pretty flexible (nothing like Dreamweaver, but I wouldn't like being stuck with just entering text into some prebuilt templates)
Intuitive (and possibly good looking) UI
Producing standards-compliant markup (office-like HTML is not an option)
Here is what I don't care about:
Price/License (if it's commercial it's probably even better for my purpose, as if the tool is good I will want fast, quality support)
Good code editing features (when I'll get my hands dirty with the markup I want things to be looking already pretty good so I'll just have to improve certain areas based on my requirements...)
Server-side scripting (I'm handling that otherwise, for this tool I just care about the design part)
Here's a list of commonly recommended tools I consider unfit for my needs:
NVU
KompoZer
Microsoft Expression Web
Microsoft Visual Web Designer
Adobe Dreamweaver (good, but too good for my needs. At this stage, I'd prefer something quicker, even if it means having lower quality html)
Thanks in advance for your suggestions!
Probably too late, and not sure if this helps you anyway:
http://www.artisteer.com
http://www.xara.com/eu/products/webdesigner/

Most Natural GUI Toolkit [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
On episode #41 of the Stack Overflow Podcast Jeff and Joel discussed GUI ideologies that lead to poor usability. What GUI toolkits have you seen that most beneficially influence the programmers that use them? What level of separation (between user-interface and implementation) do you find most efficient for testability and usability?
What GUI toolkits have you seen that most beneficially influence the programmers that use them?
My own, developed based on experience with computer science and the specific needs of the industry I develop for. In short there is no magic bullet just tools that you have to use experience and judgment with. What works for my CAD/CAM software, is not going to work for a web developer's website, nor for a developer of office software, and so on.
What level of separation (between user-interface and implementation) do you find most efficient for testability and usability?
For traditional applications that run on the desktop of a computer I recommend variants of the Passive View. The class responsible for creating and managing the form is a thin shell that passes events to the UI Object. The UI_Object interact with the form via a interface. In term the UI Object implements a UI_View Interface and registers itself with a View Controller that is situated lower in the object hierarchy.
The UI_Object then execute object implementing the Command Pattern which modifies the model. The command object can interacts with the various views via the interfaces exposed by the View Control.
What this does is allow you to rip off the form classes and replace them with stub classes that implement the form interfaces. The stub classes are used for automated testing especially for integration tests.
The interfaces precisely define the interaction between the Form, the UI_Object, Commands and the views. They can be designed to be relatively language agnostic so they can make porting between platform easier.
I am not as proficient with programming for the web but there are related patterns that accomplish the same thing.
I have to also caution that Passive View can be overkill. You may not want to use it for simple setup dialog (like the dialog setting up serial port parameters). This a judgment call on whether the ease of maintenance and coding is worth the added testing time. If a dialog is only called by a single command to modify some setup parameters then it is a good candidate to have it defined within the command itself.

Resources