Can I reuse Selenium scripts in XLT for load testing?


#1

I use Selenium scripts for browser automation.
I just want to reuse the same scripts for load testing.
Can i call the test function of Selenium script inside XLT class if Im passing XLT Driver instead of Chrome Driver ?


#2

Basically, you can use any JUnit test for load testing that satisfies the following conditions:

  1. test class inherits from one XLT’s base classes
  • com.xceptance.xlt.api.tests.AbstractTestCase for pure XLT load test cases that use the HtmlUnit backend and action classes
  • com.xceptance.xlt.api.tests.AbstractWebDriverTestCase for pure WebDriver tests
  • com.xceptance.xlt.api.engine.scripting.AbstractWebDriverScriptTestCase for tests based on XLT’s Scripting API
  1. no more than one test method per test class

Please notice that XltDriver is just a slightly modified HtmlUnitDriver. That means, that JavaScript support is not cutting edge. Some features are implemented only rudimentary, others might not be implemented at all. If you encounter any issues, feel free to reach out to the HtmlUnit project at SourceForge.

Thx,
H