Ticket #854 (new task)

Opened 4 years ago

Last modified 3 years ago

Ambra Webapp Integration Tests

Reported by: amit Assigned to: dragisak
Priority: critical Milestone:
Component: ambra Version: 0.8.3-SNAPSHOT
Keywords: testing Cc:
Blocking: Blocked By: 744

Description (Last modified by jsuttor)

Design Centers - Goals

  • reality based
    • real webapp handling real URIs
      • tests only use a real URI vs. Java API, stubs, embedded, etc.
    • == (as possible) to production
      • need 2 webapps
    • tests are scenario based, e.g. user does this/that in this/that order
  • initial focus is on testing correctness
    • minimal # of steps, Articles/etc. needed
  • put off Javascript, for now, no rat-holing
    • allows full testing of webapp post-POST
  • tests used by
    • continuous build (reports, pass/fail, code coverage)
    • locally by developers
    • arbitrary instance of webapp, e.g. branch/stage/production
    • cross platform
  • mvn this/that driven
    • cross-platform, etc.
    • minimal rat-holing
  • evolve into performance tests still scenario based, e.g. certain % of users
    • anonymous targeted URIs, search, annotate, etc.

Impl

Use Canoo Webtest w/Groovy Testing. (focus is on writing tests.)

Environment

  • Install components
    • mvn ant-tasks:ecqs-install ant-tasks:mulgara-install ant-tasks:fedora-install ant-tasks:search-install
  • Deploy components
    • mvn ant-tasks:ecqs-start fedora-start mulgara-start search-start
    • jetty:run * 2 w/different props for different ports, configs

All installation is confined to a user defined/owned directory. No need for /etc. All runtime inputs/outputs confined to said user defined/owned directory.

Create common file directory structure, e.g. logs, spool, etc. ala single box install, under ${topazproject.install.dir} and config all start goals to use common values.

Fully config all start goals to have/use appropriate development log4j.xml, etc.

Tests

  • calls single groovy entry point which explicitly calls scenarios in order
  • bootstrap server data from ground zero
    • create users w/webapp tests
    • ingest Articles w/webapp tests
    • create Volumes/Issues w/webapp tests

Known Issues

  • can ${component}-start mvn goals be detached or started in background?
  • CAS: missing cas.xml, doesn't respect property overrides on mvn cmd line

Dependency Graph

Change History

03/31/08 20:01:11 changed by amit

  • milestone changed from 0.8.3 to 0.9.0.

04/07/08 15:37:15 changed by russ

  • blocking changed.
  • blockedby changed.

this ticket includes performance testing

04/07/08 17:08:44 changed by amit

Please update IntegrationTesting or better still delete that page and create a new AmbraTesting? that describes unit, integration and performance testing.

04/17/08 10:57:00 changed by jsuttor

  • keywords set to testing.
  • status changed from new to assigned.
  • description changed.
  • summary changed from Update test data and framework to get automated tests running again. to Ambra Webapp Integration Tests.

04/17/08 11:52:31 changed by jsuttor

  • description changed.

05/07/08 12:19:25 changed by amit

  • owner deleted.
  • status changed from assigned to new.

Transferring back to the open queue.

05/27/08 15:59:23 changed by amit

  • milestone deleted.

Removing from 0.9.

08/18/08 14:52:39 changed by amit

  • component changed from publishing-app-testing to ambra.

09/08/08 19:23:21 changed by ronald

  • owner set to amit.
  • blockedby set to 744.
  • milestone set to 0.9.1.

09/10/08 16:58:02 changed by amit

  • type changed from defect to task.

09/17/08 10:40:17 changed by dragisak

Unit Testing Struts 2 Actions wired with Spring using JUnit

Not exactly integration testing. More for unit testing Struts actions but very useful imho.

11/17/08 14:57:47 changed by amit

  • milestone deleted.

Moving this out again.

12/19/08 08:11:19 changed by amit

  • owner changed from amit to dragisak.

12/19/08 12:25:47 changed by dragisak

Another interesting link that describes how to run web tests using Selenium, Cargo, TestNG and Maven. http://binil.wordpress.com/2006/12/08/automated-smoke-tests-with-selenium-cargo-testng-and-maven/