Directory

← Back

LoadTestDriver add-on

Probably the simplest way to generate load tests for Vaadin applications.

Author

Contributors

Rating

Probably the simplest way to make scalability tests for Vaadin applications. Use this in your TestBench test instead of e.g. ChromeDriver, and it will record a Gatling scalability test with given parameters. See project's GitHub page for more information.

  • Version 0.1.x for Vaadin 7 (TestBench 4)
  • Version 0.2.x for Vaadin 8 (TestBench 5)
  • Version 0.3.x for Vaadin 10+ (TestBench 6)

CAUTION! This is an early access release: very experimental, please report bugs and improvement ideas. Note: Automatic Gatling test configuration (xsrf token, connector ids etc.) is at the moment working only in Vaadin 7 version of the add-on.

Sample code

public class MyUITest extends TestBenchTestCase {    

	@Before
	public void setUp() throws Exception {
		WebDriver driver = new LoadTestDriverBuilder().
				withIpAddress(LoadTestDriver.getLocalIpAddress()).
				withNumberOfConcurrentUsers(1).
				withRampUpTimeInSeconds(1).
				withTestName("MyUI_ScalabilityTest").
				withPath("/Users/jotatu/Desktop/gatling").
				withResourcesPath("/Users/jotatu/Desktop/gatling").
				withStaticResourcesIngnoring().
				withTestRefactoring().
				build();
		setDriver(driver);
//		setDriver(new ChromeDriver());	
	}

    /**
     * Opens the URL where the application is deployed.
     */
    private void openTestUrl() {
        getDriver().get(LoadTestDriver.getLocalIpAddressWithPortAndContextPath(8080,"ui"));
    }

    @Test
    public void testClickButton() throws Exception {
        openTestUrl();

        // standard TestBench test case ...
    }
}

Links

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Bug fixes

Released
2019-10-17
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.5+
Vaadin 8.0+ in 0.2.0
Vaadin 7.7+ in 0.0.2
Vaadin 8.6+ in 0.2.2
Vaadin 13+ in 0.3.1
Vaadin 10+ in 0.3.0
Vaadin 14+ in 0.3.4
Browser
N/A
Online