You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ho...@apache.org on 2020/07/14 19:23:16 UTC

[ofbiz-framework] 09/11: Documented: Framework, migration all docbook files to asciidoc (OFBIZ-11587)

This is an automated email from the ASF dual-hosted git repository.

holivier pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit b0f445b123e0df6dd71786ad945384972c43bd4d
Author: holivier <ho...@apache.org>
AuthorDate: Tue Apr 14 12:22:17 2020 +0200

    Documented: Framework, migration all docbook files to asciidoc
    (OFBIZ-11587)
    
    - common-sending-email: include in email
    - datafile: move as a include at the end of entity-engine section
    - entity-engine: list of link to OFBiz wiki about entity configuration
    - service-engine: a link to OFBiz wiki Service Engine Guide
    - webtools: help for main screen
    - mini-lang: include a link to OFBiz wiki mini-lang-reference at the
    beginning of minilang-to-groovy-manual
               move minilang-to-groovy-manual to Development environment
    section
    - unit-test: include as Junit test, and use README to list gradle
    command available (so add a tag in REAME.adoc)
    - base: add a link to OFBiz wiki Configuration Guide, in deployment
    section
    - SingleSignOn with LDAP: move to plugin LDAP and include in deployment
    section
    
    developer-manual is updated with some include lines or with directly a
    sentence.
---
 README.adoc                                        |   2 +
 docs/asciidoc/developer-manual.adoc                |  21 ++-
 .../{email.adoc => _include/email-sending.adoc}    |  11 +-
 framework/base/src/docs/asciidoc/email.adoc        |   2 +
 .../datafile/src/docs/asciidoc/datafiles.adoc      | 111 ++++++++++++++
 .../src/docs/asciidoc/entity-engine.adoc}          |  11 +-
 .../docs/asciidoc/minilang-to-groovy-manual.adoc   |   9 +-
 .../testtools/src/docs/asciidoc/SingleSignOn.adoc  | 159 +++++++++++++++++++++
 .../testtools/src/docs/asciidoc/unit-tests.adoc    | 155 ++++++++++++++++++++
 .../src/docs/asciidoc/_include/webtools-main.adoc  |  38 +++++
 10 files changed, 507 insertions(+), 12 deletions(-)

diff --git a/README.adoc b/README.adoc
index 2ed7bff..9d3d513 100644
--- a/README.adoc
+++ b/README.adoc
@@ -481,6 +481,7 @@ parameters are passed:
 [[testing-tasks]]
 === Testing tasks
 
+# tag::testingtasks[]
 [[execute-all-unit-tests]]
 ==== Execute all unit tests
 
@@ -540,6 +541,7 @@ listens on port *5005*
 
 `gradlew "ofbiz --test component=entity --test suitename=entitytests" --debug-jvm`
 
+# end::testingtasks[]
 
 
 [[miscellaneous-tasks]]
diff --git a/docs/asciidoc/developer-manual.adoc b/docs/asciidoc/developer-manual.adoc
index 3e07ab9..ef1261c 100644
--- a/docs/asciidoc/developer-manual.adoc
+++ b/docs/asciidoc/developer-manual.adoc
@@ -199,7 +199,7 @@ include::../../framework/webapp/src/docs/asciidoc/webapp.adoc[leveloffset=+1]
 
 ==== Views
 
-== Entity Engine
+include::../../framework/entity/src/docs/asciidoc/entity-engine.adoc[leveloffset=+1]
 
 === Entities
 
@@ -213,6 +213,8 @@ include::../../framework/webapp/src/docs/asciidoc/webapp.adoc[leveloffset=+1]
 
 === XML Data
 
+include::../../framework/datafile/src/docs/asciidoc/datafiles.adoc[leveloffset=+2]
+
 === Entity engine configuration
 
 === Supported databases
@@ -220,6 +222,8 @@ include::../../framework/webapp/src/docs/asciidoc/webapp.adoc[leveloffset=+1]
 include::../../applications/datamodel/DATAMODEL_CHANGES.adoc[leveloffset=+2]
 
 == Service Engine
