Tests must be written in Java, Python, Ruby, Perl or PHP. Currently, Nerrvana uses Java 1.7.0,
Python 2.7.3 (with nose 1.3.0, selenium 2.33.0), Ruby 1.9.3p194 (with RSpec 2.14, selenium 2.33.0),
Perl 5.14.2 and PHP 5.4.1.
You can find an extract from phpinfo() output here
If you need to use a different version or require more PHP modules, please contact us.
Nerrvana supports Selenium 2.
If tests use external libraries or frameworks (for example, log4php, Selenium client driver),
all of them must be included in your project. Ant version 1.8.2 and PHPUnit 3.6.10 are available.
Tests should not depend on any user input, such as 'readln()'.
We allow only Selenium traffic between Hubs and nodes and HTTP traffic from Nerrvana nodes to your application. If your tests need to access an external system (databases, files, send emails, upload or download files) to run, please let us know and we’ll find a solution.
Tests must use Selenium server 'localhost' on port 4444 and '*chrome' as a browser, as shown below.
Execution of tests will be on the platforms selected via Nerrvana’s UI or API.
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://google.com")
$selenium = new Testing_Selenium("*chrome", "http://google.com", "localhost", 4444);
|Tests must work with Selenium. If Selenium will not receive commands from tests Nerrvana
will consider them hung and will stop execution. You will see the 'Err' status icon for
such test runs in UI.
We recommend using captureScreenshotToString() and captureEntirePageScreenshotToString(kwargs), which allow you to save screenshots in your project folder. You can read more about this here
Note: The captureEntirePageScreenshotToString() function is only available in Firefox. We do not support captureScreenshot() and captureEntirePageScreenshot(kwargs) functions.
Before loading your project to Nerrvana, please make sure that:
- - Tests can be launched by your *.sh file
- - No external files are used
- - Only relative paths are used
One way to check is to move your project folder to another location, then go to the folder with the executable file and run it.
If you received no results, for example, tests should have generated a report or a log file but it does not exist, please check file _raw_logs/userScriptLogs.txt, which contains stdout and stderr of your executable file. Here is an example:
PHP Warning: require_once(Testing/Selenium/Exception.php): failed to open stream: No such file or directory in /sandbox/2011_02_21_17_31_41/pear/Testing/Selenium.php on line 35
PHP Fatal error: require_once(): Failed opening required 'Testing/Selenium/Exception.php' (include_path='.:/usr/share/pear:/usr/share/php') in /sandbox/2011_02_21_17_31_41/pear/Testing/Selenium.php on line 35
In this case, you must change the variable include_path to fix the problem.