Hi Marc,

Well, this is an exceptional usage. CSS files are usually not supposed to be 
'changed'.

Clearing cache is the correct way.

Yours,
Ahmed
----
Blog: http://asashour.blogspot.com



________________________________
From: Marc Philipp <[email protected]>
To: [email protected]
Sent: Tue, May 18, 2010 3:03:29 PM
Subject: [Webtest] HtmlUnit Cache Problem

I have come across a problem when migrating from an ancient release of WebTest 
to R_1804.

We have a test that checks the output of a generated CSS file. This is done 
twice, once before and
once after setting a parameter that affects the CSS output (using a custom ant 
task), i.e.
something along these lines:

<invoke url="http://example.org/generated.css"/>
<verifytext text="color"/>

<setCustomProperty document="xxx">
    <property key="someKey" value="someValue"/>
</setCustomProperty>

<invoke url="http://example.org/generated.css"/>
<not>
    <verifytext text="color"/>
</not>

However, HtmlUnit seems to cache the CSS from the first invocation. When I add 
the following in
between the two invocations, the test passes:

<groovy>
   step.context.webClient.cache.clear()
</groovy>

Can the cache be disabled or cleared somehow without relying on the HtmlUnit 
API and a groovy
scriptlet?

Marc Philipp


-- 
andrena objects ag
Albert-Nestler-Str. 11
D-76131 Karlsruhe

Tel.: +49 (0) 721 / 6105-122
Fax.: +49 (0) 721 / 6105-140

mailto:[email protected]
http://www.andrena.de

Amtsgericht Mannheim, HRB 109694
Vorstand: Dr. Dieter Kuhn, Matthias Grund
Aufsichtsratvorsitzender: Johannes Jungbluth, Frankfurt


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



      

Reply via email to