+A description of the service engine can be found at the
+https://cwiki.apache.org/confluence/display/OFBIZ/Service+Engine+Guide[OFBiz wiki Service Engine Guide]
 
 === Declaration and Implementation
 
@@ -264,19 +268,30 @@ include::../../themes/docs/themes.adoc[leveloffset=+2]
 ==== Database
 
 === Web tools
+The Webtools application is the UI-gateway to all the framework functions.
+
+include::../../framework/webtools/src/docs/asciidoc/_include/webtools-main.adoc[leveloffset=+3]
+
+include::../../framework/minilang/src/docs/asciidoc/minilang-to-groovy-manual.adoc[leveloffset=+1]
 
 == Testing
 
-=== Unit Tests
+include::../../framework/testtools/src/docs/asciidoc/unit-tests.adoc[leveloffset=+2]
 
 === Integration Tests
 
 == Deployment
 
+For a core configuration guide check
+https://cwiki.apache.org/confluence/display/OFBIZ/Framework+Configuration+Guide[the OFBiz configuration Guide]
+ (some points are not up to date).
+
+
 include::../../framework/base/src/docs/asciidoc/email.adoc[leveloffset=+2]
 
+include::../../plugins/ldap/src/docs/asciidoc/SingleSignOn.adoc[leveloffset=+2]
+
 include::../../framework/security/src/docs/asciidoc/security.adoc[leveloffset=+1]
 
 == Appendices
 
-include::../../framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc[leveloffset=+1]
diff --git a/framework/base/src/docs/asciidoc/email.adoc b/framework/base/src/docs/asciidoc/_include/email-sending.adoc
similarity index 61%
copy from framework/base/src/docs/asciidoc/email.adoc
copy to framework/base/src/docs/asciidoc/_include/email-sending.adoc
index 6408da3..7e098fa 100644
--- a/framework/base/src/docs/asciidoc/email.adoc
+++ b/framework/base/src/docs/asciidoc/_include/email-sending.adoc
@@ -16,8 +16,13 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 ////
-= email
+= Sending Email in OFBiz
+Various parts in the OFBiz application are sending out email for various reasons.
 
-== HowTo use email in OFBiz
+Sending out email is controlled in the  ${ofbiz install dir}/framework/common/config/general.properties file with
+ the following parameters:
 
-include::_include/email-receiving.adoc[leveloffset=+2]
+* SMTP Server (relay host): mail.smtp.relay.host
+* SMTP Username (if needed): mail.smtp.auth.user
+* SMTP Password (if needed): mail.smtp.auth.password
+* Turn on email notifications by setting the mail.notifications.enabled property to "Y".
diff --git a/framework/base/src/docs/asciidoc/email.adoc b/framework/base/src/docs/asciidoc/email.adoc
index 6408da3..39fadab 100644
--- a/framework/base/src/docs/asciidoc/email.adoc
+++ b/framework/base/src/docs/asciidoc/email.adoc
@@ -21,3 +21,5 @@ under the License.
 == HowTo use email in OFBiz
 
 include::_include/email-receiving.adoc[leveloffset=+2]
