When and what for do you use ui tests? Also how do you test multilingual project?
Better start with second question. Assuming there is project which is using more than 1 programming language. Like java + php for back end, java script + whatever for front end.
Is it possible to use same language for such project unit tests? I.e. is it possible to test php code with tests written on java. I almost certain that it is not possible, still hope for miracle =)
And other question is ui tests are long and hard (harder than unit/module) to maintain. Thus to avoid automation hell one should create unit/module test if possible. And question is is there a situation when you have to create ui test because can't create unit/module/integration/... test?
Posted Dec 7, 2015, 3:19 PM UTC
As far as I know, no, you can't create unit tests for PHP on Java. But, a lot of languages have jvm versions with some level of interoperability with Java, like Python (Jython) and Ruby (JRuby). Depending on what are the languages in your system, you might be able to share some code, but you're probably better of testing every part of the system in the language it is written.
As for ui tests, yes, they tend to be more brittle and hard to maintain, and you should prefer unit tests. But there are things you can use to minimize it, like the page object pattern, for instance. Having ui tests in lieu of unit, though, I'd say you should consider it carefully. It might seem tempting to add ui tests to get some sort of coverage for parts that are hard to refactor, but they are harder to maintain and will break more often, and won't provide as much information when they fail, so, again, consider it carefully.