Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This

...

page

...

is

...

intended

...

to

...

be

...

the

...

root

...

of

...

cookbooks

...

and/or

...

FAQ

...

(work

...

in

...

progress

...

FAQ

...

and

...

cookbook

...

will

...

perhaps

...

be

...

separated

...

later).

...

I

...

hope

...

to

...

integrate

...

interesting

...

points

...

from

...


http://ofbizwiki.go-integral.com/Wiki.jsp?page=FAQ&nbsp

...

and

...

http://www.opensourcestrategies.com/ofbiz/tutorials.php

...

(OFBiz

...

Cookbooks

...

part).

...

For

...

the

...

later

...

it

...

depends

...

on

...

OpenSource

...

Strategies

...

agreement

...

(still

...

waiting

...

for

...

it

...

;o).

...


But

...

perhaps

...

links

...

to

...

them

...

may

...

be

...

sufficient...

...

Until

...

they

...

diseappear...

...

then

...

I

...

will

...

see...

...


Tables of content

Nabble 

Search in Nabble OFBiz forum from Firefox 

Eclipse

Running and Debugging OFBiz in Eclipse

Derby

Change a field type in Derby
Working with multiple Derby databases
Browse a Derby database and more using SQuirrel

Use cvv codes in OFBiz

Ajax

Disable Browser Cache for Module
Integrate OFBiz with Yui-Ext

Windows

Patch on Windows
Run OFBiz as a Windows service

Selenium

Some Selenium tips

...

Anchor
field type in Derby
field type in Derby

Change a field type in Derby 

  1. Export the table to xml
  2. Drop the table
  3. Start OFBiz - table recreated with new structure
  4. Import xml data from #1

Advice from Adrian Crum.

Anchor
SQuirrel
SQuirrel

Browse a Derby database and more using SQuirrel

http://db.apache.org/derby/integrate/SQuirreL_Derby.html#N101C7

...


For

...

the

...

URL

...

use

...

something

...

like

...

jdbc:derby:c:/ofbiz/runtime/data/derby/ofbiz

...

(of

...

course

...

using

...

your

...

right

...

path)

...

Link

...

from

...

Sundeep

...

Ray.

...

There

...

is

...

an

...

alternative

...

to

...

this

...

solution

...

:

...

http://docs.ofbiz.org/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Connectingthedatabase

...

Anchor
cvv codes
cvv codes

Use CVV (also called CV2 and more acronyms) codes in OFBiz

https://issues.apache.org/jira/browse/OFBIZ-767#action_12476855

...

Anchor
DisablingBrowserCache
DisablingBrowserCache

Ajax : Disable Browser Cache for Module

http://docs.ofbiz.org/x/CAo

...

A

...

tip

...

from

...

Krzysztof

...

Podejma

...

Anchor
Yui-Ext
Yui-Ext

...

Ajax : Integrate OFBiz with Yui-Ext

...

http://www.nabble.com/Re%3A-integrate-OFBiz-with-Yui-Ext-p11131937.html

...

A

...

tip

...

from

...

Jason

...

Wu

...

Anchor
PatchingOnWindows
PatchingOnWindows

Patch on Windows

To patch on Windows you have to download patch.exe.

...

But

...

you

...

may

...

encouter

...

EOL

...

problems

...

with

...

patch.exe.

...

That's

...

why

...

I

...

prefer

...

to

...

use

...

Tortoise's

...

"Apply

...

Patch"

...

option

...

in

...

a

...

1st

...

step.

...

Tortoise

...

is

...

the

...

best

...

SVN

...

and

...

CVS

...

UI

...

existing,

...

either

...

on

...

Linux

...

or

...

Windows.

...

Besides

...

Tortoise

...

comes

...

from

...

Tigris

...

too.

...


Then

...

if

...

I

...

get

...

problems

...

with

...

Tortoise

...

