You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Erwan de FERRIERES <er...@nereide.biz> on 2010/01/25 17:38:14 UTC

Improvements on seleniumXml

Hi Brett and all interested in seleniumXml,

As you may have seen, I've introduced last week (rev. 901704) the 
ability to take screenshots from a selenium test. This is working fine, 
but only on a trigger.The next move would be to take screenshots on an 
error.

If anyone has clues to make it happen, I would be happy to work on it !

Cheers,

-- 
Erwan de FERRIERES
www.nereide.biz

Re: Improvements on seleniumXml

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Hi Brett,

Saddly I haven't enough time at the moment to continue on the 
seleniumXml migration to HttpComandProcessor. I have created a JIRA 
issue with what I have already done, if you want to contine you are very 
welcome !

https://issues.apache.org/jira/browse/OFBIZ-3438

Cheers,

Le 29/01/2010 12:23, Brett Palmer a écrit :
> Sounds good. I'm looking forward to seeing it in the trunk when its
> available.
>
>
> Brett

-- 
Erwan de FERRIERES
www.nereide.biz

Re: Improvements on seleniumXml

Posted by Brett Palmer <br...@gmail.com>.
Sounds good. I'm looking forward to seeing it in the trunk when its
available.


Brett

On Thu, Jan 28, 2010 at 2:18 PM, Erwan de FERRIERES <
erwan.de-ferrieres@nereide.biz> wrote:

> Brett,
> I have started some development, the problem was using a DefaultSelenium,
> instead of a HttpCommandProcessor.
> Changing the class will pilot the selenium server via Http instead of the
> default method. Moreover, we have now a result, which can be processed.
> I had to change the manner to call the way of executing a command which now
> using doCommand(String command, String[] args), so all the methods will be
> modified. The visible part remains unchanged.
> This permits me now to log a successful command, and then (just starting)
> making screenshots.
>
> You will maybe find the first implementation tomorrow, if hopefully I find
> time to push it to the trunk.
>
> Cheers,
>
>
> Le 26/01/2010 22:19, Erwan de FERRIERES a écrit :
>
>  Brett,
>>
>> I wanted this to be a sort of prefix for the screenshot name as it is
>> not automated. Then, in the java code, there is a timestamp added, to be
>> sure that we have a unique name.
>> The image is saved in runtime, but this can be changed in the
>> seleniumXml.properties file. I didn't think of saving it to the same
>> folder as the test.
>>
>> HTH,
>>
>> Le 26/01/2010 19:25, Brett Palmer a écrit :
>>
>>> Erwan,
>>>
>>> When you use the captureEntirePageScreenshot in your test what is the
>>> final
>>> outcome? In other words, does it create a new named
>>> CommEventCreateOpportunity in the directory the test is run. I'm asking
>>> because that's what the Selenium RC API looks like it does.
>>>
>>> <captureEntirePageScreenshot value="CommEventCreateOpportunity"/>
>>>
>>>
>>> Brett
>>>
>>> On Mon, Jan 25, 2010 at 10:20 AM, Erwan de FERRIERES<
>>> erwan.de-ferrieres@nereide.biz> wrote:
>>>
>>>
>>>>
>>>> Le 25/01/2010 18:11, Brett Palmer a écrit :
>>>>
>>>> Erwan,
>>>>
>>>>>
>>>>> That sounds great. When you say it works "but only on a trigger" do you
>>>>> mean you have to make an explicit call like "getScreenShot()"?
>>>>>
>>>>>  You have to add this command in your seleniumXml script :
>>>> captureEntirePageScreenshot
>>>> And then it took a screenshot which is saved in runtime.
>>>> If you look at the CommEventCreateOpportunity_testsuite.xml, you will
>>>> see
>>>> the command.
>>>>
>>>> The problem is I don't know how to handle seleniumXml errors, and then
>>>> trigger a screenshot...
>>>>
>>>>
>>>>  It would be a nice feature to get a screen shot on an error as this
>>>>> could
>>>>> be
>>>>> part of an automated build. This also brings up the whole logging
>>>>> mechanism
>>>>> in SeleniumXml. Since it runs outside of the container it doesn't have
>>>>> access to the logging features of ofbiz. This would have to be setup
>>>>> separately.
>>>>>
>>>>>
>>>>> ../..
>>>>>
>>>>
>>>>
>>>> --
>>>> Erwan de FERRIERES
>>>> www.nereide.biz
>>>>
>>>>
>>>
>>
> --
> Erwan de FERRIERES
> www.nereide.biz
>

Re: Improvements on seleniumXml

Posted by Erwan de FERRIERES <er...@nereide.biz>.
Brett,
I have started some development, the problem was using a 
DefaultSelenium, instead of a HttpCommandProcessor.
Changing the class will pilot the selenium server via Http instead of 
the default method. Moreover, we have now a result, which can be processed.
I had to change the manner to call the way of executing a command which 
now using doCommand(String command, String[] args), so all the methods 
will be modified. The visible part remains unchanged.
This permits me now to log a successful command, and then (just 
starting) making screenshots.

