This works for verify PDF documents in webtest:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<configuration>
<tasks>
<taskdef
resource="webtest_base_relaxed.taskdef">
<classpath
refid="maven.test.classpath"/>
</taskdef>
<taskdef
resource="webtest_pdftest_relaxed.taskdef">
<classpath
refid="maven.test.classpath"/>
</taskdef>
<mkdir dir="target/webtest-data"/>
<!-- Delete old results file if it exists
-->
<delete
file="target/webtest-data/web-tests-result.xml"/>
<!-- This is so the default will be used if
no test case is specified -->
<property name="test"
value="run-all-tests"/>
<echo level="info">Testing
'${project.build.finalName}' with locale '${user.language}'
</echo>
<ant
antfile="src/test/resources/web-tests.xml" target="${test}">
<property name="user.language"
value="${user.language}"/>
<property name="webapp.name"
value="${project.build.finalName}"/>
<property name="host"
value="${cargo.host}"/>
<property name="port"
value="${cargo.port}"/>
</ant>
</tasks>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.canoo</groupId>
<artifactId>webtest</artifactId>
<version>${webtest.version}</version>
<exclusions>
<exclusion>
<groupId>javax.xml</groupId>
<artifactId>jsr173</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>${javamail.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>${oro.version}</version>
</dependency>
<!-- pdf steps stuff here -->
<!-- mvn install:install-file
-Dfile=pdfUnit-1.2-dev-20060622.jar -DgroupId=com.canoo -DartifactId=pdfunit
-Dversion=1.2-dev-20060622 -Dpackaging=jar -Dclassifier=sources
-DgeneratePom=true -DcreateChecksum=true -->
<dependency>
<groupId>com.canoo</groupId>
<artifactId>pdfunit</artifactId>
<version>1.2-dev-20060622</version>
</dependency>
<!-- mvn install:install-file
-Dfile=pdfbox-0.7.2.jar -DgroupId=pdfbox -DartifactId=pdfbox -Dversion=0.7.2
-Dpackaging=jar -Dclassifier=sources -DgeneratePom=true
-DcreateChecksum=true -->
<dependency>
<groupId>pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</plugin>
Jars from http://webtest.canoo.com/webtest/manual/Downloads.html
ros
mraible wrote:
>
> Unfortunately, you're probably on your own here since I've never
> configured Canoo WebTest to test PDF with Maven.
>
> Matt
>
> On 3/31/07, ros <[EMAIL PROTECTED]> wrote:
>>
>> I've aded another taksdef with pdf steps description from
>> webtest-1454.jar:
>> ...
>> <tasks>
>> <taskdef
>> resource="webtest_base_relaxed.taskdef">
>> <classpath
>> refid="maven.test.classpath"/>
>> </taskdef>
>> <taskdef
>> resource="webtest_pdftest_relaxed.taskdef">
>> <classpath
>> refid="maven.test.classpath"/>
>> </taskdef>
>> ...
>> and got error: Embedded error: taskdef A class needed by class
>> com.canoo.webtest.plugins.pdftest.PdfVerifyTextFieldStep cannot be found:
>> com/canoo/pdftest/testcase/PdfTextFieldExistsTestCase.
>> there is PdfTextFieldExistsTestCase.class in webtest-1454.jar, why it can
>> not be found?
>>
>>
>> mraible wrote:
>> >
>> > Here's the part you'll need to change:
>> >
>> > <taskdef
>> > resource="webtest_base_relaxed.taskdef">
>> > <classpath>
>> > <path
>> > refid="maven.test.classpath"/>
>> > <path
>> > location="src/main/resources"/>
>> > </classpath>
>> > </taskdef>
>> >
>> > You should be able to pick a different "resource" that has PDF Tasks
>> > in it. I'd look in the webtest.jar for a list of taskdefs. Note: You
>> > may have to add PDF-handling dependencies to the maven-antrun-plugin
>> > that these tasks are defined in.
>> >
>> > Matt
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/appfuse-2---webtest---verifypdftext-step-does-not-work-tf3333159s2369.html#a9769710
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/appfuse-2---webtest---verifypdftext-step-does-not-work-tf3333159s2369.html#a9888509
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]