(or

...

Eclipse's

...

"Apply

...

Patch"

...

option

...

wich

...

is

...

near

...

Tortoise

...

for

...

patching

...

but

...

less

...

supple

...

for

...

this

...

option

...

and

...

far

...

more

...

ingeneral)

...

I

...

use

...

the

...

patch

...

command.

...

Something

...

to

...

understand

...

is

...

that

...

Tortoise

...

actually

...

use

...

"SVN

...

merge"

...

so

...

in

...

certains

...

cases

...

problems

...

arise.

...


To

...

avoid

...

EOL

...

problems

...

with

...

the

...

patch

...

command,

...

I

...

use

...

a

...

bat

...

file

...

patchdos

...

.bat

...

:

...

todos

...

%1

...


patch

...

-p0

...

<

...

%1

...

where

...

todos

...

is

...

and

...

exe

...

to

...

download.

...

Of

...

course

...

you

...

will

...

have

...

to

...

deal

...

with

...

path.

...

But

...

at

...

this

...

stage

...

I

...

guess

...

it's

...

easy...

...

 I just learned from https://sourceforge.net/project/shownotes.php?release_id=508633

...

that

...

the

...

"--binary"

...

option

...

may

...

be

...

used

...

in

...

that

...

case,

...

did

...

no

...

try

...

yet...

...

Anchor
WindowsService
WindowsService

Run OFBiz as a Windows service

...

  • .

...


  • Documentation

...

  • and

...

  • example

...

  • code

...

  • are

...

  • also

...

  • available

...


  • Unzip

...

  • the

...

  • JavaService-bin-1.2.x.zip

...

  • (or

...

  • JavaService-2.0.x.zip)

...

  • Where

...

  • should

...

  • the

...

  • expanded

...

  • files

...

  • be

...

  • located?

...


  • Set

...

  • up

...

  • and

...

  • run

...

  • your

...

  • script

...

  • with

...

  • the

...

  • appropriate

...

  • path.

...

  • Ex:

...

  • Code Block

...

  • 
    javaservice -install OFBiz %java_home%\jre\bin\server\jvm.dll -Xms256M -Xmx512M
    -Djava.class.path=%java_home%\lib\tools.jar;%ofbiz_home%\ofbiz.jar
    -start org.ofbiz.base.start.Start
    -out %ofbiz_home%\logs\serviceLog.txt
    -err %ofbiz_home%\logs\serviceErr.txt
    -current %ofbiz_home%
    -manual
    

...


Note:

...

If

...

your

...

java

...

sdk

...

is

...

installed

...

under

...

a

...

directory

...

with

...

a

...

space

...

in

...

it,

...

the

...

service

...

will

...

install,

...

but

...

not

...

start

...

properly,

...

unless

...

you

...

change

...

java_home

...

to

...

the

...

DOS

...

8.3

...

name.

...

For

...

example,

...

if

...

your

...

java

...

sdk

...

is

...

installed

...

in

...

C:\Program

...

Files\Java\j2sdk1.4.2_xx

...

then

...

you

...

would

...

set

...

java_home=C:\PROGRA~1\Java\j2sdk1.4.2_xx

...

*

...

Go

...

to

...

the

...

win2k

...

services

...

app

...

and

...

you

...

should

...

now

...

find

...

a

...

service

...

'OFBiz'

...

set

...

up

...

to

...

run

...

manually

...

(this

...

of

...

course

...

can

...

be

...

changed

...

to

...

run

...

automatically

...

if

...

so

...

desired).

...

  • Alternatively,

...

  • the

...

  • service

...

  • can

...

  • be

...

  • started

...

  • with

...

  • the

...

  • command:

...

  • net

...

  • start

...

  • OFBiz

...

  • And

...

  • the

...

  • service

...

  • can

...

  • then

...

  • be

...

  • stopped

...

  • with

...

  • the

...

  • command:

...

  • net

...

  • stop

...

  • OFBiz

...

Advice from  enki_ at users.sourceforge.net.

...

There

...

is

...

an

