You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Adrian A. (JIRA)" <ji...@apache.org> on 2009/03/31 20:26:50 UTC
[jira] Commented: (CLK-510) QuickStart should generate tests too.
[ https://issues.apache.org/jira/browse/CLK-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694203#action_12694203 ]
Adrian A. commented on CLK-510:
-------------------------------
Selenium tests would be a nice addition.
The actual generator however is a simple ANT XML file, and I find it complicated to add such logic in it
Maybe the quick-start generator should be a standalone too, not just a simple ANT file. Than it could be used directly from the command line or from the IDEs to produce the same quickstart (DRY :) )
> 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
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.