...
A page is a collection of any number of those five components:
In order to separate the core implementation layer and business layer, package hierarchy is designed as below:
A testcase is constructed by two portions: the expected outcome and scripts of action. The expected outcome can be deduced by comparison of page's title, appearance of one pop up, content of an error message, etc. The latter specifies sequences of action: input a string into one text field, then tick a box, select a radio button, click a button, etc.
...
Notes
- 07/05/2012 - 11/05/2012:
- download Jenkins and get familiar with it.
- how to ask Jenkins to start one OFBIZ instance
- install the Gradle plug-in for Jenkins
- write a build.gradle file to grasp all dependencies.
- write one test case(test to pass) of log-in page
- setup project repository using Github
- Difficulties:
- Configure jenkin to start on a different port compared to that of the OFBiz
- Connect local repository and remote repository
- 14/05/2012 - 15/05/2012:
- Refine Gradle build script
- Jar the project
- Configure jenkin to start an instance of OFBiz and run the test via the jar
- Difficulties:
- decide which approach is easy to maintain and extend: go by page(one page contain many test cases) or go by case(one case cover a single scenario). The first approach requires a few huge classes. The second approach requires great pool of tiny classes, yet easy to distribute cases.
- 16/05/2012 - 17/05/2012:
- Decide to move on with the second approach which is implementing one test case as an individual file.
- Come up with first draft XML template of test case:
- Header (Title, description of test case)
- Input (describe what page is tested, what page needs to fill in before reaching the desired page, and the input for each field)
- Output (describe what is expected, with/without error, content of error message(if any), or one event(pop up of one dialog))
- Difficulties:
- So many variables to control, perhaps try to come up with one template first, then refine it time after time.
- Answer the question: It is fine if user enter test case via Java code, but how does he/she do it if go for XML approach ? Or I would tackle the Java case first, then slowly change it to XML.
- Let say if there is huge number of test cases, how to effectively manage them ? Yes, by assigning each test case/class to proper package, but still it is discrete.
- 21/05/2012 - 24/05/2012:
- Update wiki page
- Extend testing on Log-in page
- Difficulties:
- How to verify test-to-pass case: for example in log-in page, after user enter correct information, title of the next page remains unchanged. Now this case is covered by checking no error message.
- A number of element in the OFBIZ have not the ID attribute, for example, the DIV component for error message. Therefore, instead of one method call (find element by its id), a few must be executed (get a list of DIV component, check the class attribute of each, then grasp the correct element)
- 25/05/2012 - 29/05/2012:
- Separate logic layer and business layer of components
- Restructure packages
- Update wiki page
- Add 10 test cases
- 07/05/2012 - 11/05/2012:
Others
- Project source code can be checked out at : git@github.com:luvinhthinh/OFBIZ_FT.git
- How to start up an OFBiz instance with Jenkins:
- Start up the Jenkins
- Create a new free-style job, give it any name you'd like: OFBIZ_FT
- Under the Build, click 'Add Build Step', select 'Invoke Ant'
- Click 'Advance', enter Targets as 'run-install run' and Build File as "'The location you store the OFBIZ'/build.xml"
- Click Save
- Go to home page of Jenkins, you would see your new job added, click the icon at the right most of that row. This will start up the OFBIZ instance.