Can e2e test cases in Katalon be written in Javascript language - testing

As far as I understand, Katalon (https://www.katalon.com/ - a tool for e2e testing) can record your actions and make test case scripts out of them (which use Selenium).
You can also write your own test case scripts directly in a programming language.
I'm wondering if the language in which test case scripts are written is only Java, or any other language (Javascript in particular) can be used?

Test cases are actually written in Groovy. Only Groovy/Java are natively supported.
However, there is a workaround way of using JavaScript with WebUI.executeJavaScript() method. You can see an example of using JS code in Katalon here.

Related

Does it mean I can write my Selenium test cases in this many languages?

Selenium can be coded in multiple languages:
JAVA,C#,Python,Javascript, PHP, Ruby
Does it mean I can write my Selenium test cases in this many languages?
Yes, you can write your test cases in many languages. Yet, there is no much logic doing that. You either work with Visual Studio and C#, VS Code and JavaScript or simply IntelliJ and Java.
You can Not use a single IDE and write tests in all the languages you mentioned.

What open source software should I use to write scripts to test for no errors on a site?

What open source software should I use to write scripts to test for no errors on a site?
Could I / we write something better ourselves if there a limited number of goals outlined?
- yet flexible enough to take on new rules etc.
The only consistent response we want is no errors, period.
I know Java, ASP and scripting languages if that helps.
Thanks!
Selenium is one good Website automated testing tool. It allows macros as well as hand-written scripts. Also has support for Firefox browser.
Understanding of Java should suffice.
You can check it out at http://seleniumhq.org/
Another good open source alternative is HTMLUnit http://htmlunit.sourceforge.net/
Again this requires knowledge of Java
You might want to consider the robotframework, combined with the selenium2library keyword library. It lets you write very human-readable tests and gives very nice reports. It integrates nicely with jenkins. Robotframework is written in python, and can be extended with python. It allows you to create data driven tests, BDD-style tests, or more traditional procedural tests.

Convert/execute QTP scripts from Selenium

We are currently migrating a project from QTP to Selenium. We have a few QTP scripts used for regression testing in the project, and we want to avoid the work of rewriting them. Is there any way to execute the old QTP scripts from any Selenium framework or IntelliJ IDEA or Eclipse etc without QTP?
No, not in normal situations. QTP is an expensive, commercial tool and if there was a way to easily run the scripts outside QTP, HP would have had a bad business case.
You'll have to rewrite your code into Java code. Maybe there are some VB to Java convertors (note: QTP scripting language is VBScript, not VB) that could make some of the work easier, but I wouldn't bet my money on them. Java is a very strong typed, object oriented language, while VBScript is a very weak typed much more functional language. Even if you had a converter, your Java code would be very crippled.
I would say, not in any situation. There is a possibility of executing QTP scripts from outside, but not without a QTP license.
There is no automatic converter from QTP to Selenium that exists yet either.
While it's understandable that you don't want to lose your existing QTP scripts, it would be best to start working on writing Selenium tests now rather than later.
I think if the scripts are made in Jscripts , it would be easy at some extent , we can execute them on Selenium the lines which are not Inluced with Application Objects(Browser,Page,Field). There are few problems existed with Excel stuff, File System objects...etc, since Selenium(Java) we are importing few package concepts while we are handling certain objects. I think there are more difficluties involved while we are converting them and executing the QTP scripts in Selenium. Instead of that It would be better if we start Selenium coding from Scratch.

Selenium IDE: How do I create a script to be executed before/after every test case in a given test suite?

I'm looking for something equivalent to JUnit setUp() and tearDown() methods. In other words: I have a test suite; I would like to write a setup test case and a teardown test case. The setup test case would be executed before each test in the suite. The teardown test case would be executed after each test in the suite.
How?
It sounds to me like you're at the point where you need to export your tests from Selenium IDE into another format/language. Selenium IDE is great for quick prototyping of tests or for showing off what Selenium can do, but when you actually begin to build a library of tests, you need to use a real programming language. Setup and Teardown are a part of every major testing suite (you mentioned JUnit but also TestNG, NUnit and MSTest for C#, etc) so use one! Using a real programming language also allows you to refactor your tests, extracting common functionality into classes and methods so that when your Application Under Test changes, you only need to change one method and not 100 tests. Most testing frameworks also support some sort of data driven testing which many Selenium users find useful.
Are you generating Java code to drive your test cases?
I ended up writing a custom format for C# to handle integrating Selenium test cases with MbUnit which are then just pulled to a Team City server and run after our nightly builds.
I suggest you check out Robot Framework. There is a Selenium library available for Robot Framework so you get almost all Selenium functionality plus you get a great framework to create your test suite.
In Robot Framework you can simply define Test Setup in the initial settings and it will be executed before every test case. Similarly Test Teardown will be executed after every test case in your test suite.

Selenium tests: html vs code?

Is it better to write/record selenium tests in html format and run them directly in the server with "-htmlSuite" or to write the tests in java/C#/... and run them in the server using selenium-rc?
What is the recommended solution?
I would always recommend people writing their Selenium Tests in a programming language because it allows the tests to be a lot more expressive.
You can create common methods that all tests use and if that changes you can then update 1 method to get n tests passing because they all fail on that item. One example of this is the Page Object model which is a development method for tests that suggest you create a DSL for each page you interact with and then your tests read a lot more fluently to both technical and non-technical people.
If you write your tests in a programming language you can also take advantage of Selenium Grid which runs your tests in parallel to make them faster
I'd highly recommend you look at moving to Selenium in C#, Ruby,PHP or Python. I found many timing issues resolving once I got away from the HTML Selenese.
I might keep in mind how you plan on executing your recorded tests. For instance, it might be trivial to incorporate Selenium's generated JUnit tests into a pre-existing JUnit-based testing framework.