You will maybe find the first implementation tomorrow, if hopefully I 
find time to push it to the trunk.

Cheers,


Le 26/01/2010 22:19, Erwan de FERRIERES a écrit :
> Brett,
>
> I wanted this to be a sort of prefix for the screenshot name as it is
> not automated. Then, in the java code, there is a timestamp added, to be
> sure that we have a unique name.
> The image is saved in runtime, but this can be changed in the
> seleniumXml.properties file. I didn't think of saving it to the same
> folder as the test.
>
> HTH,
>
> Le 26/01/2010 19:25, Brett Palmer a écrit :
>> Erwan,
>>
>> When you use the captureEntirePageScreenshot in your test what is the
>> final
>> outcome? In other words, does it create a new named
>> CommEventCreateOpportunity in the directory the test is run. I'm asking
>> because that's what the Selenium RC API looks like it does.
>>
>> <captureEntirePageScreenshot value="CommEventCreateOpportunity"/>
>>
>>
>> Brett
>>
>> On Mon, Jan 25, 2010 at 10:20 AM, Erwan de FERRIERES<
>> erwan.de-ferrieres@nereide.biz> wrote:
>>
>>>
>>>
>>> Le 25/01/2010 18:11, Brett Palmer a écrit :
>>>
>>> Erwan,
>>>>
>>>> That sounds great. When you say it works "but only on a trigger" do you
>>>> mean you have to make an explicit call like "getScreenShot()"?
>>>>
>>> You have to add this command in your seleniumXml script :
>>> captureEntirePageScreenshot
>>> And then it took a screenshot which is saved in runtime.
>>> If you look at the CommEventCreateOpportunity_testsuite.xml, you will
>>> see
>>> the command.
>>>
>>> The problem is I don't know how to handle seleniumXml errors, and then
>>> trigger a screenshot...
>>>
>>>
>>>> It would be a nice feature to get a screen shot on an error as this
>>>> could
>>>> be
>>>> part of an automated build. This also brings up the whole logging
>>>> mechanism
>>>> in SeleniumXml. Since it runs outside of the container it doesn't have
>>>> access to the logging features of ofbiz. This would have to be setup
>>>> separately.
>>>>
>>>>
>>>> ../..
>>>
>>>
>>> --
>>> Erwan de FERRIERES
>>> www.nereide.biz
>>>
>>
>

-- 
Erwan de FERRIERES
www.nereide.biz

Re: Improvements on seleniumXml

Posted by Erwan de FERRIERES <er...@nereide.biz>.
Brett,

I wanted this to be a sort of prefix for the screenshot name as it is 
not automated. Then, in the java code, there is a timestamp added, to be 
sure that we have a unique name.
The image is saved in runtime, but this can be changed in the 
seleniumXml.properties file. I didn't think of saving it to the same 
folder as the test.

HTH,

Le 26/01/2010 19:25, Brett Palmer a écrit :
> Erwan,
>
> When you use the captureEntirePageScreenshot in your test what is the final
> outcome?  In other words, does it create a new named
> CommEventCreateOpportunity in the directory the test is run.  I'm asking
> because that's what the Selenium RC API looks like it does.
>
>   <captureEntirePageScreenshot value="CommEventCreateOpportunity"/>
>
>
> Brett
>
> On Mon, Jan 25, 2010 at 10:20 AM, Erwan de FERRIERES<
> erwan.de-ferrieres@nereide.biz>  wrote:
>
>>
>>
>> Le 25/01/2010 18:11, Brett Palmer a écrit :
>>
>>   Erwan,
>>>
>>> That sounds great.  When you say it works "but only on a trigger" do you
>>> mean you have to make an explicit call like "getScreenShot()"?
>>>
>> You have to add this command in your seleniumXml script :
>> captureEntirePageScreenshot
>> And then it took a screenshot which is saved in runtime.
>> If you look at the CommEventCreateOpportunity_testsuite.xml, you will see
>> the command.
>>
>> The problem is I don't know how to handle seleniumXml errors, and then
>> trigger a screenshot...
>>
>>
>>> It would be a nice feature to get a screen shot on an error as this could
>>> be
>>> part of an automated build.  This also brings up the whole logging
>>> mechanism
>>> in SeleniumXml.  Since it runs outside of the container it doesn't have
>>> access to the logging features of ofbiz.  This would have to be setup
>>> separately.
>>>
>>>
>>>   ../..
>>
>>
>> --
>> Erwan de FERRIERES
>> www.nereide.biz
>>
>

-- 
Erwan de FERRIERES
www.nereide.biz

Re: Improvements on seleniumXml

Posted by Brett Palmer <br...@gmail.com>.
Erwan,

