Introduction Introduce yourself Presentation about unit testing in an APEX dev project Presentation focusses on the development process during an APEX project
Various forms of testing, all with there own charicteristcs and methods. The basis and fundament of the application is tested/verified by unit tests, done by the developer (peer reviews etc.) Without this basis, the application will be build on a weak fundament. Since the above mentioned tests have another focus and purpose. Stress Test – Real Application Testing
Unit testing in a Oracle environment is tricky and therefor not done automatically . Most units are highly data dependent. Making it harder to isolate certain testcases and scenarios From the most used development tooling there is no open standard unit test method, like Java has Junit, which is available (with plugins) in most IDEs
When looking in projects I have worked with, I see many problems when unit / system testing is being done - the created tests are not repeated, once it works it is done and no pro active retesting is done in case the software is changed - Mostly the tests are performed manually, mostly because of the high data dependent, and the developer has to validate if the outcome is confirm the expected result. - The test cases that are being tested are limited, it is hard to estimate if the tests cover all behavior of the unit Unit testing must be part of the developmentprocess
Sogeti Nederland B.V.
Sogeti Nederland B.V. So why we want to atomate this part of the development process - repeatable test cases and unit tests saves time - Reporting is possible, telling about how many test cases are ran and what the code coverage is of the unittests
Sogeti Nederland B.V. SQLDevloper now has a full PL SQL unit test framework This framework was introduced in SQLDev 2.2 and expanded in 3.0 Framework consist of different components, tests are the unittests , and with suites you are able to combine testcases Libaries and lookups can be used to fulfill the pre and post conditions of the unit In the startup and teardown actions you can code the preconditions, eg. Create d=the data the test case is dependent on With validations the framework can validate the outcome of the unit test automatically
Why is this suitable to use in an APEX project - best practice is to implement complex login in PL?SQL packages on the database - We tried to avoid tight coupling with APED, see direct reference item values or collections - within SQLDev 3.0 the framework has some great new features, for example the supports custom data types and Test synchronization. which makes it more usable