Multiple web init locks up test

Basically I made a test loader and it runs an eval on multiple subsequent tests. Seems to lock up once the second test starts. Here is a small example of this happening in a single test:

web.init();
web.open(“google.com”);
web.dispose()

web.init();
web.open(“google.com”);
web.dispose()

1 Like

Hi,

I think that you are trying to run multiple iterations of the test. Is that correct?

If that’s the case, I would suggest using the iterations feature in Oxygen IDE:

  1. Click on the configure (gear) icon on the top right to open the Run Settings window

  2. Change the number of iterations to the number of iterations you want (e.g. 5, 10 etc.)

  3. Choose whether you want to Re-Open sessions. (see description in the screenshot)

  4. Choose the location of your parameter file (CSV or Excel)
    NB: You should create the file first, before completing this step.

  5. In your test script, parameterize the values that you would like to change from iteration to iteration. This is done with ${ }
    example: web.type(‘id=searchInput’, ‘${name}’);

name would be the column name in Excel / csv and the value in parameter file will be used in the execution.

Here’s the guide for parameterization:
http://docs.oxygenhq.org/adv-guide-parameterization.html
Here’s the Page Objects tutorial with video:
http://docs.oxygenhq.org/adv-guide-page-objects.html

If you are running tests in from CLI, you can also set up iterations

http://docs.oxygenhq.org/cli-intro-config.html

Here’s the example from the documentation:

{
“iterations”: 2,
“parallel”: 1,
“url”: “http://localhost:4444/wd/hub”,
“cases”: [
{
“name”: “case1”,
“path”: “./testcase1.js”
},
{
“name”: “case2”,
“path”: “./testcase2.js”
}
],
“environment”: {
“some_parameter”: “foo”,
“another_parameter”: “bar”
},
“capabilities”: [
{
“browserName”: “ie”
},
{
“browserName”: “chrome”
}
],
“options”: {
“autoReopen”: true
}
}

If you would like some further assistance, feel free to email me: amos.feldman@cloudbeat.io and we can also setup some time for a screen share to see what you are working on.

Please let me know if this is helpful

Thanks,
-Amos

Great thanks for the response. It appears I was attempting to write in my own iterations. Thanks for pointing this out. This should resolve my issue.

2 Likes

Thanks, testerMike / Mike
Glad the iterations feature, with data driven testing seems to be what you were looking for!

Feel free to email me at amos.feldman@cloudbeat.io with any additional questions that you may have. Would love to hear from you, regardless if things are going well or if you are facing any challenges.

Thanks,
-Amos

Hi Mike,

In order to run multiple different tests in succession, you must utilize the Oxygen CLI (Command Line Interface)

Here is where you download and install the CLI: http://docs.oxygenhq.org/download-cli.html
Here are the instructions for using the CLI: http://docs.oxygenhq.org/cli-intro-config.html
In the file that you are running from the command line, you would define which tests (each in a separate file) you would like to include in the test run.

The other option, would be to (request to) setup an account in Cloudbeat (www.cloudbeat.io), which allows for cloud-based execution and orchestration of oxygen tests and test suites.

You can see how Cloudbeat can be used to execute Oxygen scripts in these videos:


If you need any help setting up your test execution from CLI I should be able to help you with that as well.

Thanks,
-Amos