Funkčné testovanie webových aplikácií

Jozef Hartinger

Čo je testovanie?

Definice

vefifikácia - produkt pracuje korektne

validácia - vysledny produkt je to co sme mali v plane vyrobit

Druhy testovania

Selenium

Selenium logo

Selenium IDE

Selenium IDE DEMO

Selenium IDE

Nevýhody Selenium IDE

Selenium Core

Selenium RC

Princíp Selenium RC

Selenium RC

Selenium RC API pre Javu

Selenium RC DEMO

import com.thoughtworks.selenium.*;
import junit.framework.*;
public class GoogleTest extends TestCase {
    private Selenium browser;
    public void setUp() {
        browser = new DefaultSelenium("localhost",
            4444, "*firefox", "http://www.google.com");
        browser.start();
    }
    
    public void testGoogle() {
        browser.open("http://www.google.com/webhp?hl=en");
        browser.type("q", "hello world");
        browser.click("btnG");
        browser.waitForPageToLoad("5000");
        assertEquals("hello world - Google Search", browser.getTitle());
    }
    
    public void tearDown() {
        browser.stop();
    }
}

Selenium RC DEMO

Zdroje