Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Web Services Unit Test: Difference between revisions

From MoodleDocs
No edit summary
m (Protected "Web Services Unit Test": Developer Docs Migration ([Edit=Allow only administrators] (indefinite)))
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Delete simpletest web service unit tests=
{{Template:Migrated|newDocId=/docs/apis/subsystems/external/testing}}
With PHP Unit coming up to Moodle 2.3 we'll be removing the web service simpletest unit tests. The reasons are:
* these unit tests are only web service call tests. It would be good to have unit tests for : servers / web service call / external lib / core lib function.
* some unit tests are just one quick call. It seems sometimes obvious that some other use cases should have been tested.
* some unit tests create and delete user/category/grouo/course/... in the database. It seems that PHP Unit could facilitate this kind of testing, not sure though...
* some web service functions don't have unit test at all
* it's buggy: MDL-30210
 
 
= Add PHP Unit web service unit tests =
I see three kind of unit test related to one web service
# external function unit test: This is actually testing xxx_params too as each external funtion should call it. Here the questions is do we want to test xxx_returns at the same time?
# web service call test: I think this is required to properly test all servers against all call. here the question is to know if we want to reproduce all the same use case then for external function
# core lib function unit test: most of time these kind of unit test don't exist. Note: often the core lib function doesn't exist itself, the external function being a code logic duplication of multiple scripts.
 
= Web service automatic testing =
TBD

Latest revision as of 13:13, 31 December 2022

Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!