How to export test cases from one .side file and import in another .side file on New Selenium IDE? - selenium-ide

I want to export some test cases from one of my .side files and then import those test cases to another .side file (in New Selenium IDE). I mean I want to merge two .side files. Is there any way to do it?
I tried to export but it allows to export for different platform like: C# NUnit C# xUnit Java JUnit
Python pytest Ruby RSpec, which does not work for me.

Related

Can not import JUnit with Eclipse

Evnironments
Mac OS High Serial 10.13.6
Version: 2018-09 (4.9.0)
Hi,
I am having trouble create Junit Test Case with Eclipse.
I've google this error, but all the posts tell me that you have to add.
As shown below I had.
The error is The import org cannnot be resloved
Somebody know what are the possibilities of my problems ?
With #nitind help, I could solve the problem.
Because I did not know what is module path and google it.
I ended up reading this post and in that post it says
There is one special case: If you have a module-info.java in your
project and have test code in your project, you usually don't want to
mention test dependencies like junit in the module-info.java. There
are two solutions for this:
Create a dedicated test module. This has always been the convention
for osgi-based projects. Disadvantage is that you can only use public
api in your tests
The solution used by maven: Put your test dependencies on the
classpath. When compiling test code, maven adds command line options
that allow the code in the named module to read the unnamed module
(which is not possible via the module-info.java).
So, as it says I made dedicated test module like the picture below.
Right click the test module
Go Build Path > Configure Build Path
Then toggle Contains test sources: No to Yes
Check Allow output folders for source folders
Change the Output Folder to test (or anywhere you want other than you default (bin))
Run the test and the test should work from now.

Katalon external library

I'm trying to use my own code for Katalon as a library.
My own code has imports like this
from com.test.page import Page
from selenium.webdriver.common.keys import Keys
import robot.utils.asserts as asserts
This file is totally executable on its own when I'm using IDE, but when I tried to import it to Katalon, I got exception message like this
ImportError: No module named test
In order to use external references, you should go to the IDE and select
Project -> Settings -> External Libraries
On the window add your jar file.
Remember that you also need to check if the .classpath file is updated accordingly if you use git (it's on the .gitignore list, so needs to be updated manually)
Do you put your .jar in Drivers folder inside your project?
Write import com.test.page.Page instead of yours
The best place to keep all jar files is to create a folder in Katalon folder structure and store all jar files in it. When you commit Katalon project into a source repositories like Github and SVN, don't forget to commit jar files as well so that the references given in the code will no throw an error.
Try this:
put additional jars in lib directory like "C:\Users[ME].katalon\8.2.0\Katalon_Studio_Engine_Windows_64-8.2.0\configuration\resources\lib\jsch-0.1.54.jar".
restart katalon then in your script, use import com.jcraft.jsch.*;

Specify multiple glue packages in Eclipse Cucumber Feature Runner

I am trying to run cucumber feature files using the Cucumber plugin for eclipse. When I setup the run configuration, I specify a glue path to a package containing step defs as follows which which works:
classpath:com.company.path.to.stepdef
however, I have feature files which need to access step def classes in different packages (in different jars). I have tried various permutations to specify multiple packages in the glue field, but it only ever finds the stepdefs in the first package.

How do I create a self contained package of Selenium JUnit Tests?

I have a bunch of Selenium Tests which I currently run on JUnit from Eclipse. (Using the Firefox webDriver)
I need to create an easy to install/use package of these tests to give to various members of the QA team so they can run them on different computers.
Is there something that already does this, is there a way to zip up eclipse + tests so they can be run from any computer?
Yes there are a couple of ways
I use maven for managing the project dependencies and run the tests via sure-fire plugin... but it looks like an overkill for your case
You can see a simple explanintion here:
how to export (JUnit) test suite as executable jar

groovy eclipse and scripts that aren't classes

The groovy eclipse tutorial launches off in the direction of making a class.
If I just want to make a script, what do I do? Just make a file in some folder that is named 'something.groovy' and expect eclipse to be willing to run it?
In the new Groovy Class Wizard, there is a checkbox to create a script instead of a class:
Alternatively, you can create a regular class and delete all the contents except for the package statement. That is a script.
A couple of points, though. The script should be in a source folder with a proper package statement if not in the default package. If not, you will not have any editing support for your script.
I'm not familiar with the groovy plugin for eclipse but there should be no problem creating a simple groovy script and running it from Command line or from Eclipse.
Save the following as hello.groovy somewhere:
System.out.println("Hello Groovy");
Create a Java run configuration it with the groovy jar in the classpath and main method is in groovy.lang.GroovyShell. Pass the script name as an argument (You can use ${resource_loc}) to make it a generic run configuration and it will work fine.
Edit: You can also find instructions on running groovy scripts on the Groovy website