...

alternative

...

to

...

this

...

solution

...

:

...

How

...

to

...

Run

...

OFBiz

...

as

...

Windows

...

Service

...

with

...

Java

...

Service

...

Wrapper

Anchor
SomeSeleniumTips
SomeSeleniumTips

Some Selenium tips

Due to some license issues with external libraries used in Selenium we cannot include this in the Apache trunk; However, a new component has been created which is free to download and use, but lives in an ofbizext repository.

https://svn.hotwaxmedia.com/svn/ofbizext/selenium

...

Drop

...

this

...

in

...

hot-deploy.

...

If

...

you

...

want

...

to

...

know

...

more,

...

please

...

look

...

at

...

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

...


----

1) For running "successive" test cases I used browser "Refresh" button but I think there might be some better option to handle this. Is there any option exists in Selenium IDE ?

If you want to chain execution of different tests, there is the notion of test suite. A list of tests to run one after the other (see http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/neogia/manufacturing/webapp/manufacturing/tests/ManufacturingTestSuite.html?rev=1.9;content-type=text%2Fplain;cvsroot=neogia

...

)

...

Otherwise

...

if

...

you

...

just

...

want

...

to

...

replay

...

the

...

same

...

test

...

in

...

a

...

loop,

...

I'm

...

not

...

aware

...

of

...

a

...

such

...

feature

...

in

...

selenium.

...

Bur

...

if

...

the

...

loop

...

is

...

finite,

...

you

...

can

...

achieve

...

a

...

similar

...

result

...

by

...

using

...

a

...

test

...

suite

...

that

...

refers

...

x

...

times

...

the

...

same

...

test.

...

2)

...

Suppose

...

I

...

have

...

a

...

condition

...

to

...

create

...

the

...

new

...

user

...

each

...

time.

...

As

...

I

...

can

...

put

...

the

...

value

...

of

...

user

...

login

...

say

...

"user1"

...

for

...

the

...

first

...

time

...

but

...

when

...

this

...

test

...

case

...

runs

...

second

...

time

...

it

...

generates

...

error

...

(It

...

hangs

...

up

...

in

...

between).

...

So

...

Is

...

there

...

any

...

option

...

to

...

put

...

a

...

"counter"

...

or

...

Javascript

...

code

...


in

...

the

...

Test

...

cases

...

so

...

I

...

could

...

create

...

the

...

"user2"

...

when

...

this

...

test

...

case

...

runs

...

second

...

time

...

??

...

The

...

general

...

problem

...

behind

...

you

...

issue

...

is

...

how

...

to

...

run

...

a

...

test

...

multiple

...

times

...

wihtout

...

risking

...

duplicated

...

primary

...

keys

...

or

...

having

...

to

...

remove

...

all

...

data

...

created

...

by

...

the

...

test.

...

One

...

solution

...

is

...

to

...

always

...

create

...

business

...

objects

...

with

...

different

...

identifiers.

...

Selenium

...

provides

...

a

...

nice

...

feature

...

to

...

do

...

that:

...

you

...

can

...

define

...

variables

...

during

...

the

...

test

...

execution

...

and

...

use

...

them

...

anywhere

...

in

...

the

...

test

...

script

...

after

...

their

...

creation.

...

Here

...

an

...

example

...

based

...

on

...

one

...

of

...

my

...

test

...

(

...

http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/neogia/manufacturing/webapp/manufacturing/tests/TestCreateNomenclature.html?rev=1.6;content-type=text%2Fplain;cvsroot=neogia

...

)

Code Block


<\!-\- create a variable named uid that contains an unique identifier -->
<tr>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>store</td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>javascript
{(new Date()).getTime() % 10000}\\

</td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>uid</td>
</tr>
\\


Code Block
<\!-\- use of the variable named uid to fill a form entry -->
<tr>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>type</td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>partyId</td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       <td>user-$
{uid}\\

</td>
</tr>
\- Show quoted text -
\\