When you use the captureEntirePageScreenshot in your test what is the final
outcome?  In other words, does it create a new named
CommEventCreateOpportunity in the directory the test is run.  I'm asking
because that's what the Selenium RC API looks like it does.

 <captureEntirePageScreenshot value="CommEventCreateOpportunity"/>


Brett

On Mon, Jan 25, 2010 at 10:20 AM, Erwan de FERRIERES <
erwan.de-ferrieres@nereide.biz> wrote:

>
>
> Le 25/01/2010 18:11, Brett Palmer a écrit :
>
>  Erwan,
>>
>> That sounds great.  When you say it works "but only on a trigger" do you
>> mean you have to make an explicit call like "getScreenShot()"?
>>
> You have to add this command in your seleniumXml script :
> captureEntirePageScreenshot
> And then it took a screenshot which is saved in runtime.
> If you look at the CommEventCreateOpportunity_testsuite.xml, you will see
> the command.
>
> The problem is I don't know how to handle seleniumXml errors, and then
> trigger a screenshot...
>
>
>> It would be a nice feature to get a screen shot on an error as this could
>> be
>> part of an automated build.  This also brings up the whole logging
>> mechanism
>> in SeleniumXml.  Since it runs outside of the container it doesn't have
>> access to the logging features of ofbiz.  This would have to be setup
>> separately.
>>
>>
>>  ../..
>
>
> --
> Erwan de FERRIERES
> www.nereide.biz
>

Re: Improvements on seleniumXml

Posted by Brett Palmer <br...@gmail.com>.
Let me take a look at your test.  It doesn't seem like it would be hard to
add and a good feature.  I'll keep you posted on what I find.

Thanks for the good feedback.


Brett

On Mon, Jan 25, 2010 at 10:20 AM, Erwan de FERRIERES <
erwan.de-ferrieres@nereide.biz> wrote:

>
>
> Le 25/01/2010 18:11, Brett Palmer a écrit :
>
>  Erwan,
>>
>> That sounds great.  When you say it works "but only on a trigger" do you
>> mean you have to make an explicit call like "getScreenShot()"?
>>
> You have to add this command in your seleniumXml script :
> captureEntirePageScreenshot
> And then it took a screenshot which is saved in runtime.
> If you look at the CommEventCreateOpportunity_testsuite.xml, you will see
> the command.
>
> The problem is I don't know how to handle seleniumXml errors, and then
> trigger a screenshot...
>
>
>> It would be a nice feature to get a screen shot on an error as this could
>> be
>> part of an automated build.  This also brings up the whole logging
>> mechanism
>> in SeleniumXml.  Since it runs outside of the container it doesn't have
>> access to the logging features of ofbiz.  This would have to be setup
>> separately.
>>
>>
>>  ../..
>
>
> --
> Erwan de FERRIERES
> www.nereide.biz
>

Re: Improvements on seleniumXml

Posted by Erwan de FERRIERES <er...@nereide.biz>.

Le 25/01/2010 18:11, Brett Palmer a écrit :
> Erwan,
>
> That sounds great.  When you say it works "but only on a trigger" do you
> mean you have to make an explicit call like "getScreenShot()"?
You have to add this command in your seleniumXml script :
captureEntirePageScreenshot
And then it took a screenshot which is saved in runtime.
If you look at the CommEventCreateOpportunity_testsuite.xml, you will 
see the command.

The problem is I don't know how to handle seleniumXml errors, and then 
trigger a screenshot...
>
> It would be a nice feature to get a screen shot on an error as this could be
> part of an automated build.  This also brings up the whole logging mechanism
> in SeleniumXml.  Since it runs outside of the container it doesn't have
> access to the logging features of ofbiz.  This would have to be setup
> separately.
>
>
../..

-- 
Erwan de FERRIERES
www.nereide.biz

Re: Improvements on seleniumXml

Posted by Brett Palmer <br...@gmail.com>.
Erwan,

That sounds great.  When you say it works "but only on a trigger" do you
mean you have to make an explicit call like "getScreenShot()"?

It would be a nice feature to get a screen shot on an error as this could be
part of an automated build.  This also brings up the whole logging mechanism
in SeleniumXml.  Since it runs outside of the container it doesn't have
access to the logging features of ofbiz.  This would have to be setup
separately.


Brett

On Mon, Jan 25, 2010 at 9:38 AM, Erwan de FERRIERES <
erwan.de-ferrieres@nereide.biz> wrote:

> Hi Brett and all interested in seleniumXml,
>
> As you may have seen, I've introduced last week (rev. 901704) the ability
> to take screenshots from a selenium test. This is working fine, but only on
> a trigger.The next move would be to take screenshots on an error.
>
> If anyone has clues to make it happen, I would be happy to work on it !
>
> Cheers,
>
> --
> Erwan de FERRIERES
> www.nereide.biz
>