You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2016/08/16 19:00:57 UTC

About using JavaFX WebEngine

Hello,
We had a discussion on using a more up to date browser (JavaFX one) in the
HTML renderer.
I think we also discussed of having it in our Roadmap for 2016/2017.

I made a little POC and it nearly works except that I think it may not suit
fully our need.

When it works the rendering is much better, you can see an example here at
the difference that we will be using loadContent (read below):

   -
   https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/swing-fx-interoperability.htm

Note that with this implementation, we face Font issues.

My POC uses WebEngine#loadContent:

   -
   https://docs.oracle.com/javafx/2/api/javafx/scene/web/WebEngine.html#loadContent(java.lang.String)

The issue is that it doesn't load any resources (for security reasons it is
not allowed to, it can only load local resources) so for many websites the
rendering is not great.

Using WebEngine.html#load(Stirng url)  might be better but it wouldn't
reflect what was downloaded by SampleResult.

Any thoughts or ideas ? Am I missing something ?
-- 
Regards
Philippe

Re: About using JavaFX WebEngine

Posted by Philippe Mouawad <ph...@gmail.com>.
Hi,
Patch proposal at :
https://bz.apache.org/bugzilla/show_bug.cgi?id=60144

It would require a JAVA8 upgrade.
Regards
Philippe

On Fri, Aug 19, 2016 at 9:20 AM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

>
>
> On Thu, Aug 18, 2016 at 2:21 PM, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> wrote:
>
>> Philippe>The issue is that it doesn't load any resources (for security
>> reasons it is
>> Philippe>not allowed to, it can only load local resources) so for many
>> websites the rendering is not great.
>>
>> Does that mean JMeter should spawn a HTTP server, so fx browser could
>> fetch
>> exact page and relevant resources from it?
>>
> It's an approach to test although during recording I usually ignore
> resources
>
>>
>> Vladimir
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: About using JavaFX WebEngine

Posted by Philippe Mouawad <ph...@gmail.com>.
On Thu, Aug 18, 2016 at 2:21 PM, Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:

> Philippe>The issue is that it doesn't load any resources (for security
> reasons it is
> Philippe>not allowed to, it can only load local resources) so for many
> websites the rendering is not great.
>
> Does that mean JMeter should spawn a HTTP server, so fx browser could fetch
> exact page and relevant resources from it?
>
It's an approach to test although during recording I usually ignore
resources

>
> Vladimir
>



-- 
Cordialement.
Philippe Mouawad.

Re: About using JavaFX WebEngine

Posted by Vladimir Sitnikov <si...@gmail.com>.
Philippe>The issue is that it doesn't load any resources (for security
reasons it is
Philippe>not allowed to, it can only load local resources) so for many
websites the rendering is not great.

Does that mean JMeter should spawn a HTTP server, so fx browser could fetch
exact page and relevant resources from it?

Vladimir

Re: About using JavaFX WebEngine

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
I've been using the POC browser for 2 days now in a real-world scripting
campaign and even with the previous issues I mentioned in my mail it ends
up being very useful to identify the problems when a requests fails.

I compared old renderer and new one.
With the old one, I am nearly never able to find anything (rendering is
broken). With the new one, in 90% of cases I find the problem thanks to the
new view, so I think it is very useful.

There are 2 things to note:

- This feature will have to wait for JAVA 8 Migration to avoid complex
deployment and possible conflicts when using Java8 while we have to
distribute jars that are now in Java8 or in a more recent version
- I faced java crashes which I suppose reveals a Java8_u101 bug on MacOSX
at least since err_pid file is generated

Regards
Philippe



On Tue, Aug 16, 2016 at 9:00 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hello,
> We had a discussion on using a more up to date browser (JavaFX one) in the
> HTML renderer.
> I think we also discussed of having it in our Roadmap for 2016/2017.
>
> I made a little POC and it nearly works except that I think it may not
> suit fully our need.
>
> When it works the rendering is much better, you can see an example here at
> the difference that we will be using loadContent (read below):
>
>    - https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/
>    swing-fx-interoperability.htm
>
> Note that with this implementation, we face Font issues.
>
> My POC uses WebEngine#loadContent:
>
>    - https://docs.oracle.com/javafx/2/api/javafx/scene/web/
>    WebEngine.html#loadContent(java.lang.String)
>    <https://docs.oracle.com/javafx/2/api/javafx/scene/web/WebEngine.html#loadContent(java.lang.String)>
>
> The issue is that it doesn't load any resources (for security reasons it
> is not allowed to, it can only load local resources) so for many websites
> the rendering is not great.
>
> Using WebEngine.html#load(Stirng url)  might be better but it wouldn't
> reflect what was downloaded by SampleResult.
>
> Any thoughts or ideas ? Am I missing something ?
> --
> Regards
> Philippe
>
>
>


-- 
Cordialement.
Philippe Mouawad.