3)

...

What

...

is

...

the

...

difference

...

between

...

click

...

and

...

clickAndWait

...

?

...

I

...

would

...

like

...

to

...

understand

...

why

...

I'm

...

getting

...

different

...

behaviors

...

from

...

click

...

and

...

clickAndWait

...

functions.

...

Here

...

is

...

the

...

scenario:

...

I

...

want

...

to

...

perform

...

the

...

login

...

and

...

then

...

verify

...

some

...

text

...

on

...

the

...

page

...

(what

...

should

...

be

...

pretty

...

straight

...

forward...)

...

My

...

first

...

approach was  using the clickfunction + pause function. Something like below:

<tr>
<td>click</td>
<td>submit</td>
<td></td>
</tr>

<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>

The approach above worked fine and I was able to proceed with my test. However, I was looking the clickAndWait functionality and, per my understanding, this function should have a simlar behavior to my code above.. then I wrote the following:

<tr>
<td>clickAndWait</td>
<td>submit</td>
<td></td>
</tr>
>
The code above is getting a "Permission Denied" message. I already check the URLs and I'm not launching a different domain (before I click I have http://domain/Login/

...

and

...

after

...

the

...

submission

...

I

...

have

...

http://domain/App/

...

).

...

I

...

think

...

the

...

right

...

solution

...

is

...

to

...

use

...

clickAndWait

...

command

...

instead

...

of

...

click+pause

...

because

...

it

...

always

...

success

...

contrary

...

to

...

click+pause

...

(we

...

dont

...

known

...

the

...

page

...

response

...

time).

...

I

...

see

...

no

...

reason

...

why

...

you

...

don't

...

observe

...

the

...

same

...

behavior

...

with

...

clickAndWait.

...

Maybe

...

it's

...

because

...

your

...

are

...

testing

...

the

...

login

...

page

...

that

...

can

...

be

...

a

...

little

...

tricky

...

to

...

test

...

due

...

to

...

the

...

session

...

handling.

...

To

...

be

...

sure

...

to

...

always

...

start

...

a

...

test

...

in

...

a

...

clean

...

session,

...

my

...

tests

...

always

...

do

...

the

...

same

...

actions

...

:

...


1.

...

logoff

...


2.

...

login

...


3.

...

check

...

error

...

Here,

...

an

...

example

...

of

...

my

...

standard

...

login

...

procedure

...

under selenium  from (http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/neogia/manufacturing/webapp/manufacturing/tests/TestProcessRouting.html?rev=1.2;content-type=text%2Fplain;cvsroot=neogia

...

)

Code Block
<\!-\- Begin of standard login procedure -->
<tr>
&nbsp;<td>open< <td>open</td>
&nbsp;<td> <td>/manufacturing/control/logout</td>
&nbsp;<td>< <td></td>
</tr>
<tr>
&nbsp;<td>type< <td>type</td>
&nbsp;<td>USERNAME< <td>USERNAME</td>
&nbsp;<td>admin< <td>admin</td>
</tr>
<tr>
&nbsp;<td>type< <td>type</td>
&nbsp;<td>PASSWORD< <td>PASSWORD</td>
&nbsp;<td>ofbiz< <td>ofbiz</td>
</tr>
<tr>
&nbsp;<td>select< <td>select</td>
&nbsp;<td>locale< <td>locale</td>
&nbsp;<td>value <td>value=fr</td>
</tr>
<tr>
&nbsp;<td>clickAndWait< <td>clickAndWait</td>
&nbsp;<td>submitButton< <td>submitButton</td>
&nbsp;<td>< <td></td>
</tr>
<tr>
&nbsp;<td>assertElementNotPresent< <td>assertElementNotPresent</td>
&nbsp;<td> <td>//div\[@class='errorMessage'\]</td>
&nbsp;<td>< <td></td>
</tr>
<\!-\- End of standard login procedure -->

Advices

...

from

...

Peter

...

Goron

...