+
+include::_include/email-sending.adoc[leveloffset=+2]
diff --git a/framework/datafile/src/docs/asciidoc/datafiles.adoc b/framework/datafile/src/docs/asciidoc/datafiles.adoc
new file mode 100644
index 0000000..186586f
--- /dev/null
+++ b/framework/datafile/src/docs/asciidoc/datafiles.adoc
@@ -0,0 +1,111 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= The OFBiz Datafiles
+
+== Intoduction
+There is a data import tool in OFBiz called the DataFile tool. +
+It uses XML files that describe flat file formats (including character delimited, fixed width, etc) and parses the flat files
+based on those definitions. So, by design it is somewhat like the Entity Engine.
+
+It uses a generic object to represent a row in the flat file. +
+It includes features like a line type code for each line and can support hierarchical flat files
+(ie where parent/child relationships are implied by sub-records).
+
+The code is in the ofbiz/framework/datafile directory, and there is an XSD there to describe how the data file definition XML
+file should look.
+
+The DataFile has a web page in WebTools to parse data files and generate entity xml files (that can be imported in OFBiz)
+from them, and to do in/outtesting.
+
+both the import of fixed width flat files and character delimited files are implemented.
+
+== Definitions
+* File : this is an xml file that contains one or more "Data File Definition"s;
+  ** the grammar of the file is defined in framework/datafile/dtd/datafile.xsd
+* Data file Definition : the definition of a data file structure (e.g. names/types of the fields/columns
+  in a "Data File";
+  ** the same "Data File" could have more than one "Data File Definition"s (e.g. the definitions could consider
+     different subsets of all the fields available in the data file).
+* Data file : the text file that contains all the data (a fixed width or a character delimited text file)
+
+== How to use the "Work With Data Files" screen in the Webtools application
+_Prerequisites_: a definition file (containing the fields' definition of the data file) and a data file
+(containing the data you want to parse/import) should be available in the OFBiz server.Steps:
+
+. connect to the Webtools application
+. go to the "Work With Data Files" screen
+. enter the path to the your definition file in the "Definition Filename or URL" input field
+. click on the submit button>
+. the "Data File Definition Name" input field will be changed into a drop down box containing all the definitions
+  available in the definition file
+. select the definition you want to use from the drop down box>
+. enter the path to the your data file in the "Data Filename or URL" input field
+. if you want to generate an entity xml file that can be later imported in OFBiz,  enter a path for it in the
+  "Save to entity xml file:
+. input field and click on the submit button; the file will be created +
+  (see the paragraph "Tips to create Entity Xml Files" for more details)
+
+[source]
+<field name="productId" type="String">
+            </field>
+
+== Examples
+
+=== Sample fixed width CSV file posreport.csv to be imported:
+.An example of fixed width flat file import.
+[source,csv]
+
+021196033702    ,5031BB GLITTER GLUE PENS BRIGH  ,1           ,5031BB      ,       1,     299,
+021196043121    ,BB4312 WONDERFOAM ASSORTED      ,1           ,BB4312      ,       1,     280,
+021196055025    ,9905BB  PLUMAGE MULTICOLOURED   ,1           ,9905BB      ,       4,     396,
+
+=== Sample xml definition file for importing select columns
+.Sample xml definition file for importing select columns posschema.xml:
+[source,xml]
+    <data-files xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/datafiles.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <data-file name="posreport" separator-style="fixed-length" type-code="text">
+            <record name="tillentry" limit="many">
+                <field name="tillCode" type="String" length="16" position="0"></field>
+                <field name="name" type="String" length="32" position="17"></field>
+                <field name="prodCode" type="String" length="12" position="63"></field>
+                <field name="quantity" type="String" length="8" position="76"></field>
+                <field name="totalPrice" type="String" length="8" position="85"></field>
+            </record>
+        </data-file>
+    </data-files>
+
+.Another example reading fixed record little endian binary files
+[source, xml]
+    <data-files xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/datafiles.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <data-file name="stockdata" separator-style="fixed-record" type-code="text" record-length="768">
+            <record name="stockdataitem" limit="many">
+                <field name="barcode" type="NullTerminatedString" length="12" position="0"></field>
+                <field name="prodCode" type="NullTerminatedString" length="12" position="68"></field>
+                <field name="price" type="LEInteger" length="4" position="80"></field>
+                <field name="name" type="NullTerminatedString" length="30" position="16"></field>
+            </record>
+        </data-file>
+    </data-files>
+
+=== Procedure:
+In the interface enter something like:
+
+. Definition Filename or URL: posschema.xml
+. Data File Definition Name: posreport
+. Data Filename or URL: posreport.csv
diff --git a/framework/base/src/docs/asciidoc/email.adoc b/framework/entity/src/docs/asciidoc/entity-engine.adoc
similarity index 65%
copy from framework/base/src/docs/asciidoc/email.adoc
copy to framework/entity/src/docs/asciidoc/entity-engine.adoc
index 6408da3..21f3640 100644
--- a/framework/base/src/docs/asciidoc/email.adoc
+++ b/framework/entity/src/docs/asciidoc/entity-engine.adoc
@@ -16,8 +16,13 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 ////
-= email
+= The Entity Engine.
 
-== HowTo use email in OFBiz
+== Entity Engine guide.
+https://cwiki.apache.org/confluence/display/OFBIZ/Entity+Engine+Guide[Entity engine Guide]
 
-include::_include/email-receiving.adoc[leveloffset=+2]
+== Entity Engine Configuration Guide.
+https://cwiki.apache.org/confluence/display/OFBIZ/Entity+Engine+Configuration+Guide[entity engine configuration guide]
+
+== Entity overview.
+https://cwiki.apache.org/confluence/display/OFBIZ/General+Entity+Overview[Entity overview]
\ No newline at end of file
diff --git a/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc b/framework/minilang/src/docs/asciidoc/minilang-to-groovy-manual.adoc
similarity index 98%
rename from framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc
rename to framework/minilang/src/docs/asciidoc/minilang-to-groovy-manual.adoc
index e453c3f..a029728 100644
--- a/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc
+++ b/framework/minilang/src/docs/asciidoc/minilang-to-groovy-manual.adoc
@@ -21,12 +21,15 @@ under the License.
 
 This is a small guide for everybody involved in converting the Mini Language into Groovy.
 
-NOTE: *Why is this important?* +
+IMPORTANT: *Why is this important?* +
 This tutorial is directly linked to the efforts of converting all scripts in Mini Language to newer Groovy Scripts.
 All of this is done, because Groovy is much more readable and easier to review, more up to date and many other reasons, which can be found here: https://lists.apache.org/thread.html/253b41060a295b8ab68bc78763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E[Proposal for deprecating Mini Language] +
  +
 To contribute, or just be up to date with the current process, you can look at the existing https://issues.apache.org/jira/browse/OFBIZ-9350[JIRA issue OFBIZ-9350 - Deprecate Mini Lang]
 
+[NOTE]
+For memory, a description of the Mini Language guide can be found at the https://cwiki.apache.org/confluence/display/OFBIZ/Mini+Language+-+minilang+-+simple-method+-+Reference[OFBiz wiki - Mini Language Reference]
+
 == Groovy DSL (dynamic scripting library)
 
 === How to get Groovy support in your IDE
@@ -63,7 +66,7 @@ Normal instance of the LocalDispatcher, which is used to call services and other
 type: 'org.apache.ofbiz.security.Security'*` +
 Normal instance of the Security-Interface with which permission checks are done.
 
-== Known Methods
+=== Known Methods
 `*method name: 'runService' +
 type: 'java.util.Map' +
 params: [serviceName: 'String', inputMap: 'java.util.Map']*` +
@@ -507,7 +510,7 @@ a|[source,xml]
         </condition-list>
     </condition-list>
 </entity-condition>
--- 
+--
 
 a|[source,groovy]
 --
diff --git a/framework/testtools/src/docs/asciidoc/SingleSignOn.adoc b/framework/testtools/src/docs/asciidoc/SingleSignOn.adoc
new file mode 100644
index 0000000..3fec4f6
--- /dev/null
+++ b/framework/testtools/src/docs/asciidoc/SingleSignOn.adoc
@@ -0,0 +1,159 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= OFBiz Single Sign On using CAS and LDAP
+
+== Setup the Java Key Store
+From the directory in which you want to create the keystore, run keytool with the following parameters.
+
+. Generate the server certificate.
++
+[source]
+----
+    $ keytool -genkey -alias tomcat -keyalg RSA -keypass changeit -storepass changeit -keystore keystore.jks
+----
+When you press Enter, keytool prompts you to enter the server name, organizational unit, organization, locality, state,
+and country code.
+[NOTE]
+Note that you must enter the server name in response to keytool's first prompt, in which it asks for first and
+ last names.
++
+For testing purposes, this can be localhost.
+. Export the generated server certificate in keystore.jks into the file server.cer.
++
+[source]
+----
+    $ keytool -export -alias tomcat -storepass changeit -file server.cer -keystore keystore.jks
+----
+. To create the trust-store file cacerts.jks and add the server certificate to the trust-store, run keytool from
+  the directory where you created the keystore and server certificate. Use the following parameters:
++
+[source]
+----
+    $ keytool -import -v -trustcacerts -alias tomcat -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit
+----
+. Information on the certificate, such as that shown next, will display.
++
+[source]
+----
+    $ keytool -import -v -trustcacerts -alias tomcat -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit
+
+    Owner: CN=localhost, OU=Sun Micro, O=Docs, L=Santa Clara, ST=CA, C=US
+    Issuer: CN=localhost, OU=Sun Micro, O=Docs, L=Santa Clara, ST=CA, C=US
+    Serial number: 3e932169
+    Valid from: Tue Apr 08
+    Certificate fingerprints:
+    MD5: 52:9F:49:68:ED:78:6F:39:87:F3:98:B3:6A:6B:0F:90
+    SHA1: EE:2E:2A:A6:9E:03:9A:3A:1C:17:4A:28:5E:97:20:78:3F:
+    Trust this certificate? [no]:
+----
+. Enter yes, and then press the Enter or Return key. The following information displays:
++
+[source]
+----
+    Certificate was added to keystore
+    [Saving cacerts.jks]
+----
+
+
+== CAS Server
+. Download CAS server from http://www.jasig.org/cas[the CAS web site].
+. Deploy cas-server-webapp-[version].war to Tomcat
+. Set key store file to Tomcat
++
+[source]
+----
+    keystoreFile="path/to/keystore.jks"
+----
+. Start Tomcat
+
+
+== OFBiz Certificate
+Set trust store's file to Java Virtual Machine (JVM) before start OFBiz.
+[source]
+----
+    -Djavax.net.ssl.trustStore=path/to/cacerts.jks
+----
+
+== LDAP Component
+OFBiz uses the LDAP component in the plugins to check the security in a web application. +
+OFBiz disabled LDAP component as default, you can enable this component by take the comment out from
+plugins/component-load.xml file.
+
+=== LDAP Properties
+LDAP properties file is plugins/ldap/config/ldap.xml. +
+You can change a filter condition you want.
+
+==== Attributes
+. Attribute : LDAP attbitue for filter e.g. uid=%u
+. AuthenType : LDAP authentication method e.g. simple
+. AuthenticaionHandler : CAS handler class e.g. org.apache.ofbiz.ldap.cas.OFBizCasAuthenticationHandler
+. AutoPartyId : Party's id for user login e.g. admin
+. AutoSecurityGroupId : Security group's id for user login e.g. FULLADMIN
+. BaseDN : The top level ofbiz LDAP directory tree e.g. dc=example,dc=com
+. Filter : LDAP search filter e.g. (objectclass=*)
+. Scope : LDAP search scope parameter e.g. sub,one, etc.
+. URL : LDAP server's url e.g. ldap://localhost:389
+. UserOFBizLoginWhenLDAPFail : indicate that if LDAP fail then login with normal OFBiz's user or not.
+  (true/false)
+
+==== CAS
+. CasLoginUri : URI to CAS login e.g. /login
+. CasLogoutUri : URI to CAS logout  e.g. /logout
+. CasUrl : CAS Server's URL e.g. https://localhost:8443/cas
+. CasValidateUri : URI to CAS validate e.g. /validate
+. CasLdapHandler : LDAP hanlder class e.g. org.apache.ofbiz.ldap.openldap.OFBizLdapAuthenticationHandler
+. CasTGTCookieName : CAS TGT's cookie name e.g. CASTGC
+
+
+== OpenLDAP
+The LDAP component need data from LDAP server (OpenLDAP). The server needs to install, configure and populate
+ OpenLDAP: see at http://www.openldap.org[the OpenLDAP web site].
+
+== Web Application Security Mapping
+Every web application you need to use LDAP (single sign on) feature, you need to change the event's path of
+ some the security request mappings to org.apache.ofbiz.ldap.LdapLoginWorker class.
+
+=== checkLogin
+[source, xml]
+    <request-map uri="checkLogin" edit="false">
+        <description>Verify a user is logged in.</description>
+        <security https="true" auth="false"/>
+        <event type="java" path="org.apache.ofbiz.ldap.LdapLoginWorker" invoke="checkLogin"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="login"/>
+    </request-map>
+
+=== login
+[source, xml]
+    <request-map uri="login">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.apache.ofbiz.ldap.LdapLoginWorker" invoke="login"/>
+        <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
+        <response name="error" type="view" value="login"/>
+    </request-map>
+
+=== logout
+[source, xml]
+    <request-map uri="logout">
+            <security https="true" auth="true"/>
+            <event type="java" path="org.apache.ofbiz.ldap.LdapLoginWorker" invoke="logout"/>
+            <response name="success" type="request-redirect" value="main"/>
+            <response name="error" type="view" value="main"/>
+    </request-map>
diff --git a/framework/testtools/src/docs/asciidoc/unit-tests.adoc b/framework/testtools/src/docs/asciidoc/unit-tests.adoc
new file mode 100644
index 0000000..e6faa48
--- /dev/null
+++ b/framework/testtools/src/docs/asciidoc/unit-tests.adoc
@@ -0,0 +1,155 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= Unit Test (Using JUnit)
+
+== How to define a unit test?
+
+. Define test-suite in ofbiz-component.xml like this:
++
+[source, xml]
+----
+    <test-suite loader="main" location="testdef/servicetests.xml"/>
+----
+. Create test-case in test-suite file.
++
+[source, xml]
+----
+    <test-suite suite-name="servicetests"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
+        ....
+        ....
+        <test-case case-name="test-case-name">
+        ...
+        </test-case>
+        ....
+        ....
+    </test-suite>
+----
+
+== How to create a test case?
+Define a test-case in an XML test-suite file like this:
+[source, xml]
+----
+    <test-case case-name="test-case-name">
+        ...
+    </test-case>
+----
+The test-case tag contains details of each test type:
+
+=== Entity XML
+Specific entity xml and its action would like to be tested in entity-xml-url attribute and action attribute
+respectively like this:
+[source, xml]
+----
+    <test-case case-name="service-dead-lock-retry-assert-data">
+        <entity-xml action="assert" entity-xml-url="component://service/testdef/data/ServiceDeadLockRetryAssertData.xml"/>
+    </test-case>
+----
+
+=== JUnit
+Specific class's name which will be tested, in a class-name attribute like this:
+[source, xml]
+----
+    <test-case case-name="service-tests">
+        <junit-test-suite class-name="org.apache.ofbiz.service.test.ServiceEngineTests"/>
+    </test-case>
+----
+
+=== Service
+Specific service's name which will be tested in a service-name attribute like this:
+[source, xml]
+----
+    <test-case case-name="service-lock-wait-timeout-retry-test">
+        <service-test service-name="testServiceLockWaitTimeoutRetry"/>
+    </test-case>
+----
+
+=== Simple Method
+Specific simple method's location and name which will be tested in a location and a name attribute respectively
+like this:
+[source, xml]
+----
+    <test-case case-name="auto-accounting-transaction-tests-PoReceipt">
+        <simple-method-test location="component://accounting/minilang/test/AutoAcctgTransTests.xml" name="testAcctgTransOnPoReceipts"/>
+    </test-case>
+----
+
+== How to run a unit test?
+You can run unit test by run 'gradle' with following target:
+
+include::../../../../../README.adoc[tag=testingtasks]
+
+
+== Possible error messages
+Some error messages in the log are not important and often caused by the test.
+
+=== Roll back
+Roll back error message occurred when transaction roll back data.
+This error message will be in between starting and finished test cass line like this:
+[source]
+----
+    [java] 2009-12-22 16:05:28,349 (main) [   TestRunContainer.java:238:INFO ] [JUNIT] : [test case's name] starting...
+    [java] 2009-12-22 16:05:28,355 (main) [    TransactionUtil.java:336:ERROR]
+    ....
+    ....
+    ....
+    [java] ---- exception report ----------------------------------------------------------
+    [java] [TransactionUtil.rollback]
+    [java] Exception: java.lang.Exception
+    [java] Message: Stack Trace
+    [java] ---- stack trace ---------------------------------------------------------------
+    [java] java.lang.Exception: Stack Trace
+    [java] org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:335)
+    [java] org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:317)
+    [java] org.apache.ofbiz.entity.test.EntityTestSuite.testTransactionUtilRollback(EntityTestSuite.java:437)
+    [java] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+    [java] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+    [java] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+    [java] java.lang.reflect.Method.invoke(Method.java:597)
+    [java] junit.framework.TestCase.runTest(TestCase.java:154)
+    [java] junit.framework.TestCase.runBare(TestCase.java:127)
+    [java] junit.framework.TestResult$1.protect(TestResult.java:106)
+    [java] junit.framework.TestResult.runProtected(TestResult.java:124)
+    [java] junit.framework.TestResult.run(TestResult.java:109)
+    [java] junit.framework.TestCase.run(TestCase.java:118)
+    [java] junit.framework.TestSuite.runTest(TestSuite.java:208)
+    [java] junit.framework.TestSuite.run(TestSuite.java:203)
+    [java] junit.framework.TestSuite.runTest(TestSuite.java:208)
+    [java] junit.framework.TestSuite.run(TestSuite.java:203)
+    [java] org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146)
+    [java] org.apache.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:100)
+    [java] org.apache.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
+    [java] org.apache.ofbiz.base.start.Start.startServer(Start.java:322)
+    [java] org.apache.ofbiz.base.start.Start.start(Start.java:326)
+    [java] org.apache.ofbiz.base.start.Start.main(Start.java:411)
+    [java] --------------------------------------------------------------------------------
+    [java]
+    ....
+    ....
+    ....
+    [java] 2009-12-22 16:05:28,366 (main) [    TransactionUtil.java:346:INFO ] [TransactionUtil.rollback] transaction rolled back
+    [java] 2009-12-22 16:05:28,370 (main) [   TestRunContainer.java:234:INFO ] [JUNIT] : [test case's name] finished.
+----
+
+== Test result
+After you run unit test, you can see the result of the testing. +
+If you use run-tests target, you can see test result web page by view runtime/logs/test-results/html/index.html
+file in web browser and see JUnit Test Result files for each test suite in runtime/logs/test-results directory. +
+If you use other target you only see JUnit Test Result file in runtime/logs/test-results.
diff --git a/framework/webtools/src/docs/asciidoc/_include/webtools-main.adoc b/framework/webtools/src/docs/asciidoc/_include/webtools-main.adoc
new file mode 100644
index 0000000..9dae6b5
--- /dev/null
+++ b/framework/webtools/src/docs/asciidoc/_include/webtools-main.adoc
@@ -0,0 +1,38 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= Help for Webtools Main page.
+
+This is the default screen for the Webtools application. +
+Several links are present on this page to access specific tool screens directly. +
+Using the application menu you can select the tool you need.
+
+* The link:[Logging] section is used to view and configure the OFBiz system logs.
+* The link:[Cache & Debug] section is used to monitor the OFBiz cache system status.
+           You can even set or clear some cache content or force Garbage collection with this tool.
+* The link:[Artifact Info] section is used to navigate through all OFBiz artifact files. When accessing this section
+           the complete OFBiz code base is scanned and a list of all artifacts is offered to the user to be navigated.
+           Please note that the initial scan can take a while to be completed.
+* The link:[Entity Engine] section is used to interact with the entities defined in the system.
+           You can view the entity structures, search for entity content, navigate though related entities, etc.
+* The link:[Service Engine] section is used to interact with the services defined in the system.
+           You can view all services details, monitor the jobs that are running, the active threads.
+           You can even manually run a service or schedule a periodic/delaied job execution.
+* The link:[Import/Export] section is used to transfer entity content from the OFBiz system to external systems and viceversa.
+           Various import/export systems and formats are available.
+* The link:[Configuration] section is used to set parameters for the OFBiz system.