click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian A. (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CLK-510) QuickStart should generate tests too.
Date Sun, 03 Nov 2013 10:15:18 GMT

     [ https://issues.apache.org/jira/browse/CLK-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adrian A. reassigned CLK-510:
-----------------------------

    Assignee: Adrian A.

> QuickStart should generate tests too.
> -------------------------------------
>
>                 Key: CLK-510
>                 URL: https://issues.apache.org/jira/browse/CLK-510
>             Project: Click
>          Issue Type: New Feature
>            Reporter: Joseph Schmidt
>            Assignee: Adrian A.
>             Fix For: 3.0.0
>
>
> QuickStart generation should produce test artifacts(and configuration for tests too).
> To enforce a good usage of Click, the generator should produce JUnit tests (with SeleniumUnit
test for the Pages).
> E.g. for google page (but it is similar for every click page):
> <code>
> 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();
>     }
> }
> </code>



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message