From 3bd5ccc13f2f102a47fe46966ee8c4dae8259d85 Mon Sep 17 00:00:00 2001 From: liyang Date: Tue, 9 Aug 2022 14:11:38 +0800 Subject: [PATCH] * Add switchDB by tests. --- test/model/action/create.php | 3 +- test/model/action/gettrashes.php | 12 +++-- test/model/action/gettrashobjecttypes.php | 5 +- test/model/action/hideall.php | 3 +- test/model/action/hideone.php | 3 +- test/model/action/loghistory.php | 3 +- test/model/action/read.php | 3 +- test/model/action/undelete.php | 3 +- test/model/action/updatecomment.php | 3 +- test/model/api/create.php | 7 ++- test/model/api/createstruct.php | 5 +- test/model/api/deleterelease.php | 4 +- test/model/api/getapilistbyrelease.php | 4 +- test/model/api/getlibbyid.php | 4 +- test/model/api/getlistbymoduleid.php | 7 ++- test/model/api/getrelease.php | 4 +- test/model/api/getreleaselistbyapi.php | 4 +- test/model/api/getstructbyid.php | 4 +- test/model/api/getstructlistbylibid.php | 4 +- test/model/api/getstructlistbyrelease.php | 4 +- test/model/api/publishlib.php | 5 +- test/model/api/update.php | 5 +- test/model/api/updatestruct.php | 5 +- test/model/block/getqastatisticparams.php | 5 +- test/model/block/getreleaseparams.php | 4 +- test/model/block/getscrumlistparams.php | 8 ++- test/model/block/getscrumproductparams.php | 2 +- test/model/block/getscrumroadmapparams.php | 2 +- test/model/block/getscrumtestparams.php | 2 +- test/model/block/getstatisticparams.php | 4 +- test/model/block/initblock.php | 3 +- test/model/block/save.php | 8 ++- test/model/branch/activate.php | 3 +- test/model/branch/batchupdate.php | 3 +- test/model/branch/close.php | 3 +- test/model/branch/create.php | 3 +- test/model/branch/linkbranch4project.php | 3 +- test/model/branch/mergebranch.php | 3 +- test/model/branch/sort.php | 3 +- test/model/branch/unlinkbranch4project.php | 3 +- test/model/branch/update.php | 3 +- test/model/bug/activate.php | 12 ++--- test/model/bug/assign.php | 15 +++--- test/model/bug/batchactivate.php | 3 +- test/model/bug/batchchangebranch.php | 20 +++---- test/model/bug/batchchangemodule.php | 44 +++++++-------- test/model/bug/batchchangeplan.php | 20 +++---- test/model/bug/batchconfirm.php | 6 ++- test/model/bug/batchcreate.php | 15 +++--- test/model/bug/batchresolve.php | 20 +++---- test/model/bug/batchupdate.php | 3 +- test/model/bug/checkdelayedbug.php | 8 +-- test/model/bug/checkdelayedbugs.php | 4 +- test/model/bug/close.php | 13 ++--- test/model/bug/confirm.php | 9 ++-- test/model/bug/create.php | 9 ++-- test/model/bug/createbugfromgitlabissue.php | 14 ++--- test/model/bug/extractaccountsfromlist.php | 8 ++- test/model/bug/extractaccountsfromsingle.php | 3 +- test/model/bug/formcustomedbugs.php | 12 ++--- test/model/bug/getactiveandpostponedbugs.php | 22 ++++---- test/model/bug/getactivebugs.php | 25 +++++---- test/model/bug/getallbugs.php | 18 +++---- test/model/bug/getallprojectids.php | 2 +- test/model/bug/getbuginfofromresult.php | 26 +++++---- test/model/bug/getbugquery.php | 2 +- test/model/bug/getbugs.php | 22 ++++---- test/model/bug/getbyassignedbyme.php | 18 +++---- test/model/bug/getbyassigntome.php | 18 +++---- test/model/bug/getbyassigntonull.php | 6 +-- test/model/bug/getbyid.php | 38 ++++++------- test/model/bug/getbylist.php | 23 ++++---- test/model/bug/getbylonglifebugs.php | 24 ++++----- test/model/bug/getbyneedconfirm.php | 18 +++---- test/model/bug/getbyopenedbyme.php | 18 +++---- test/model/bug/getbypostponedbugs.php | 10 ++-- test/model/bug/getbyresolvedbyme.php | 8 +-- test/model/bug/getbysonarqubeid.php | 3 +- test/model/bug/getbystatus.php | 54 +++++++++---------- test/model/bug/getcasebugs.php | 51 +++++++++--------- .../bug/getdataofbugsperactivatedcount.php | 3 +- test/model/bug/getdataofbugsperassignedto.php | 9 ++-- test/model/bug/getdataofbugsperbuild.php | 9 ++-- test/model/bug/getdataofbugsperexecution.php | 3 +- test/model/bug/getdataofbugspermodule.php | 6 +-- test/model/bug/getdataofbugsperpri.php | 3 +- test/model/bug/getdataofbugsperresolution.php | 14 +++-- test/model/bug/getdataofbugsperseverity.php | 3 +- test/model/bug/getdataofbugsperstatus.php | 7 ++- test/model/bug/getdataofbugspertype.php | 19 ++++--- test/model/bug/getdataofclosedbugsperday.php | 3 +- test/model/bug/getdataofclosedbugsperuser.php | 3 +- test/model/bug/getdataofopenedbugsperday.php | 3 +- test/model/bug/getdataofopenedbugsperuser.php | 3 +- .../model/bug/getdataofresolvedbugsperday.php | 4 +- .../bug/getdataofresolvedbugsperuser.php | 7 ++- test/model/bug/getexecutionbugs.php | 16 +++--- test/model/bug/getmodulebugs.php | 18 +++---- test/model/bug/getmoduleowner.php | 20 +++---- test/model/bug/getoverduebugs.php | 24 ++++----- test/model/bug/getplanbugs.php | 20 +++---- test/model/bug/getproductbugpairs.php | 15 +++--- test/model/bug/getproductleftbugs.php | 7 ++- test/model/bug/getproductmemberpairs.php | 16 +++--- test/model/bug/getprojectbugs.php | 15 +++--- test/model/bug/getprojects.php | 15 +++--- test/model/bug/getreleasebugs.php | 3 +- test/model/bug/getstorybugcounts.php | 15 +++--- test/model/bug/getstorybugs.php | 15 +++--- test/model/bug/gettoandcclist.php | 9 ++-- test/model/bug/getunconfirmed.php | 24 ++++----- test/model/bug/getuserbugpairs.php | 7 ++- test/model/bug/getuserbugs.php | 7 ++- test/model/bug/isclickable.php | 47 ++++++++-------- test/model/bug/linkbugtobuild.php | 14 ++--- test/model/bug/processbuildforbugs.php | 8 ++- test/model/bug/resolve.php | 21 ++++---- test/model/bug/update.php | 15 +++--- test/model/build/batchunlinkbug.php | 3 +- test/model/build/batchunlinkstory.php | 3 +- test/model/build/create.php | 3 +- test/model/build/linkbug.php | 3 +- test/model/build/linkstory.php | 3 +- test/model/build/unlinkbug.php | 3 +- test/model/build/unlinkstory.php | 3 +- test/model/build/update.php | 3 +- test/model/build/updatelinkedbug.php | 3 +- test/model/caselib/batchcreatecase.php | 3 +- test/model/caselib/create.php | 3 +- test/model/caselib/createfromimport.php | 3 +- test/model/caselib/delete.php | 3 +- test/model/caselib/savelibstate.php | 2 +- test/model/caselib/setlibmenu.php | 2 +- test/model/caselib/update.php | 3 +- test/model/ci/sendrequest.php | 2 +- test/model/ci/setmenu.php | 4 +- test/model/ci/synccompilestatus.php | 2 +- test/model/ci/syncgitlabtaskstatus.php | 4 +- test/model/ci/updatebuildstatus.php | 2 +- test/model/company/update.php | 3 +- test/model/compile/createbyjob.php | 6 ++- test/model/compile/exec.php | 6 ++- test/model/compile/getbuildurl.php | 7 ++- test/model/compile/getbyid.php | 5 +- test/model/compile/getlastresult.php | 5 +- test/model/compile/getlist.php | 5 +- test/model/compile/getlistbyjobid.php | 5 +- test/model/cron/changestatus.php | 3 +- test/model/cron/changestatusrunning.php | 3 +- test/model/cron/checkrule.php | 2 +- test/model/cron/create.php | 3 +- test/model/cron/markcronstatus.php | 3 +- test/model/cron/parsecron.php | 3 +- test/model/cron/update.php | 3 +- test/model/custom/deleteitems.php | 3 +- test/model/custom/preparesql.php | 3 +- test/model/custom/saverequiredfields.php | 3 +- test/model/custom/setconcept.php | 3 +- test/model/custom/setitem.php | 3 +- test/model/custom/seturandsr.php | 3 +- test/model/custom/updateurandsr.php | 3 +- test/model/datatable/getFieldList.php | 8 +-- test/model/datatable/getSetting.php | 8 +-- test/model/datatable/printHead.php | 7 +-- test/model/datatable/setFixedFieldWidth.php | 8 +-- test/model/dept/delete.php | 3 +- test/model/dept/managechild.php | 3 +- test/model/dept/update.php | 3 +- test/model/design/batchcreate.php | 3 +- test/model/design/create.php | 3 +- test/model/design/update.php | 3 +- test/model/dev/getAPIs.php | 4 +- test/model/dev/getFields.php | 4 +- test/model/dev/getModules.php | 6 +-- test/model/dev/getTables.php | 6 +-- test/model/doc/buildbrowseswitch.php | 0 test/model/doc/buildcollectbutton4doc.php | 0 test/model/doc/buildcreatebutton4doc.php | 0 test/model/doc/buildcrumbtitle.php | 0 test/model/doc/checkautoloadpage.php | 7 ++- test/model/doc/create.php | 3 +- test/model/doc/createapilib.php | 3 +- test/model/doc/createlib.php | 3 +- test/model/doc/extractketablecss.php | 5 +- test/model/doc/filldocsintree.php | 0 test/model/doc/getalllibgroups.php | 9 +++- test/model/doc/getalllibsbytype.php | 13 ++++- test/model/doc/getapilibs.php | 0 test/model/doc/getapimoduletree.php | 0 test/model/doc/getbyid.php | 0 test/model/doc/getbyidlist.php | 0 test/model/doc/getdocmenu.php | 0 test/model/doc/getdocs.php | 0 test/model/doc/getdocsbybrowsetype.php | 0 test/model/doc/getdoctree.php | 0 test/model/doc/getexecutionmodulepairs.php | 0 test/model/doc/getfileicon.php | 0 test/model/doc/getfilesourcepairs.php | 0 test/model/doc/getlibbyid.php | 0 test/model/doc/getlibfiles.php | 0 test/model/doc/getlibidlistbyproject.php | 2 +- test/model/doc/getlibs.php | 2 +- test/model/doc/getlibsbyobject.php | 10 +++- test/model/doc/getlimitlibs.php | 12 ++++- test/model/doc/getobjectsbydoc.php | 0 test/model/doc/getorderedobjects.php | 11 +++- test/model/doc/getpreandnextdoc.php | 19 +------ test/model/doc/getprivdocs.php | 0 test/model/doc/getprivlibsbydoc.php | 0 test/model/doc/getproductcrumb.php | 0 test/model/doc/getstatisticinfo.php | 3 +- test/model/doc/getsublibgroups.php | 7 ++- test/model/doc/gettoandcclist.php | 7 ++- test/model/doc/gettreemenu.php | 0 test/model/doc/printchildmodule.php | 0 test/model/doc/savedraft.php | 3 +- test/model/doc/select.php | 0 test/model/doc/setfastmenu.php | 0 test/model/doc/setlibusers.php | 0 test/model/doc/setmenubytype.php | 0 test/model/doc/statlibcounts.php | 0 test/model/doc/summary.php | 0 test/model/doc/update.php | 3 +- test/model/doc/updateapilib.php | 3 +- test/model/doc/updatelib.php | 3 +- test/model/entry/create.php | 3 +- test/model/entry/getbycode.php | 3 +- test/model/entry/getbyid.php | 3 +- test/model/entry/getbykey.php | 3 +- test/model/entry/getlist.php | 3 +- test/model/entry/getlogs.php | 3 +- test/model/entry/savelog.php | 3 +- test/model/entry/update.php | 3 +- test/model/entry/updatecalltime.php | 3 +- test/model/execution/activate.php | 3 +- test/model/execution/addprojectmembers.php | 3 +- test/model/execution/batchupdate.php | 3 +- test/model/execution/changeproject.php | 3 +- test/model/execution/close.php | 3 +- test/model/execution/create.php | 3 +- test/model/execution/importbug.php | 3 +- test/model/execution/importtask.php | 3 +- test/model/execution/linkcases.php | 3 +- test/model/execution/linkstory.php | 3 +- test/model/execution/putoff.php | 3 +- test/model/execution/start.php | 3 +- test/model/execution/suspend.php | 3 +- test/model/execution/unlinkcases.php | 3 +- test/model/execution/unlinkmember.php | 3 +- test/model/execution/unlinkstory.php | 3 +- test/model/execution/update.php | 3 +- test/model/execution/updatechilds.php | 3 +- test/model/execution/updateproducts.php | 3 +- test/model/extension/checkdownloadpath.php | 5 +- test/model/extension/getinfofromdb.php | 7 ++- test/model/extension/getlocalextensions.php | 7 ++- test/model/extension/getmodulesbyapi.php | 6 ++- test/model/file/updateobjectid.php | 3 +- test/model/git/convertlog.php | 4 +- test/model/git/getrepologs.php | 7 ++- test/model/git/getrepos.php | 4 +- test/model/git/getrepotags.php | 7 ++- test/model/git/setrepo.php | 7 +-- test/model/git/setrepos.php | 5 +- test/model/git/updatecommit.php | 6 +-- test/model/gitlab/apicreatebranch.php | 12 ++--- test/model/gitlab/apicreatebranchpriv.php | 13 +++-- test/model/gitlab/apicreatetagpriv.php | 12 ++--- test/model/gitlab/apideletebranchpriv.php | 8 +-- test/model/gitlab/apideletetag.php | 12 ++--- test/model/gitlab/apideletetagpriv.php | 8 +-- test/model/gitlab/apigetbranches.php | 10 ++-- test/model/gitlab/apigetbranchprivs.php | 10 ++-- test/model/gitlab/apigetcurrentuser.php | 8 ++- test/model/gitlab/apigetgroupmembers.php | 8 ++- test/model/gitlab/apigetgroups.php | 8 ++- test/model/gitlab/apigetsinglebranchpriv.php | 8 +-- test/model/gitlab/apigettagprivs.php | 12 ++--- test/model/gitlab/apigettags.php | 16 +++--- test/model/gitlab/checkaccesslevel.php | 8 +-- test/model/gitlab/checktokenaccess.php | 8 ++- test/model/gitlab/checkuseraccess.php | 11 +++- test/model/gitlab/createbranch.php | 10 ++-- test/model/gitlab/createbranchpriv.php | 12 ++--- test/model/gitlab/createtag.php | 10 ++-- test/model/gitlab/createtagpriv.php | 10 ++-- test/model/gitlab/getgitlablistbyaccount.php | 6 ++- test/model/gitlab/getversion.php | 6 +-- test/model/group/checkmenumodule.php | 6 +-- test/model/group/copy.php | 6 +-- test/model/group/copypriv.php | 2 +- test/model/group/copyuser.php | 3 +- test/model/group/create.php | 3 +- test/model/group/delete.php | 5 +- test/model/group/getaccessprogramgroup.php | 2 +- test/model/group/getbyaccount.php | 10 ++-- test/model/group/getbyaccounts.php | 2 +- test/model/group/getbyid.php | 3 +- test/model/group/getgroupaccounts.php | 8 +-- test/model/group/getlist.php | 2 +- test/model/group/getmenumodules.php | 10 ++-- test/model/group/getpairs.php | 2 +- test/model/group/getprivs.php | 4 +- test/model/group/getuserpairs.php | 3 +- test/model/group/getuserprograms.php | 8 +-- test/model/group/update.php | 6 ++- test/model/group/updateprivbygroup.php | 2 + test/model/group/updateprivbymodule.php | 2 + test/model/group/updateprojectadmin.php | 2 + test/model/group/updateuser.php | 2 + test/model/group/updateview.php | 6 ++- test/model/holiday/create.php | 10 +++- test/model/holiday/getactualworkingdays.php | 10 +++- test/model/holiday/getbyid.php | 7 ++- test/model/holiday/getdaysbetween.php | 8 ++- test/model/holiday/getyearpairs.php | 4 +- test/model/holiday/isholiday.php | 7 ++- test/model/holiday/update.php | 11 +++- .../holiday/updateprogramplanduration.php | 4 +- .../holiday/updateprojectrealduration.php | 4 +- test/model/jenkins/create.php | 9 ++-- test/model/jenkins/getbyid.php | 7 ++- test/model/jenkins/getlist.php | 5 +- test/model/jenkins/getpairs.php | 5 +- test/model/jenkins/gettasks.php | 7 +-- test/model/jenkins/update.php | 9 ++-- test/model/job/create.php | 3 +- test/model/job/exec.php | 3 +- test/model/job/getbyid.php | 3 +- test/model/job/getjobbysonarqubeproject.php | 3 +- test/model/job/getlasttagbyrepo.php | 3 +- test/model/job/getlist.php | 3 +- test/model/job/getlistbyrepoid.php | 3 +- test/model/job/getlistbytriggertype.php | 3 +- test/model/job/getparis.php | 3 +- test/model/job/getsonarqubebyrepo.php | 3 +- test/model/job/gettriggerconfig.php | 3 +- test/model/job/gettriggergroup.php | 3 +- test/model/job/update.php | 3 +- test/model/kanban/activatecard.php | 3 +- test/model/kanban/addkanbancell.php | 3 +- test/model/kanban/archivecard.php | 3 +- test/model/kanban/archivecolumn.php | 3 +- test/model/kanban/batchcreatecard.php | 3 +- test/model/kanban/create.php | 3 +- test/model/kanban/createcard.php | 3 +- test/model/kanban/createcolumn.php | 3 +- test/model/kanban/createdefaultcolumns.php | 3 +- test/model/kanban/createdefaultlane.php | 3 +- test/model/kanban/createdefaultregion.php | 3 +- test/model/kanban/createexecutioncolumns.php | 3 +- test/model/kanban/createexecutionlane.php | 3 +- test/model/kanban/creategroup.php | 3 +- test/model/kanban/createlane.php | 3 +- test/model/kanban/createrdcolumn.php | 3 +- test/model/kanban/createrdkanban.php | 3 +- test/model/kanban/createrdlane.php | 3 +- test/model/kanban/createrdregion.php | 3 +- test/model/kanban/createregion.php | 3 +- test/model/kanban/getexecutionkanban.php | 3 +- test/model/kanban/getimportedcards.php | 4 +- test/model/kanban/getkanban4group.php | 3 +- test/model/kanban/getlanes4group.php | 3 +- test/model/kanban/gettoandcclist.php | 2 +- test/model/kanban/import.php | 3 +- test/model/kanban/importcard.php | 3 +- test/model/kanban/importobject.php | 3 +- test/model/kanban/movecard.php | 3 +- test/model/kanban/processcards.php | 3 +- test/model/kanban/refreshcards.php | 3 +- test/model/kanban/removekanbancell.php | 3 +- test/model/kanban/setcolumnwidth.php | 3 +- test/model/kanban/setlane.php | 3 +- test/model/kanban/setlaneheight.php | 3 +- test/model/kanban/setwip.php | 3 +- test/model/kanban/splitcolumn.php | 3 +- test/model/kanban/update.php | 3 +- test/model/kanban/updatecard.php | 3 +- test/model/kanban/updatespace.php | 3 +- test/model/mail/addqueue.php | 7 ++- test/model/mail/autodetect.php | 8 ++- test/model/mail/getconfigbydetectingsmtp.php | 7 ++- test/model/mail/getconfigbymxrr.php | 5 +- test/model/mail/getconfigfromprovider.php | 5 +- test/model/mail/getqueue.php | 7 ++- test/model/mail/getqueuebyid.php | 6 ++- test/model/mail/getsubject.php | 8 ++- test/model/mail/mailexist.php | 4 +- test/model/mail/mergemails.php | 5 +- test/model/mail/send.php | 4 +- test/model/mail/sendmail.php | 4 +- test/model/mail/setbody.php | 4 +- test/model/mail/setmta.php | 5 +- test/model/mail/setsubject.php | 4 +- test/model/message/getmessages.php | 5 +- test/model/message/getnoticetodos.php | 4 +- test/model/message/getobjectactions.php | 14 ++++- test/model/message/getobjecttypes.php | 14 ++++- test/model/message/gettolist.php | 9 +++- test/model/message/savenotice.php | 7 ++- test/model/message/send.php | 5 +- test/model/mr/apicreate.php | 8 +-- test/model/mr/apigetsameopened.php | 24 ++++----- test/model/mr/checksameopened.php | 24 ++++----- test/model/mr/convertapierror.php | 4 +- test/model/mr/create.php | 0 test/model/mr/getallgitlabprojects.php | 0 test/model/mr/getdiffs.php | 4 +- test/model/mr/getlastreviewinfo.php | 4 +- test/model/mr/getlist.php | 0 test/model/mr/getreview.php | 6 +-- test/model/mr/savebug.php | 6 +-- test/model/mr/savetask.php | 2 +- test/model/mr/update.php | 4 +- test/model/my/getassignedbyme.php | 3 +- test/model/pipeline/create.php | 8 ++- test/model/pipeline/delete.php | 5 +- test/model/pipeline/getbyid.php | 4 +- test/model/pipeline/getlist.php | 6 ++- test/model/pipeline/getpairs.php | 6 ++- test/model/pipeline/update.php | 7 ++- test/model/product/batchupdate.php | 3 +- test/model/product/checkpriv.php | 3 +- test/model/product/close.php | 3 +- test/model/product/create.php | 3 +- test/model/product/manageline.php | 3 +- test/model/product/processroadmap.php | 4 +- test/model/product/update.php | 3 +- test/model/product/updateprojects.php | 3 +- test/model/productplan/batchchangestatus.php | 5 +- test/model/productplan/batchupdate.php | 5 +- test/model/productplan/create.php | 5 +- test/model/productplan/getlist.php | 2 +- test/model/productplan/linkbug.php | 5 +- test/model/productplan/linkstory.php | 5 +- test/model/productplan/update.php | 5 +- test/model/productplan/updateparentstatus.php | 5 +- test/model/productplan/updatestatus.php | 5 +- test/model/program/computeprogress.php | 8 ++- test/model/program/create.php | 3 +- test/model/program/createstakeholder.php | 6 ++- test/model/program/getbudgetleft.php | 5 +- test/model/program/getbudgetunitlist.php | 2 +- test/model/program/getbyid.php | 4 +- test/model/program/getchildren.php | 4 +- test/model/program/getinvolvedprograms.php | 8 +-- test/model/program/getkanbangroup.php | 6 ++- test/model/program/getlist.php | 18 +++---- test/model/program/getpairs.php | 6 +-- test/model/program/getpairsbylist.php | 2 +- test/model/program/getparentpairs.php | 6 ++- test/model/program/getparentpm.php | 6 ++- test/model/program/getproductpairs.php | 10 ++-- test/model/program/getprogresslist.php | 6 +-- test/model/program/getprojectlist.php | 10 +++- test/model/program/getprojectstats.php | 13 ++--- test/model/program/getstakeholders.php | 10 ++-- .../program/getstakeholdersbyprograms.php | 6 +-- test/model/program/getteammemberpairs.php | 8 +-- test/model/program/gettopbyid.php | 4 +- test/model/program/gettoppairs.php | 7 +-- test/model/program/gettoppath.php | 5 +- test/model/program/gettreemenu.php | 4 +- test/model/program/hasunfinished.php | 5 +- test/model/program/isclickable.php | 9 +++- test/model/program/settreepath.php | 5 +- test/model/program/update.php | 11 ++-- test/model/programplan/create.php | 3 +- test/model/programplan/update.php | 3 +- test/model/project/activate.php | 6 +-- test/model/project/batchupdate.php | 7 ++- test/model/project/buildmenuquery.php | 5 +- test/model/project/checkcanchangemodel.php | 5 +- test/model/project/checkhaschildren.php | 2 +- test/model/project/close.php | 8 +-- test/model/project/computerprogress.php | 6 ++- test/model/project/create.php | 9 ++-- test/model/project/getbranchesbyproject.php | 6 ++- .../model/project/getbranchgroupbyproject.php | 6 ++- test/model/project/getbrotherprojects.php | 4 +- test/model/project/getbudgetunitlist.php | 4 +- test/model/project/getbyid.php | 2 +- test/model/project/getbyidlist.php | 2 +- test/model/project/getinfolist.php | 12 ++--- test/model/project/getmembers2import.php | 5 +- test/model/project/getmultilinkedproducts.php | 6 ++- test/model/project/getoverviewlist.php | 12 ++--- test/model/project/getpairsbyidlist.php | 6 +-- test/model/project/getpairsbymodel.php | 6 ++- test/model/project/getpairsbyprogram.php | 8 ++- test/model/project/getparentprogram.php | 5 +- test/model/project/getprojectsconsumed.php | 6 ++- test/model/project/getstatdata.php | 6 +-- test/model/project/getstats.php | 14 ++--- test/model/project/getstats4kanban.php | 7 ++- test/model/project/getstoriesbyproject.php | 5 +- test/model/project/getswitcher.php | 4 +- test/model/project/getteammemberpairs.php | 5 +- test/model/project/getteammembers.php | 4 +- test/model/project/gettotalbugbyproject.php | 4 +- .../project/gettotalstoriesbyproject.php | 5 +- test/model/project/gettotaltaskbyproject.php | 6 ++- test/model/project/gettreemenu.php | 4 +- test/model/project/getworkhour.php | 6 +-- test/model/project/isclickable.php | 2 +- test/model/project/managemembers.php | 6 ++- test/model/project/putoff.php | 5 +- test/model/project/savestate.php | 4 +- test/model/project/start.php | 8 ++- test/model/project/suspend.php | 6 ++- test/model/project/unlinkmember.php | 7 ++- test/model/project/update.php | 16 +++--- test/model/project/updateproductprogram.php | 9 +++- test/model/project/updateproducts.php | 7 ++- test/model/projectrelease/linkbug.php | 3 +- test/model/projectrelease/linkstory.php | 3 +- test/model/projectrelease/unlinkstory.php | 3 +- test/model/projectrelease/update.php | 3 +- .../projectstory/getexecutionstories.php | 2 +- test/model/release/batchunlinkbug.php | 3 +- test/model/release/batchunlinkstory.php | 3 +- test/model/release/create.php | 3 +- test/model/release/linkbug.php | 3 +- test/model/release/linkstory.php | 3 +- test/model/release/unlinkbug.php | 3 +- test/model/release/unlinkstory.php | 3 +- test/model/release/update.php | 3 +- test/model/repo/getcommits.php | 2 +- test/model/repo/getrepobyurl.php | 8 +-- test/model/score/create.php | 10 +++- test/model/score/fixkey.php | 7 ++- test/model/score/getlistbyaccount.php | 7 ++- test/model/score/reset.php | 4 +- test/model/search/buildindexquery.php | 7 ++- test/model/search/decode.php | 4 +- test/model/search/deletequery.php | 6 ++- test/model/search/getbyid.php | 9 +++- test/model/search/getlist.php | 21 +++++++- test/model/search/getquery.php | 9 +++- test/model/search/getquerypairs.php | 10 +++- test/model/search/getsummary.php | 6 ++- test/model/search/markkeywords.php | 4 +- test/model/search/savedict.php | 5 +- test/model/search/saveindex.php | 5 +- test/model/setting/createdao.php | 3 +- test/model/setting/deleteitems.php | 3 +- test/model/setting/getitem.php | 4 +- test/model/setting/getitems.php | 2 +- test/model/setting/parseitemparam.php | 2 +- test/model/setting/setitem.php | 3 +- test/model/setting/setitems.php | 3 +- test/model/setting/setsn.php | 3 +- test/model/setting/updateversion.php | 3 +- test/model/sonarqube/apicreateproject.php | 8 +-- test/model/sonarqube/apideleteproject.php | 8 +-- test/model/sonarqube/apigetissues.php | 6 +-- test/model/sonarqube/apigetprojects.php | 8 +-- test/model/sonarqube/apigetqualitygate.php | 6 ++- test/model/sonarqube/apigetreport.php | 7 ++- test/model/sonarqube/apivalidate.php | 6 +-- test/model/sonarqube/createproject.php | 9 ++-- test/model/sonarqube/getapibase.php | 2 +- test/model/sonarqube/getcachefile.php | 4 +- test/model/sonarqube/getlinkedproducts.php | 5 +- test/model/sso/createuser.php | 7 +-- test/model/sso/getbinduser.php | 4 +- test/model/sso/getbindusers.php | 2 +- test/model/stage/batchcreate.php | 3 +- test/model/stage/create.php | 3 +- test/model/stage/update.php | 3 +- test/model/stakeholder/batchcreate.php | 3 +- test/model/stakeholder/communicate.php | 3 +- test/model/stakeholder/create.php | 3 +- test/model/stakeholder/edit.php | 3 +- test/model/story/activate.php | 2 +- test/model/story/assign.php | 3 +- test/model/story/batchassignto.php | 3 +- test/model/story/batchchangebranch.php | 3 +- test/model/story/batchchangemodule.php | 3 +- test/model/story/batchchangeplan.php | 3 +- test/model/story/batchchangestage.php | 3 +- test/model/story/batchclose.php | 3 +- test/model/story/batchcreate.php | 3 +- test/model/story/batchgetstorystage.php | 0 test/model/story/batchreview.php | 3 +- test/model/story/batchtotask.php | 3 +- test/model/story/batchupdate.php | 3 +- test/model/story/change.php | 3 +- test/model/story/checkneedconfirm.php | 0 test/model/story/close.php | 3 +- test/model/story/computeestimate.php | 0 test/model/story/create.php | 3 +- .../story/createstoryfromgitlabissue.php | 3 +- test/model/story/extractaccountsfromlist.php | 7 ++- .../model/story/extractaccountsfromsingle.php | 7 ++- test/model/story/formatstories.php | 11 +++- test/model/story/get2beclosed.php | 0 test/model/story/getaffectedscope.php | 0 test/model/story/getallstorysort.php | 0 test/model/story/getbyassignedbyme.php | 2 +- test/model/story/getbyfield.php | 0 test/model/story/getbyid.php | 0 test/model/story/getbylist.php | 0 test/model/story/getbysearch.php | 0 test/model/story/getbysql.php | 0 test/model/story/getchangedstories.php | 5 +- .../story/getdataofstorysperassignedto.php | 5 +- test/model/story/getdataofstorysperchange.php | 6 ++- .../story/getdataofstorysperclosedreason.php | 7 ++- .../story/getdataofstorysperestimate.php | 6 ++- test/model/story/getdataofstoryspermodule.php | 5 +- .../story/getdataofstorysperopenedby.php | 5 +- test/model/story/getdataofstorysperplan.php | 6 ++- test/model/story/getdataofstorysperpri.php | 6 ++- .../model/story/getdataofstorysperproduct.php | 5 +- test/model/story/getdataofstoryspersource.php | 6 ++- test/model/story/getdataofstorysperstage.php | 7 ++- test/model/story/getdataofstorysperstatus.php | 7 ++- test/model/story/getestimateinfo.php | 2 +- test/model/story/getestimaterounds.php | 0 test/model/story/getexecutionstories.php | 0 test/model/story/getexecutionstorypairs.php | 0 test/model/story/getidlistwithtask.php | 7 ++- test/model/story/getkanbangroupdata.php | 7 ++- test/model/story/getparentstorypairs.php | 2 +- test/model/story/getplanstories.php | 6 ++- test/model/story/getproductstories.php | 0 test/model/story/getproductstorypairs.php | 0 test/model/story/getrequierements.php | 0 test/model/story/getreviewerpairs.php | 0 test/model/story/getstories2link.php | 0 test/model/story/getstoriesbyplanidlist.php | 8 ++- test/model/story/getstoryrelation.php | 7 ++- test/model/story/getstoryrelationcounts.php | 0 test/model/story/getstoryspecs.php | 0 test/model/story/getteammembers.php | 7 ++- test/model/story/getteststories.php | 0 test/model/story/gettoandcclist.php | 9 +++- test/model/story/gettrackbyid.php | 7 ++- test/model/story/gettracks.php | 10 +++- test/model/story/getuserstories.php | 11 +++- test/model/story/getuserstorypairs.php | 7 ++- test/model/story/getversion.php | 0 test/model/story/getversions.php | 0 test/model/story/getzerocase.php | 8 ++- test/model/story/isclickable.php | 10 +++- test/model/story/linkstories.php | 7 ++- test/model/story/linkstory.php | 9 +++- test/model/story/mergechartoption.php | 0 test/model/story/mergereviewer.php | 9 +++- test/model/story/printassignedhtml.php | 0 test/model/story/recall.php | 2 +- test/model/story/review.php | 3 +- test/model/story/saveestimateinfo.php | 0 test/model/story/setstage.php | 3 +- test/model/story/setstatusbyreviewrules.php | 7 ++- test/model/story/sortstoriesofplan.php | 13 +++-- test/model/story/subdivide.php | 3 +- test/model/story/unlinkstory.php | 5 +- test/model/story/update.php | 3 +- test/model/story/updatestoryorderofplan.php | 3 +- test/model/story/updatestoryproduct.php | 3 +- test/model/story/updatestoryversion.php | 0 test/model/task/activate.php | 3 +- test/model/task/addtaskestimate.php | 5 +- test/model/task/assign.php | 3 +- test/model/task/batchchangemodule.php | 3 +- test/model/task/batchcreate.php | 3 +- test/model/task/batchupdate.php | 3 +- test/model/task/cancel.php | 3 +- test/model/task/closed.php | 3 +- test/model/task/computebeginandend.php | 5 +- test/model/task/computehours4multiple.php | 6 +-- test/model/task/computeworkinghours.php | 5 +- test/model/task/create.php | 3 +- test/model/task/createtaskfromgitlabissue.php | 7 +-- test/model/task/deleteestimate.php | 3 +- test/model/task/finish.php | 3 +- test/model/task/getbyid.php | 2 +- test/model/task/getbylist.php | 2 +- .../task/getdataoffinishedtasksperday.php | 3 +- .../task/getdataoftasksperassignedto.php | 3 +- .../task/getdataoftasksperclosedreason.php | 3 +- test/model/task/getdataoftasksperconsumed.php | 3 +- test/model/task/getdataoftasksperdeadline.php | 18 +++---- test/model/task/getdataoftasksperestimate.php | 3 +- .../model/task/getdataoftasksperexecution.php | 3 +- .../task/getdataoftasksperfinishedby.php | 3 +- test/model/task/getdataoftasksperleft.php | 3 +- test/model/task/getdataoftaskspermodule.php | 6 +-- test/model/task/getdataoftasksperpri.php | 3 +- test/model/task/getdataoftasksperstatus.php | 3 +- test/model/task/getdataoftaskspertype.php | 10 ++-- test/model/task/getestimatebyid.php | 2 +- test/model/task/getexecutiontaskpairs.php | 2 +- test/model/task/getexecutiontasks.php | 2 +- test/model/task/getfinishedusers.php | 2 +- test/model/task/getmemberpairs.php | 10 ++-- test/model/task/getnextuser.php | 3 +- test/model/task/getparenttaskpairs.php | 6 +-- test/model/task/getprojectid.php | 2 +- test/model/task/getstorycomments.php | 4 +- test/model/task/getstorytaskcounts.php | 2 +- test/model/task/getstorytasks.php | 2 +- test/model/task/gettaskestimate.php | 2 +- test/model/task/gettasksbymodule.php | 2 +- test/model/task/gettoandcclist.php | 7 ++- test/model/task/getusersuspendedtasks.php | 2 +- test/model/task/getusertaskpairs.php | 2 +- test/model/task/getusertasks.php | 3 +- test/model/task/isclickable.php | 37 ++++++------- test/model/task/needupdatebugstatus.php | 6 +-- test/model/task/pause.php | 3 +- test/model/task/processdata4report.php | 44 ++++++++------- test/model/task/processtask.php | 15 +++--- test/model/task/processtasks.php | 14 ++--- test/model/task/recordestimate.php | 3 +- test/model/task/start.php | 3 +- test/model/task/update.php | 3 +- test/model/task/updateestimate.php | 3 +- test/model/task/updateparentstatus.php | 20 +++---- test/model/testcase/batchcasetypechange.php | 3 +- test/model/testcase/batchchangebranch.php | 3 +- test/model/testcase/batchchangemodule.php | 3 +- test/model/testcase/batchcreate.php | 3 +- test/model/testcase/batchreview.php | 3 +- test/model/testcase/batchupdate.php | 3 +- test/model/testcase/create.php | 3 +- test/model/testcase/createfromimport.php | 3 +- test/model/testcase/importfromlib.php | 3 +- test/model/testcase/review.php | 3 +- test/model/testcase/synccase2project.php | 3 +- test/model/testcase/update.php | 3 +- test/model/testcase/updatecase2project.php | 3 +- test/model/testreport/create.php | 3 +- test/model/testreport/update.php | 3 +- test/model/testsuite/create.php | 3 +- test/model/testsuite/delete.php | 3 +- test/model/testsuite/linkcase.php | 3 +- test/model/testsuite/update.php | 3 +- test/model/testtask/activate.php | 2 + test/model/testtask/batchrun.php | 2 + test/model/testtask/block.php | 2 + test/model/testtask/close.php | 2 + test/model/testtask/create.php | 7 ++- test/model/testtask/createresult.php | 2 + test/model/testtask/getalllinkablecases.php | 7 ++- test/model/testtask/getbuginfo.php | 9 +++- test/model/testtask/getbyid.php | 7 ++- test/model/testtask/getbylist.php | 5 +- test/model/testtask/getbyuser.php | 11 +++- .../testtask/getdataoftesttaskpermodule.php | 6 ++- .../testtask/getdataoftesttaskperrunner.php | 6 ++- .../getdataoftesttaskperrunresult.php | 8 ++- .../testtask/getdataoftesttaskpertype.php | 12 ++++- test/model/testtask/getexecutiontasks.php | 8 ++- test/model/testtask/getlinkablecasesbybug.php | 5 +- .../testtask/getlinkablecasesbystory.php | 5 +- .../testtask/getlinkablecasesbysuite.php | 7 ++- .../testtask/getlinkablecasesbytesttask.php | 9 +++- test/model/testtask/getpairs.php | 4 +- test/model/testtask/getproducttasks.php | 8 ++- test/model/testtask/getproductunittasks.php | 4 +- test/model/testtask/getprojecttasks.php | 8 ++- test/model/testtask/getrelatedtesttasks.php | 8 ++- test/model/testtask/getresults.php | 2 + test/model/testtask/getrunbyid.php | 2 + test/model/testtask/getruns.php | 2 + test/model/testtask/gettaskcases.php | 2 + test/model/testtask/gettoandcclist.php | 2 + test/model/testtask/getuserruns.php | 2 + test/model/testtask/getusertesttaskpairs.php | 2 + test/model/testtask/importunitresult.php | 2 + test/model/testtask/linkcase.php | 2 + test/model/testtask/mergechartoption.php | 2 + test/model/testtask/parsecppxmlresult.php | 2 + test/model/testtask/parsexmlresult.php | 2 + test/model/testtask/parseztffuncresult.php | 2 + test/model/testtask/parseztfunitresult.php | 2 + test/model/testtask/printcell.php | 2 + test/model/testtask/processautoresult.php | 2 + test/model/testtask/start.php | 2 + test/model/testtask/update.php | 2 + test/model/todo/activate.php | 8 +-- test/model/todo/assignto.php | 3 +- test/model/todo/batchcreate.php | 5 +- test/model/todo/batchupdate.php | 7 +-- test/model/todo/close.php | 7 +-- test/model/todo/create.php | 11 ++-- test/model/todo/createbycycle.php | 3 +- test/model/todo/finish.php | 7 +-- test/model/todo/getbyid.php | 10 ++-- test/model/todo/getbylist.php | 6 +-- test/model/todo/getcount.php | 10 ++-- test/model/todo/getlist.php | 44 +++++++-------- test/model/todo/start.php | 7 +-- test/model/todo/update.php | 8 +-- test/model/tree/changeroot.php | 3 +- test/model/tree/delete.php | 3 +- test/model/tree/fixmodulepath.php | 3 +- test/model/tree/managechild.php | 3 +- test/model/tree/update.php | 3 +- test/model/tree/updateorder.php | 3 +- test/model/tutorial/checknovice.php | 6 ++- test/model/tutorial/getexecution.php | 6 ++- test/model/tutorial/getexecutionpairs.php | 4 +- test/model/tutorial/getexecutionproducts.php | 6 ++- test/model/tutorial/getexecutionstories.php | 4 +- .../model/tutorial/getexecutionstorypairs.php | 4 +- test/model/tutorial/getmodulepairs.php | 4 +- test/model/tutorial/getproduct.php | 5 +- test/model/tutorial/getproductpairs.php | 4 +- test/model/tutorial/getproductstats.php | 5 +- test/model/tutorial/getproject.php | 4 +- test/model/tutorial/getprojectpairs.php | 4 +- test/model/tutorial/getprojectstats.php | 6 ++- test/model/tutorial/getstories.php | 5 +- test/model/tutorial/getteammembers.php | 4 +- test/model/tutorial/getteammemberspairs.php | 4 +- test/model/tutorial/gettutorialed.php | 4 +- test/model/tutorial/getuserpairs.php | 4 +- test/model/user/authorize.php | 6 +-- test/model/user/batchcreate.php | 3 +- test/model/user/batchedit.php | 3 +- test/model/user/checkpassword.php | 3 +- test/model/user/checkproductpriv.php | 8 ++- test/model/user/checkprogrampriv.php | 8 ++- test/model/user/checkprojectpriv.php | 8 ++- test/model/user/checksprintpriv.php | 8 ++- .../user/computepasswordstrengthtest.php | 2 +- test/model/user/computeuserview.php | 10 ++-- test/model/user/create.php | 3 +- test/model/user/createcontactlist.php | 3 +- test/model/user/deletecontactlist.php | 3 +- test/model/user/getavatarpairs.php | 2 +- test/model/user/getbyid.php | 2 +- test/model/user/getbyquery.php | 2 +- test/model/user/getcancreatestoryusers.php | 2 +- test/model/user/getcommiters.php | 2 +- test/model/user/getcontactlistbyid.php | 2 +- test/model/user/getcontactlists.php | 2 +- test/model/user/getcontactuserpairs.php | 2 +- test/model/user/getdatainjson.php | 2 +- test/model/user/getgroups.php | 2 +- test/model/user/getgroupsbyvisions.php | 2 +- test/model/user/getlist.php | 2 +- test/model/user/getlistbyaccount.php | 2 +- test/model/user/getlistbyaccounts.php | 2 +- test/model/user/getobjects.php | 2 +- test/model/user/getpairs.php | 2 +- test/model/user/getparentstageauthedusers.php | 2 +- test/model/user/getpersonaldata.php | 6 ++- test/model/user/getproductmembers.php | 3 +- test/model/user/getproductviewlistusers.php | 7 ++- test/model/user/getprogramauthedusers.php | 7 ++- test/model/user/getprojectauthedusers.php | 6 ++- test/model/user/getrealnameandemails.php | 2 +- test/model/user/getteammemberpairs.php | 6 ++- test/model/user/getuserdetailsforapi.php | 6 ++- test/model/user/getuserdisplayinfos.php | 2 +- test/model/user/getuserroles.php | 2 +- test/model/user/getusertemplates.php | 4 +- test/model/user/getvisionlist.php | 5 +- test/model/user/getweakusers.php | 2 +- test/model/user/grantuserviewtest.php | 8 ++- test/model/user/identify.php | 2 +- test/model/user/login.php | 2 +- test/model/user/resetpassword.php | 3 +- test/model/user/saveusertemplate.php | 11 +++- test/model/user/update.php | 3 +- test/model/user/updatecontactList.php | 3 +- test/model/user/updatepassword.php | 3 +- test/model/user/updateprogramview.php | 5 +- test/model/webhook/bind.php | 3 +- test/model/webhook/builddata.php | 5 +- test/model/webhook/create.php | 3 +- test/model/webhook/getlist.php | 4 +- test/model/weekly/getpagenav.php | 2 +- test/model/weekly/getpv.php.bak | 32 +++++++++++ test/model/weekly/save.php | 3 +- test/model/weekly/save.php.bak | 37 +++++++++++++ 881 files changed, 3058 insertions(+), 1826 deletions(-) mode change 100644 => 100755 test/model/action/gettrashobjecttypes.php mode change 100644 => 100755 test/model/api/create.php mode change 100644 => 100755 test/model/api/createstruct.php mode change 100644 => 100755 test/model/api/deleterelease.php mode change 100644 => 100755 test/model/api/getapilistbyrelease.php mode change 100644 => 100755 test/model/api/getlibbyid.php mode change 100644 => 100755 test/model/api/getlistbymoduleid.php mode change 100644 => 100755 test/model/api/getrelease.php mode change 100644 => 100755 test/model/api/getreleaselistbyapi.php mode change 100644 => 100755 test/model/api/getstructbyid.php mode change 100644 => 100755 test/model/api/getstructlistbylibid.php mode change 100644 => 100755 test/model/api/getstructlistbyrelease.php mode change 100644 => 100755 test/model/api/publishlib.php mode change 100644 => 100755 test/model/api/update.php mode change 100644 => 100755 test/model/api/updatestruct.php mode change 100644 => 100755 test/model/ci/sendrequest.php mode change 100644 => 100755 test/model/ci/setmenu.php mode change 100644 => 100755 test/model/ci/synccompilestatus.php mode change 100644 => 100755 test/model/ci/syncgitlabtaskstatus.php mode change 100644 => 100755 test/model/ci/updatebuildstatus.php mode change 100644 => 100755 test/model/datatable/getFieldList.php mode change 100644 => 100755 test/model/datatable/getSetting.php mode change 100644 => 100755 test/model/datatable/printHead.php mode change 100644 => 100755 test/model/datatable/setFixedFieldWidth.php mode change 100644 => 100755 test/model/dev/getAPIs.php mode change 100644 => 100755 test/model/dev/getFields.php mode change 100644 => 100755 test/model/dev/getModules.php mode change 100644 => 100755 test/model/dev/getTables.php mode change 100644 => 100755 test/model/doc/buildbrowseswitch.php mode change 100644 => 100755 test/model/doc/buildcollectbutton4doc.php mode change 100644 => 100755 test/model/doc/buildcreatebutton4doc.php mode change 100644 => 100755 test/model/doc/buildcrumbtitle.php mode change 100644 => 100755 test/model/doc/create.php mode change 100644 => 100755 test/model/doc/createapilib.php mode change 100644 => 100755 test/model/doc/createlib.php mode change 100644 => 100755 test/model/doc/extractketablecss.php mode change 100644 => 100755 test/model/doc/filldocsintree.php mode change 100644 => 100755 test/model/doc/getalllibgroups.php mode change 100644 => 100755 test/model/doc/getalllibsbytype.php mode change 100644 => 100755 test/model/doc/getapilibs.php mode change 100644 => 100755 test/model/doc/getapimoduletree.php mode change 100644 => 100755 test/model/doc/getbyid.php mode change 100644 => 100755 test/model/doc/getbyidlist.php mode change 100644 => 100755 test/model/doc/getdocmenu.php mode change 100644 => 100755 test/model/doc/getdocs.php mode change 100644 => 100755 test/model/doc/getdocsbybrowsetype.php mode change 100644 => 100755 test/model/doc/getdoctree.php mode change 100644 => 100755 test/model/doc/getexecutionmodulepairs.php mode change 100644 => 100755 test/model/doc/getfileicon.php mode change 100644 => 100755 test/model/doc/getfilesourcepairs.php mode change 100644 => 100755 test/model/doc/getlibbyid.php mode change 100644 => 100755 test/model/doc/getlibfiles.php mode change 100644 => 100755 test/model/doc/getlibs.php mode change 100644 => 100755 test/model/doc/getlibsbyobject.php mode change 100644 => 100755 test/model/doc/getlimitlibs.php mode change 100644 => 100755 test/model/doc/getobjectsbydoc.php mode change 100644 => 100755 test/model/doc/getorderedobjects.php mode change 100644 => 100755 test/model/doc/getpreandnextdoc.php mode change 100644 => 100755 test/model/doc/getprivdocs.php mode change 100644 => 100755 test/model/doc/getprivlibsbydoc.php mode change 100644 => 100755 test/model/doc/getproductcrumb.php mode change 100644 => 100755 test/model/doc/getstatisticinfo.php mode change 100644 => 100755 test/model/doc/getsublibgroups.php mode change 100644 => 100755 test/model/doc/gettreemenu.php mode change 100644 => 100755 test/model/doc/printchildmodule.php mode change 100644 => 100755 test/model/doc/savedraft.php mode change 100644 => 100755 test/model/doc/select.php mode change 100644 => 100755 test/model/doc/setfastmenu.php mode change 100644 => 100755 test/model/doc/setlibusers.php mode change 100644 => 100755 test/model/doc/setmenubytype.php mode change 100644 => 100755 test/model/doc/statlibcounts.php mode change 100644 => 100755 test/model/doc/summary.php mode change 100644 => 100755 test/model/doc/update.php mode change 100644 => 100755 test/model/doc/updateapilib.php mode change 100644 => 100755 test/model/doc/updatelib.php mode change 100644 => 100755 test/model/extension/checkdownloadpath.php mode change 100644 => 100755 test/model/extension/getinfofromdb.php mode change 100644 => 100755 test/model/extension/getlocalextensions.php mode change 100644 => 100755 test/model/extension/getmodulesbyapi.php mode change 100644 => 100755 test/model/gitlab/apideletebranchpriv.php mode change 100644 => 100755 test/model/gitlab/apideletetag.php mode change 100644 => 100755 test/model/gitlab/apideletetagpriv.php mode change 100644 => 100755 test/model/gitlab/apigetcurrentuser.php mode change 100644 => 100755 test/model/gitlab/apigetgroupmembers.php mode change 100644 => 100755 test/model/gitlab/apigetgroups.php mode change 100644 => 100755 test/model/gitlab/apigetsinglebranchpriv.php mode change 100644 => 100755 test/model/gitlab/apigettagprivs.php mode change 100644 => 100755 test/model/gitlab/apigettags.php mode change 100644 => 100755 test/model/gitlab/checkaccesslevel.php mode change 100644 => 100755 test/model/gitlab/checktokenaccess.php mode change 100644 => 100755 test/model/gitlab/checkuseraccess.php mode change 100644 => 100755 test/model/gitlab/createbranchpriv.php mode change 100644 => 100755 test/model/gitlab/getgitlablistbyaccount.php mode change 100644 => 100755 test/model/gitlab/getversion.php mode change 100644 => 100755 test/model/group/checkmenumodule.php mode change 100644 => 100755 test/model/group/copy.php mode change 100644 => 100755 test/model/group/copypriv.php mode change 100644 => 100755 test/model/group/copyuser.php mode change 100644 => 100755 test/model/group/create.php mode change 100644 => 100755 test/model/group/delete.php mode change 100644 => 100755 test/model/group/getaccessprogramgroup.php mode change 100644 => 100755 test/model/group/getbyaccount.php mode change 100644 => 100755 test/model/group/getbyaccounts.php mode change 100644 => 100755 test/model/group/getbyid.php mode change 100644 => 100755 test/model/group/getgroupaccounts.php mode change 100644 => 100755 test/model/group/getlist.php mode change 100644 => 100755 test/model/group/getmenumodules.php mode change 100644 => 100755 test/model/group/getpairs.php mode change 100644 => 100755 test/model/group/getprivs.php mode change 100644 => 100755 test/model/group/getuserpairs.php mode change 100644 => 100755 test/model/group/getuserprograms.php mode change 100644 => 100755 test/model/group/update.php mode change 100644 => 100755 test/model/group/updateprivbygroup.php mode change 100644 => 100755 test/model/group/updateprivbymodule.php mode change 100644 => 100755 test/model/group/updateprojectadmin.php mode change 100644 => 100755 test/model/group/updateuser.php mode change 100644 => 100755 test/model/jenkins/create.php mode change 100644 => 100755 test/model/jenkins/update.php mode change 100644 => 100755 test/model/mail/addqueue.php mode change 100644 => 100755 test/model/mail/autodetect.php mode change 100644 => 100755 test/model/mail/getconfigbydetectingsmtp.php mode change 100644 => 100755 test/model/mail/getconfigbymxrr.php mode change 100644 => 100755 test/model/mail/getconfigfromprovider.php mode change 100644 => 100755 test/model/mail/getqueue.php mode change 100644 => 100755 test/model/mail/getqueuebyid.php mode change 100644 => 100755 test/model/mail/getsubject.php mode change 100644 => 100755 test/model/mail/mailexist.php mode change 100644 => 100755 test/model/mail/mergemails.php mode change 100644 => 100755 test/model/mail/send.php mode change 100644 => 100755 test/model/mail/sendmail.php mode change 100644 => 100755 test/model/mail/setbody.php mode change 100644 => 100755 test/model/mail/setmta.php mode change 100644 => 100755 test/model/mail/setsubject.php mode change 100644 => 100755 test/model/message/getmessages.php mode change 100644 => 100755 test/model/message/getnoticetodos.php mode change 100644 => 100755 test/model/message/getobjectactions.php mode change 100644 => 100755 test/model/message/getobjecttypes.php mode change 100644 => 100755 test/model/message/gettolist.php mode change 100644 => 100755 test/model/message/savenotice.php mode change 100644 => 100755 test/model/message/send.php mode change 100644 => 100755 test/model/mr/apicreate.php mode change 100644 => 100755 test/model/mr/apigetsameopened.php mode change 100644 => 100755 test/model/mr/checksameopened.php mode change 100644 => 100755 test/model/mr/convertapierror.php mode change 100644 => 100755 test/model/mr/create.php mode change 100644 => 100755 test/model/mr/getallgitlabprojects.php mode change 100644 => 100755 test/model/mr/getdiffs.php mode change 100644 => 100755 test/model/mr/getlastreviewinfo.php mode change 100644 => 100755 test/model/mr/getlist.php mode change 100644 => 100755 test/model/mr/getreview.php mode change 100644 => 100755 test/model/mr/savebug.php mode change 100644 => 100755 test/model/mr/savetask.php mode change 100644 => 100755 test/model/mr/update.php mode change 100644 => 100755 test/model/pipeline/create.php mode change 100644 => 100755 test/model/pipeline/delete.php mode change 100644 => 100755 test/model/pipeline/getbyid.php mode change 100644 => 100755 test/model/pipeline/getlist.php mode change 100644 => 100755 test/model/pipeline/getpairs.php mode change 100644 => 100755 test/model/pipeline/update.php mode change 100644 => 100755 test/model/program/computeprogress.php mode change 100644 => 100755 test/model/program/gettoppath.php mode change 100644 => 100755 test/model/program/gettreemenu.php mode change 100644 => 100755 test/model/program/isclickable.php mode change 100644 => 100755 test/model/project/batchupdate.php mode change 100644 => 100755 test/model/project/buildmenuquery.php mode change 100644 => 100755 test/model/project/checkcanchangemodel.php mode change 100644 => 100755 test/model/project/computerprogress.php mode change 100644 => 100755 test/model/project/create.php mode change 100644 => 100755 test/model/project/getbranchesbyproject.php mode change 100644 => 100755 test/model/project/getbranchgroupbyproject.php mode change 100644 => 100755 test/model/project/getbrotherprojects.php mode change 100644 => 100755 test/model/project/getmembers2import.php mode change 100644 => 100755 test/model/project/getmultilinkedproducts.php mode change 100644 => 100755 test/model/project/getpairsbymodel.php mode change 100644 => 100755 test/model/project/getparentprogram.php mode change 100644 => 100755 test/model/project/getstats4kanban.php mode change 100644 => 100755 test/model/project/getstoriesbyproject.php mode change 100644 => 100755 test/model/project/gettotaltaskbyproject.php mode change 100644 => 100755 test/model/project/gettreemenu.php mode change 100644 => 100755 test/model/project/managemembers.php mode change 100644 => 100755 test/model/project/putoff.php mode change 100644 => 100755 test/model/project/unlinkmember.php mode change 100644 => 100755 test/model/project/update.php mode change 100644 => 100755 test/model/project/updateproductprogram.php mode change 100644 => 100755 test/model/project/updateproducts.php mode change 100644 => 100755 test/model/repo/getcommits.php mode change 100644 => 100755 test/model/repo/getrepobyurl.php mode change 100644 => 100755 test/model/score/create.php mode change 100644 => 100755 test/model/score/fixkey.php mode change 100644 => 100755 test/model/score/getlistbyaccount.php mode change 100644 => 100755 test/model/score/reset.php mode change 100644 => 100755 test/model/search/buildindexquery.php mode change 100644 => 100755 test/model/search/decode.php mode change 100644 => 100755 test/model/search/deletequery.php mode change 100644 => 100755 test/model/search/getbyid.php mode change 100644 => 100755 test/model/search/getlist.php mode change 100644 => 100755 test/model/search/getquery.php mode change 100644 => 100755 test/model/search/getquerypairs.php mode change 100644 => 100755 test/model/search/getsummary.php mode change 100644 => 100755 test/model/search/markkeywords.php mode change 100644 => 100755 test/model/search/savedict.php mode change 100644 => 100755 test/model/search/saveindex.php mode change 100644 => 100755 test/model/setting/deleteitems.php mode change 100644 => 100755 test/model/setting/getitem.php mode change 100644 => 100755 test/model/setting/getitems.php mode change 100644 => 100755 test/model/setting/parseitemparam.php mode change 100644 => 100755 test/model/setting/setitem.php mode change 100644 => 100755 test/model/setting/setitems.php mode change 100644 => 100755 test/model/sonarqube/apicreateproject.php mode change 100644 => 100755 test/model/sonarqube/apideleteproject.php mode change 100644 => 100755 test/model/sonarqube/apigetissues.php mode change 100644 => 100755 test/model/sonarqube/apigetprojects.php mode change 100644 => 100755 test/model/sonarqube/apigetqualitygate.php mode change 100644 => 100755 test/model/sonarqube/apigetreport.php mode change 100644 => 100755 test/model/sonarqube/apivalidate.php mode change 100644 => 100755 test/model/sonarqube/createproject.php mode change 100644 => 100755 test/model/sonarqube/getapibase.php mode change 100644 => 100755 test/model/sonarqube/getcachefile.php mode change 100644 => 100755 test/model/sonarqube/getlinkedproducts.php mode change 100644 => 100755 test/model/story/activate.php mode change 100644 => 100755 test/model/story/assign.php mode change 100644 => 100755 test/model/story/batchassignto.php mode change 100644 => 100755 test/model/story/batchchangebranch.php mode change 100644 => 100755 test/model/story/batchchangemodule.php mode change 100644 => 100755 test/model/story/batchchangeplan.php mode change 100644 => 100755 test/model/story/batchchangestage.php mode change 100644 => 100755 test/model/story/batchclose.php mode change 100644 => 100755 test/model/story/batchcreate.php mode change 100644 => 100755 test/model/story/batchgetstorystage.php mode change 100644 => 100755 test/model/story/batchreview.php mode change 100644 => 100755 test/model/story/batchtotask.php mode change 100644 => 100755 test/model/story/batchupdate.php mode change 100644 => 100755 test/model/story/change.php mode change 100644 => 100755 test/model/story/checkneedconfirm.php mode change 100644 => 100755 test/model/story/close.php mode change 100644 => 100755 test/model/story/computeestimate.php mode change 100644 => 100755 test/model/story/create.php mode change 100644 => 100755 test/model/story/createstoryfromgitlabissue.php mode change 100644 => 100755 test/model/story/extractaccountsfromlist.php mode change 100644 => 100755 test/model/story/extractaccountsfromsingle.php mode change 100644 => 100755 test/model/story/formatstories.php mode change 100644 => 100755 test/model/story/get2beclosed.php mode change 100644 => 100755 test/model/story/getaffectedscope.php mode change 100644 => 100755 test/model/story/getallstorysort.php mode change 100644 => 100755 test/model/story/getbyfield.php mode change 100644 => 100755 test/model/story/getbyid.php mode change 100644 => 100755 test/model/story/getbylist.php mode change 100644 => 100755 test/model/story/getbysearch.php mode change 100644 => 100755 test/model/story/getbysql.php mode change 100644 => 100755 test/model/story/getchangedstories.php mode change 100644 => 100755 test/model/story/getdataofstorysperassignedto.php mode change 100644 => 100755 test/model/story/getdataofstorysperchange.php mode change 100644 => 100755 test/model/story/getdataofstorysperclosedreason.php mode change 100644 => 100755 test/model/story/getdataofstorysperestimate.php mode change 100644 => 100755 test/model/story/getdataofstoryspermodule.php mode change 100644 => 100755 test/model/story/getdataofstorysperopenedby.php mode change 100644 => 100755 test/model/story/getdataofstorysperplan.php mode change 100644 => 100755 test/model/story/getdataofstorysperpri.php mode change 100644 => 100755 test/model/story/getdataofstorysperproduct.php mode change 100644 => 100755 test/model/story/getdataofstoryspersource.php mode change 100644 => 100755 test/model/story/getdataofstorysperstage.php mode change 100644 => 100755 test/model/story/getdataofstorysperstatus.php mode change 100644 => 100755 test/model/story/getestimateinfo.php mode change 100644 => 100755 test/model/story/getestimaterounds.php mode change 100644 => 100755 test/model/story/getexecutionstories.php mode change 100644 => 100755 test/model/story/getexecutionstorypairs.php mode change 100644 => 100755 test/model/story/getidlistwithtask.php mode change 100644 => 100755 test/model/story/getkanbangroupdata.php mode change 100644 => 100755 test/model/story/getparentstorypairs.php mode change 100644 => 100755 test/model/story/getplanstories.php mode change 100644 => 100755 test/model/story/getproductstories.php mode change 100644 => 100755 test/model/story/getproductstorypairs.php mode change 100644 => 100755 test/model/story/getrequierements.php mode change 100644 => 100755 test/model/story/getreviewerpairs.php mode change 100644 => 100755 test/model/story/getstories2link.php mode change 100644 => 100755 test/model/story/getstoriesbyplanidlist.php mode change 100644 => 100755 test/model/story/getstoryrelation.php mode change 100644 => 100755 test/model/story/getstoryrelationcounts.php mode change 100644 => 100755 test/model/story/getstoryspecs.php mode change 100644 => 100755 test/model/story/getteammembers.php mode change 100644 => 100755 test/model/story/getteststories.php mode change 100644 => 100755 test/model/story/gettoandcclist.php mode change 100644 => 100755 test/model/story/gettrackbyid.php mode change 100644 => 100755 test/model/story/gettracks.php mode change 100644 => 100755 test/model/story/getuserstories.php mode change 100644 => 100755 test/model/story/getuserstorypairs.php mode change 100644 => 100755 test/model/story/getversion.php mode change 100644 => 100755 test/model/story/getversions.php mode change 100644 => 100755 test/model/story/getzerocase.php mode change 100644 => 100755 test/model/story/isclickable.php mode change 100644 => 100755 test/model/story/linkstories.php mode change 100644 => 100755 test/model/story/linkstory.php mode change 100644 => 100755 test/model/story/mergechartoption.php mode change 100644 => 100755 test/model/story/mergereviewer.php mode change 100644 => 100755 test/model/story/printassignedhtml.php mode change 100644 => 100755 test/model/story/recall.php mode change 100644 => 100755 test/model/story/review.php mode change 100644 => 100755 test/model/story/saveestimateinfo.php mode change 100644 => 100755 test/model/story/setstage.php mode change 100644 => 100755 test/model/story/setstatusbyreviewrules.php mode change 100644 => 100755 test/model/story/sortstoriesofplan.php mode change 100644 => 100755 test/model/story/subdivide.php mode change 100644 => 100755 test/model/story/unlinkstory.php mode change 100644 => 100755 test/model/story/update.php mode change 100644 => 100755 test/model/story/updatestoryorderofplan.php mode change 100644 => 100755 test/model/story/updatestoryproduct.php mode change 100644 => 100755 test/model/story/updatestoryversion.php mode change 100644 => 100755 test/model/testtask/activate.php mode change 100644 => 100755 test/model/testtask/batchrun.php mode change 100644 => 100755 test/model/testtask/block.php mode change 100644 => 100755 test/model/testtask/close.php mode change 100644 => 100755 test/model/testtask/create.php mode change 100644 => 100755 test/model/testtask/createresult.php mode change 100644 => 100755 test/model/testtask/getalllinkablecases.php mode change 100644 => 100755 test/model/testtask/getbuginfo.php mode change 100644 => 100755 test/model/testtask/getbyid.php mode change 100644 => 100755 test/model/testtask/getbylist.php mode change 100644 => 100755 test/model/testtask/getbyuser.php mode change 100644 => 100755 test/model/testtask/getdataoftesttaskpermodule.php mode change 100644 => 100755 test/model/testtask/getdataoftesttaskperrunner.php mode change 100644 => 100755 test/model/testtask/getdataoftesttaskperrunresult.php mode change 100644 => 100755 test/model/testtask/getdataoftesttaskpertype.php mode change 100644 => 100755 test/model/testtask/getexecutiontasks.php mode change 100644 => 100755 test/model/testtask/getlinkablecasesbybug.php mode change 100644 => 100755 test/model/testtask/getlinkablecasesbystory.php mode change 100644 => 100755 test/model/testtask/getlinkablecasesbysuite.php mode change 100644 => 100755 test/model/testtask/getlinkablecasesbytesttask.php mode change 100644 => 100755 test/model/testtask/getpairs.php mode change 100644 => 100755 test/model/testtask/getproducttasks.php mode change 100644 => 100755 test/model/testtask/getproductunittasks.php mode change 100644 => 100755 test/model/testtask/getprojecttasks.php mode change 100644 => 100755 test/model/testtask/getrelatedtesttasks.php mode change 100644 => 100755 test/model/testtask/getresults.php mode change 100644 => 100755 test/model/testtask/getrunbyid.php mode change 100644 => 100755 test/model/testtask/getruns.php mode change 100644 => 100755 test/model/testtask/gettaskcases.php mode change 100644 => 100755 test/model/testtask/gettoandcclist.php mode change 100644 => 100755 test/model/testtask/getuserruns.php mode change 100644 => 100755 test/model/testtask/getusertesttaskpairs.php mode change 100644 => 100755 test/model/testtask/importunitresult.php mode change 100644 => 100755 test/model/testtask/linkcase.php mode change 100644 => 100755 test/model/testtask/mergechartoption.php mode change 100644 => 100755 test/model/testtask/parsecppxmlresult.php mode change 100644 => 100755 test/model/testtask/parsexmlresult.php mode change 100644 => 100755 test/model/testtask/parseztffuncresult.php mode change 100644 => 100755 test/model/testtask/parseztfunitresult.php mode change 100644 => 100755 test/model/testtask/printcell.php mode change 100644 => 100755 test/model/testtask/processautoresult.php mode change 100644 => 100755 test/model/testtask/start.php mode change 100644 => 100755 test/model/testtask/update.php mode change 100644 => 100755 test/model/tutorial/checknovice.php mode change 100644 => 100755 test/model/tutorial/getexecution.php mode change 100644 => 100755 test/model/tutorial/getexecutionpairs.php mode change 100644 => 100755 test/model/tutorial/getexecutionproducts.php mode change 100644 => 100755 test/model/tutorial/getexecutionstories.php mode change 100644 => 100755 test/model/tutorial/getexecutionstorypairs.php mode change 100644 => 100755 test/model/tutorial/getmodulepairs.php mode change 100644 => 100755 test/model/tutorial/getproduct.php mode change 100644 => 100755 test/model/tutorial/getproductpairs.php mode change 100644 => 100755 test/model/tutorial/getproductstats.php mode change 100644 => 100755 test/model/tutorial/getproject.php mode change 100644 => 100755 test/model/tutorial/getprojectpairs.php mode change 100644 => 100755 test/model/tutorial/getprojectstats.php mode change 100644 => 100755 test/model/tutorial/getstories.php mode change 100644 => 100755 test/model/tutorial/getteammembers.php mode change 100644 => 100755 test/model/tutorial/getteammemberspairs.php mode change 100644 => 100755 test/model/tutorial/gettutorialed.php mode change 100644 => 100755 test/model/tutorial/getuserpairs.php mode change 100644 => 100755 test/model/user/createcontactlist.php mode change 100644 => 100755 test/model/user/deletecontactlist.php mode change 100644 => 100755 test/model/user/getdatainjson.php mode change 100644 => 100755 test/model/user/getweakusers.php mode change 100644 => 100755 test/model/user/updatecontactList.php create mode 100755 test/model/weekly/getpv.php.bak create mode 100755 test/model/weekly/save.php.bak diff --git a/test/model/action/create.php b/test/model/action/create.php index 9bf65ea0f4..92bfb754ad 100755 --- a/test/model/action/create.php +++ b/test/model/action/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($action->createTest($objectTypeList[3], $objectIDList[0], $actionTypeList[3])) r($action->createTest($objectTypeList[4], $objectIDList[0], $actionTypeList[4], $comment)) && p('objectType,objectId,action,comment') && e('story,,comments,测试备注'); // 测试创建story 1 comment动态 r($action->createTest($objectTypeList[4], $objectIDList[0], $actionTypeList[4])) && p() && e(''); // 测试创建story 1 comment动态 不填写备注 r($action->createTest($objectTypeList[2], $objectIDList[0], $actionTypeList[5], '', '', $actor)) && p() && e('0'); // 测试创建游客 logout动态 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/gettrashes.php b/test/model/action/gettrashes.php index c1ca62efd1..8e7daeda1d 100755 --- a/test/model/action/gettrashes.php +++ b/test/model/action/gettrashes.php @@ -10,10 +10,12 @@ title=测试 actionModel->getTrashes(); cid=1 pid=1 -查询type all id desc排序的回收站信息 >> testsuite,,这是测试套件名称87;story,,软件需求48 -查询type all id desc排序的回收站信息 >> story,,软件需求48;testsuite,,这是测试套件名称87 -查询type hidden id asc排序的回收站信息 >> testcase,,这个是测试用例9 -查询type hidden id asc排序的回收站信息 >> testcase,,这个是测试用例9 +查询objectType all type all id desc排序的回收站信息 >> testsuite,,这是测试套件名称87;story,,软件需求48 +查询objectType all type all id desc排序的回收站信息 >> story,,软件需求48;testsuite,,这是测试套件名称87 +查询objectType all type hidden id asc排序的回收站信息 >> testcase,,这个是测试用例9 +查询objectType all type hidden id asc排序的回收站信息 >> testcase,,这个是测试用例9 +查询objectType story type all id asc排序的回收站信息 >> story,,软件需求48 +查询objectType testcase hidden id asc排序的回收站信息 >> testcase,,这个是测试用例9 */ @@ -29,4 +31,4 @@ r($action->getTrashesTest($objectTypeList[0], $typeList[0], $orderBy[1], $pager) r($action->getTrashesTest($objectTypeList[0], $typeList[1], $orderBy[0], $pager)) && p('0:objectType,objectId,objectName') && e('testcase,,这个是测试用例9'); // 查询objectType all type hidden id asc排序的回收站信息 r($action->getTrashesTest($objectTypeList[0], $typeList[1], $orderBy[1], $pager)) && p('0:objectType,objectId,objectName') && e('testcase,,这个是测试用例9'); // 查询objectType all type hidden id asc排序的回收站信息 r($action->getTrashesTest($objectTypeList[1], $typeList[0], $orderBy[0], $pager)) && p('0:objectType,objectId,objectName') && e('story,,软件需求48'); // 查询objectType story type all id asc排序的回收站信息 -r($action->getTrashesTest($objectTypeList[2], $typeList[1], $orderBy[0], $pager)) && p('0:objectType,objectId,objectName') && e('testcase,,这个是测试用例9'); // 查询objectType testcase hidden id asc排序的回收站信息 +r($action->getTrashesTest($objectTypeList[2], $typeList[1], $orderBy[0], $pager)) && p('0:objectType,objectId,objectName') && e('testcase,,这个是测试用例9'); // 查询objectType testcase hidden id asc排序的回收站信息 \ No newline at end of file diff --git a/test/model/action/gettrashobjecttypes.php b/test/model/action/gettrashobjecttypes.php old mode 100644 new mode 100755 index 59d4982b27..8bb9aed695 --- a/test/model/action/gettrashobjecttypes.php +++ b/test/model/action/gettrashobjecttypes.php @@ -10,6 +10,9 @@ title=测试 actionModel->getTrashObjectTypes(); cid=1 pid=1 +查询type all 的对象类型列表 >> story +查询type all 的对象类型列表 >> testcase + */ $typeList = array('all', 'hidden'); @@ -17,4 +20,4 @@ $typeList = array('all', 'hidden'); $action = new actionTest(); r($action->getTrashObjectTypesTest($typeList[0])) && p('story:objectType') && e('story'); // 查询type all 的对象类型列表 -r($action->getTrashObjectTypesTest($typeList[1])) && p('testcase:objectType') && e('testcase'); // 查询type all 的对象类型列表 +r($action->getTrashObjectTypesTest($typeList[1])) && p('testcase:objectType') && e('testcase'); // 查询type all 的对象类型列表 \ No newline at end of file diff --git a/test/model/action/hideall.php b/test/model/action/hideall.php index 8e6313ce5d..8a2aa28000 100755 --- a/test/model/action/hideall.php +++ b/test/model/action/hideall.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -17,4 +18,4 @@ pid=1 $action = new actionTest(); r($action->hideAllTest()) && p('0:extra;1:extra;2:extra') && e('2;2;2'); // 隐藏回收站全部信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/hideone.php b/test/model/action/hideone.php index aed9d946d7..e0d4fa338f 100755 --- a/test/model/action/hideone.php +++ b/test/model/action/hideone.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ r($action->hideOneTest($actionIDList[0])) && p('extra') && e('2'); // 隐藏acti r($action->hideOneTest($actionIDList[1])) && p('extra') && e('2'); // 隐藏action 87 r($action->hideOneTest($actionIDList[2])) && p('extra') && e('2'); // 隐藏已隐藏action 9 r($action->hideOneTest($actionIDList[3])) && p('extra') && e('1'); // 隐藏非删除action 1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/loghistory.php b/test/model/action/loghistory.php index ae7665a2fe..4191c8fd2e 100755 --- a/test/model/action/loghistory.php +++ b/test/model/action/loghistory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($action->logHistoryTest($actionIDList[1], $changes2)) && p('0:field,old,new') r($action->logHistoryTest($actionIDList[2], $changes3)) && p('0:field,old,new') && e('name,name1,name2'); // 测试新增actionID 10003 历史记录 r($action->logHistoryTest($actionIDList[3], $changes4)) && p('0:field,old,new') && e('code,code1,code2'); // 测试新增actionID 10004 历史记录 r($action->logHistoryTest($actionIDList[4], $changes5)) && p('0:field,old,new') && e('assignedTo,test2,test1'); // 测试新增actionID 10005 历史记录 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/read.php b/test/model/action/read.php index 821a8f6bfb..8c968bf5aa 100755 --- a/test/model/action/read.php +++ b/test/model/action/read.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($action->readTest($objectType[1], $objectID[1])) && p('0:objectType,objectID,r r($action->readTest($objectType[2], $objectID[2])) && p('0:objectType,objectID,read') && e('productplan,3,1'); // 测试对action 3 进行阅读操作 r($action->readTest($objectType[3], $objectID[3])) && p('0:objectType,objectID,read') && e('release,4,1'); // 测试对action 4 进行阅读操作 r($action->readTest($objectType[4], $objectID[4])) && p('0:objectType,objectID,read') && e('project,5,1'); // 测试对action 5 进行阅读操作 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/undelete.php b/test/model/action/undelete.php index eee51b42b0..c90b7e251d 100755 --- a/test/model/action/undelete.php +++ b/test/model/action/undelete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ r($action->undeleteTest($actionIDList[0])) && p('extra') && e('0'); // 测试还 r($action->undeleteTest($actionIDList[1])) && p('extra') && e('0'); // 测试还原action 87 r($action->undeleteTest($actionIDList[2])) && p('extra') && e('0'); // 测试还原action 9 r($action->undeleteTest($actionIDList[3])) && p('extra') && e('1'); // 测试还原未删除action 1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/action/updatecomment.php b/test/model/action/updatecomment.php index 26316266b0..7f3e8d1325 100755 --- a/test/model/action/updatecomment.php +++ b/test/model/action/updatecomment.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($action->updateCommentTest($actionIDList[1], $commentList[1])) && p('comment') r($action->updateCommentTest($actionIDList[2], $commentList[2])) && p('comment') && e('备注3'); // 测试更新action 3的备注 r($action->updateCommentTest($actionIDList[3], $commentList[3])) && p('comment') && e('备注4'); // 测试更新action 4的备注 r($action->updateCommentTest($actionIDList[4], $commentList[4])) && p('comment') && e('备注5'); // 测试更新action 5的备注 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/api/create.php b/test/model/api/create.php old mode 100644 new mode 100755 index 0c5abf7402..ab436b1ada --- a/test/model/api/create.php +++ b/test/model/api/create.php @@ -10,6 +10,11 @@ title=测试 apiModel->create(); cid=1 pid=1 +测试创建api >> 910 +测试没有lib创建api >> 『API Library』should not be blank. +测试没有title创建api >> 『Name』should not be blank. +测试没有path创建api >> 『Request Path』should not be blank. + */ $api = new apiTest(); @@ -46,4 +51,4 @@ $emptyPathApi['path'] = ''; r($api->createTest($normalApi)) && p('lib') && e('910'); //测试创建api r($api->createTest($emptyLibApi)) && p('lib:0') && e('『API Library』should not be blank.'); //测试没有lib创建api r($api->createTest($emptyTitleApi)) && p('title:0') && e('『Name』should not be blank.'); //测试没有title创建api -r($api->createTest($emptyPathApi)) && p('path:0') && e('『Request Path』should not be blank.'); //测试没有path创建api +r($api->createTest($emptyPathApi)) && p('path:0') && e('『Request Path』should not be blank.'); //测试没有path创建api \ No newline at end of file diff --git a/test/model/api/createstruct.php b/test/model/api/createstruct.php old mode 100644 new mode 100755 index b87296eb06..09ab461963 --- a/test/model/api/createstruct.php +++ b/test/model/api/createstruct.php @@ -10,6 +10,9 @@ title=测试 apiModel->createStruct(); cid=1 pid=1 +创建数据结构 >> struct +创建没有结构名的数据结构 >> 『Name』should not be blank. + */ global $tester; @@ -32,4 +35,4 @@ $normalStruct->addedBy = $tester->app->user->account; $normalStruct->addedDate = helper::now(); r($api->createStructTest($normalStruct)) && p('name') && e('struct'); //创建数据结构 -r($api->createStructTest($emptyNameStruct)) && p('name:0') && e('『Name』should not be blank.'); //创建没有结构名的数据结构 +r($api->createStructTest($emptyNameStruct)) && p('name:0') && e('『Name』should not be blank.'); //创建没有结构名的数据结构 \ No newline at end of file diff --git a/test/model/api/deleterelease.php b/test/model/api/deleterelease.php old mode 100644 new mode 100755 index 3a55f87ba1..90b7b98fd1 --- a/test/model/api/deleterelease.php +++ b/test/model/api/deleterelease.php @@ -10,6 +10,8 @@ title=测试 apiModel->deleteRelease(); cid=1 pid=1 +删除一个创建的发布 >> 0 + */ global $tester; @@ -24,4 +26,4 @@ $normalRelease->addedDate = helper::now(); $release = $api->publishLibTest($normalRelease, false); -r($api->deleteReleaseTest($release->id, $release->lib)) && p('') && e('0'); //删除一个创建的发布 +r($api->deleteReleaseTest($release->id, $release->lib)) && p('') && e('0'); //删除一个创建的发布 \ No newline at end of file diff --git a/test/model/api/getapilistbyrelease.php b/test/model/api/getapilistbyrelease.php old mode 100644 new mode 100755 index 55f80d724c..a32334ed96 --- a/test/model/api/getapilistbyrelease.php +++ b/test/model/api/getapilistbyrelease.php @@ -10,6 +10,8 @@ title=测试 apiModel->getApiListByRelease(); cid=1 pid=1 +创建api后创建发布,使用发布查找api >> 910 + */ global $tester; @@ -44,4 +46,4 @@ $normalRelease->addedDate = helper::now(); $apiInfo = $api->createTest($normalApi, false); $release = $api->publishLibTest($normalRelease, false); -r($api->getApiListByReleaseTest($release)) && p('0:lib') && e('910'); //创建api后创建发布,使用发布查找api +r($api->getApiListByReleaseTest($release)) && p('0:lib') && e('910'); //创建api后创建发布,使用发布查找api \ No newline at end of file diff --git a/test/model/api/getlibbyid.php b/test/model/api/getlibbyid.php old mode 100644 new mode 100755 index c884024d4a..15f9ba5aeb --- a/test/model/api/getlibbyid.php +++ b/test/model/api/getlibbyid.php @@ -10,6 +10,8 @@ title=测试 apiModel->getLibById(); cid=1 pid=1 +获取刚创建的api >> 910 + */ $api = new apiTest(); @@ -35,4 +37,4 @@ $data = array( $normalApi = $data; $apiInfo = $api->createTest($normalApi, false); -r($api->getLibByIdTest($apiInfo->id)) && p('lib') && e('910'); //获取刚创建的api +r($api->getLibByIdTest($apiInfo->id)) && p('lib') && e('910'); //获取刚创建的api \ No newline at end of file diff --git a/test/model/api/getlistbymoduleid.php b/test/model/api/getlistbymoduleid.php old mode 100644 new mode 100755 index d463eaa29a..2ab0ac94e1 --- a/test/model/api/getlistbymoduleid.php +++ b/test/model/api/getlistbymoduleid.php @@ -10,6 +10,11 @@ title=测试 apiModel->getListByModuleId(); cid=1 pid=1 +通过正常的libID、moduleID、releaseID查询api信息 >> 获取token +通过正常的libID、moduleID,不传releaseID,查询api信息 >> 获取我的个人信息 +通过正常的libID,不传moduleID、releaseID查询api信息 >> 获取token +通过不存在的libID,moduleID,releaseID查询api信息 >> 0 + */ $api = new apiTest(); @@ -17,4 +22,4 @@ $api = new apiTest(); r($api->getListByModuleIdTest(1, 1, 1)) && p('title') && e('获取token'); //通过正常的libID、moduleID、releaseID查询api信息 r($api->getListByModuleIdTest(1, 1, 0)) && p('title') && e('获取我的个人信息'); //通过正常的libID、moduleID,不传releaseID,查询api信息 r($api->getListByModuleIdTest(1, 0, 0)) && p('title') && e('获取token'); //通过正常的libID,不传moduleID、releaseID查询api信息 -r($api->getListByModuleIdTest(0, 0, 0)) && p('title') && e('0'); //通过不存在的libID,moduleID,releaseID查询api信息 +r($api->getListByModuleIdTest(0, 0, 0)) && p('title') && e('0'); //通过不存在的libID,moduleID,releaseID查询api信息 \ No newline at end of file diff --git a/test/model/api/getrelease.php b/test/model/api/getrelease.php old mode 100644 new mode 100755 index a8728da6a8..00ddb36271 --- a/test/model/api/getrelease.php +++ b/test/model/api/getrelease.php @@ -10,6 +10,8 @@ title=测试 apiModel->getRelease(); cid=1 pid=1 +获取刚创建的发布 >> Version1 + */ global $tester; @@ -23,4 +25,4 @@ $normalRelease->addedBy = $tester->app->user->account; $normalRelease->addedDate = helper::now(); $release = $api->publishLibTest($normalRelease, false); -r($api->getReleaseTest($release->lib)) && p('version') && e('Version1'); //获取刚创建的发布 +r($api->getReleaseTest($release->lib)) && p('version') && e('Version1'); //获取刚创建的发布 \ No newline at end of file diff --git a/test/model/api/getreleaselistbyapi.php b/test/model/api/getreleaselistbyapi.php old mode 100644 new mode 100755 index d9a542a37c..503d3397a5 --- a/test/model/api/getreleaselistbyapi.php +++ b/test/model/api/getreleaselistbyapi.php @@ -10,6 +10,8 @@ title=测试 apiModel->getReleaseListByApi(); cid=1 pid=1 +获取刚插入的发布信息 >> 910 + */ global $tester; @@ -23,4 +25,4 @@ $normalRelease->addedBy = $tester->app->user->account; $normalRelease->addedDate = helper::now(); $release = $api->publishLibTest($normalRelease, false); -r($api->getReleaseListByApiTest($release->lib, $release->id)) && p("{$release->id}:lib") && e('910'); //获取刚插入的发布信息 +r($api->getReleaseListByApiTest($release->lib, $release->id)) && p("{$release->id}:lib") && e('910'); //获取刚插入的发布信息 \ No newline at end of file diff --git a/test/model/api/getstructbyid.php b/test/model/api/getstructbyid.php old mode 100644 new mode 100755 index 503b36e58e..6b8fbed502 --- a/test/model/api/getstructbyid.php +++ b/test/model/api/getstructbyid.php @@ -10,6 +10,8 @@ title=测试 apiModel->getStructByID(); cid=1 pid=1 +获取刚创建的数据结构 >> struct + */ global $tester; @@ -24,4 +26,4 @@ $normalStruct->addedBy = $tester->app->user->account; $normalStruct->addedDate = helper::now(); $struct = $api->createStructTest($normalStruct, false); -r($api->getStructByIDTest($struct->id)) && p('name') && e('struct'); //获取刚创建的数据结构 +r($api->getStructByIDTest($struct->id)) && p('name') && e('struct'); //获取刚创建的数据结构 \ No newline at end of file diff --git a/test/model/api/getstructlistbylibid.php b/test/model/api/getstructlistbylibid.php old mode 100644 new mode 100755 index 33cbd31084..866aa46bf3 --- a/test/model/api/getstructlistbylibid.php +++ b/test/model/api/getstructlistbylibid.php @@ -10,6 +10,8 @@ title=测试 apiModel->getStructListByLibID(); cid=1 pid=1 +用libID获取刚插入的数据结构 >> 910 + */ global $tester; @@ -26,4 +28,4 @@ $normalStruct->addedDate = helper::now(); $struct = $api->createStructTest($normalStruct, false); -r($api->getStructListByLibIDTest($normalStruct->lib)) && p('0:lib') && e('910'); //用libID获取刚插入的数据结构 +r($api->getStructListByLibIDTest($normalStruct->lib)) && p('0:lib') && e('910'); //用libID获取刚插入的数据结构 \ No newline at end of file diff --git a/test/model/api/getstructlistbyrelease.php b/test/model/api/getstructlistbyrelease.php old mode 100644 new mode 100755 index 8099c03982..1c3b5e0ce5 --- a/test/model/api/getstructlistbyrelease.php +++ b/test/model/api/getstructlistbyrelease.php @@ -10,6 +10,8 @@ title=测试 apiModel->getStructListByRelease(); cid=1 pid=1 +创建api后创建发布,使用发布查找api >> 910 + */ global $tester; @@ -45,4 +47,4 @@ $apiInfo = $api->createTest($normalApi, false); $release = $api->publishLibTest($normalRelease, false); r($api->getStructListByReleaseTest($release->lib)) && p('') && e(''); -//r($api->getApiListByReleaseTest($release)) && p('0:lib') && e('910'); //创建api后创建发布,使用发布查找api +//r($api->getApiListByReleaseTest($release)) && p('0:lib') && e('910'); //创建api后创建发布,使用发布查找api \ No newline at end of file diff --git a/test/model/api/publishlib.php b/test/model/api/publishlib.php old mode 100644 new mode 100755 index e6b0060132..77438e0888 --- a/test/model/api/publishlib.php +++ b/test/model/api/publishlib.php @@ -10,6 +10,9 @@ title=测试 apiModel->publishLib(); cid=1 pid=1 +没有版本名的发布 >> 『Version』should not be blank. +正常的发布 >> Version1 + */ global $tester; @@ -30,4 +33,4 @@ $normalRelease->addedBy = $tester->app->user->account; $normalRelease->addedDate = helper::now(); r($api->publishLibTest($emptyBuildRelease)) && p('version:0') && e('『Version』should not be blank.'); //没有版本名的发布 -r($api->publishLibTest($normalRelease)) && p('version') && e('Version1'); //正常的发布 +r($api->publishLibTest($normalRelease)) && p('version') && e('Version1'); //正常的发布 \ No newline at end of file diff --git a/test/model/api/update.php b/test/model/api/update.php old mode 100644 new mode 100755 index 052c0cf149..4ebba341ba --- a/test/model/api/update.php +++ b/test/model/api/update.php @@ -10,6 +10,8 @@ title=测试 apiModel->update(); cid=1 pid=1 +修改一个刚创建的api >> edittestapi + */ $api = new apiTest(); @@ -50,10 +52,9 @@ $editData = array( 'responseExample' => '' ); - $normalApi = $data; $editApi = $editData; $apiInfo = $api->createTest($normalApi, false); -r($api->updateTest($apiInfo->id, $editApi)) && p('0:new') && e('edittestapi'); //修改一个刚创建的api +r($api->updateTest($apiInfo->id, $editApi)) && p('0:new') && e('edittestapi'); //修改一个刚创建的api \ No newline at end of file diff --git a/test/model/api/updatestruct.php b/test/model/api/updatestruct.php old mode 100644 new mode 100755 index 74e0af5fdd..28cf08cae9 --- a/test/model/api/updatestruct.php +++ b/test/model/api/updatestruct.php @@ -10,6 +10,9 @@ title=测试 apiModel->updateStruct(); cid=1 pid=1 +正常的修改 >> editStruct +没有名称的修改 >> 『Name』should not be blank. + */ global $tester; @@ -37,4 +40,4 @@ $emptyNameEditStruct['name'] = ''; $struct = $api->createStructTest($normalStruct, false); r($api->updateStructTest($struct->id, $normalEditStruct, false)) && p('0:new') && e('editStruct'); //正常的修改 -r($api->updateStructTest($struct->id, $emptyNameEditStruct)) && p('name:0') && e('『Name』should not be blank.'); //没有名称的修改 +r($api->updateStructTest($struct->id, $emptyNameEditStruct)) && p('name:0') && e('『Name』should not be blank.'); //没有名称的修改 \ No newline at end of file diff --git a/test/model/block/getqastatisticparams.php b/test/model/block/getqastatisticparams.php index e3567adbb4..9920ccfac1 100755 --- a/test/model/block/getqastatisticparams.php +++ b/test/model/block/getqastatisticparams.php @@ -10,11 +10,12 @@ title=测试 blockModel->getQaStatisticParams(); cid=1 pid=1 - +测试name >> 类型 +测试control >> select */ $block = new blockTest(); r($block->getQaStatisticParamsTest()) && p('type:name') && e('类型'); //测试name -r($block->getQaStatisticParamsTest()) && p('type:control') && e('select');//测试control +r($block->getQaStatisticParamsTest()) && p('type:control') && e('select');//测试control \ No newline at end of file diff --git a/test/model/block/getreleaseparams.php b/test/model/block/getreleaseparams.php index a88bbaff46..b133bb3eec 100755 --- a/test/model/block/getreleaseparams.php +++ b/test/model/block/getreleaseparams.php @@ -10,10 +10,10 @@ title=测试 blockModel->getReleaseParams(); cid=1 pid=1 - +测试name >> 数量,20,input */ $block = new blockTest(); -r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name +r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name \ No newline at end of file diff --git a/test/model/block/getscrumlistparams.php b/test/model/block/getscrumlistparams.php index d6469a1283..b8081539a8 100755 --- a/test/model/block/getscrumlistparams.php +++ b/test/model/block/getscrumlistparams.php @@ -10,7 +10,11 @@ title=测试 blockModel->getScrumListParams(); cid=1 pid=1 - +测试name和select >> 类型,select +测试options >> 未完成 +测试options >> 进行中 +测试options >> 全部 +测试options >> 我参与 */ @@ -20,4 +24,4 @@ r($block->getScrumListParamsTest()) && p('name,control') && e('类型,select r($block->getScrumListParamsTest()) && p('options:undone') && e('未完成'); //测试options r($block->getScrumListParamsTest()) && p('options:doing') && e('进行中'); //测试options r($block->getScrumListParamsTest()) && p('options:all') && e('全部'); //测试options -r($block->getScrumListParamsTest()) && p('options:involved') && e('我参与'); //测试options +r($block->getScrumListParamsTest()) && p('options:involved') && e('我参与'); //测试options \ No newline at end of file diff --git a/test/model/block/getscrumproductparams.php b/test/model/block/getscrumproductparams.php index c90dc410fc..f02f985abc 100755 --- a/test/model/block/getscrumproductparams.php +++ b/test/model/block/getscrumproductparams.php @@ -16,4 +16,4 @@ pid=1 $block = new blockTest(); -r($block->getScrumProductParamsTest()) && p('count:name;count:default;count:control') && e('数量;20;input'); // 测试获取产品区块的参数 +r($block->getScrumProductParamsTest()) && p('count:name;count:default;count:control') && e('数量;20;input'); // 测试获取产品区块的参数 \ No newline at end of file diff --git a/test/model/block/getscrumroadmapparams.php b/test/model/block/getscrumroadmapparams.php index ae3b926dad..190b3053a9 100755 --- a/test/model/block/getscrumroadmapparams.php +++ b/test/model/block/getscrumroadmapparams.php @@ -16,4 +16,4 @@ pid=1 $block = new blockTest(); -r($block->getScrumRoadMapParamsTest()) && p() && e('0'); // 测试获取产品路线图区块的参数 +r($block->getScrumRoadMapParamsTest()) && p() && e('0'); // 测试获取产品路线图区块的参数 \ No newline at end of file diff --git a/test/model/block/getscrumtestparams.php b/test/model/block/getscrumtestparams.php index 6414903188..53a4694f11 100755 --- a/test/model/block/getscrumtestparams.php +++ b/test/model/block/getscrumtestparams.php @@ -16,4 +16,4 @@ pid=1 $block = new blockTest(); -r($block->getScrumTestParamsTest()) && p('count:name;type:name') && e('数量;类型'); // 测试获取测试单区块的参数 +r($block->getScrumTestParamsTest()) && p('count:name;type:name') && e('数量;类型'); // 测试获取测试单区块的参数 \ No newline at end of file diff --git a/test/model/block/getstatisticparams.php b/test/model/block/getstatisticparams.php index 4e9aa9b7e8..39321b7b36 100755 --- a/test/model/block/getstatisticparams.php +++ b/test/model/block/getstatisticparams.php @@ -10,7 +10,7 @@ title=测试 blockModel->getStatisticParams(); cid=1 pid=1 -获取空区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"}} +获取空区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"}} 获取产品区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}} 获取项目区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"全部","involved":"我参与的"},"control":"select"}} 获取执行区块的参数 >> {"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"所有","involved":"我参与"},"control":"select"}} @@ -31,4 +31,4 @@ r($data[0]) && p() && e('{"count":{"name":"数量","default":20,"control":"input r($data[1]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}}'); // 获取产品区块的参数 r($data[2]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"全部","involved":"我参与的"},"control":"select"}}'); // 获取项目区块的参数 r($data[3]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"undone":"未完成","doing":"进行中","all":"所有","involved":"我参与"},"control":"select"}}'); // 获取执行区块的参数 -r($data[4]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}}'); // 获取测试区块的参数 +r($data[4]) && p() && e('{"count":{"name":"数量","default":20,"control":"input"},"type":{"name":"类型","options":{"noclosed":"未关闭","closed":"已关闭","all":"全部","involved":"我参与"},"control":"select"}}'); // 获取测试区块的参数 \ No newline at end of file diff --git a/test/model/block/initblock.php b/test/model/block/initblock.php index f50d76795f..72cbb1c5cf 100755 --- a/test/model/block/initblock.php +++ b/test/model/block/initblock.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -58,4 +59,4 @@ r($dataList[6]) && p("blockData:module;blockData:type") && e('qa;'); r($dataList[7]) && p("blockInited;blockversion") && e('1;2'); // 获取空区块版本 r($dataList[7]) && p("blockData") && e('0'); // 获取空区块数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/block/save.php b/test/model/block/save.php index 55720fcf11..85c5f36c72 100755 --- a/test/model/block/save.php +++ b/test/model/block/save.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,10 @@ title=测试 blockModel->save(); cid=1 pid=1 - +测试修改block 名称 >> 欢迎test,my,8,welcome +测试修改block 模块 >> 我的贡献,my,8,dynamic +测试修改block 区块 >> 项目统计,my,8,projectteam +测试修改block 变量 >> 未关闭的产品,product,8,statistic */ @@ -51,4 +55,4 @@ r($block->saveTest($changeTitle, $blockID[0], $changeTitle->modules)) r($block->saveTest($changeModules, $blockID[0], $changModules->modules)) && p('title,module,grid,block') && e('我的贡献,my,8,dynamic'); // 测试修改block 模块 r($block->saveTest($changeBlock, $blockID[1], $changeBlock->modules, $changeBlock->moduleBlock)) && p('title,module,grid,block') && e('项目统计,my,8,projectteam'); // 测试修改block 区块 r($block->saveTest($changeParams, $blockID[2], $changeParams->modules, $changeParams->moduleBlock, $module)) && p('title,module,grid,block') && e('未关闭的产品,product,8,statistic'); // 测试修改block 变量 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/activate.php b/test/model/branch/activate.php index d6712b8da1..a8f2a83c28 100755 --- a/test/model/branch/activate.php +++ b/test/model/branch/activate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($branch->activateTest($branchID[2])) && p('id,status') && e('6,active'); // r($branch->activateTest($branchID[3])) && p('id,status') && e('8,active'); // 测试激活分支 8 r($branch->activateTest($branchID[4])) && p('id,status') && e('10,active'); // 测试激活分支 10 r($branch->activateTest($branchID[5])) && p('id,status') && e('1,active'); // 测试激活分支 1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/batchupdate.php b/test/model/branch/batchupdate.php index f24301e10d..f9103b18f4 100755 --- a/test/model/branch/batchupdate.php +++ b/test/model/branch/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ $branch = new branchTest(); r($branch->batchUpdateTest($changeName)) && p('field,old,new') && e('name,分支9,修改分支9的名称'); // 测试批量更新名称 r($branch->batchUpdateTest($changeDesc)) && p('field,old,new') && e('desc,,修改分支9的描述'); // 测试批量更新描述 r($branch->batchUpdateTest($changeStatus)) && p('field,old,new') && e('status,active,closed'); // 测试批量更新状态 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/close.php b/test/model/branch/close.php index cf8da369d5..88efa4510b 100755 --- a/test/model/branch/close.php +++ b/test/model/branch/close.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($branch->closeTest($branchID[3])) && p('id,status') && e('4,closed'); // 测 r($branch->closeTest($branchID[4])) && p('id,status') && e('5,closed'); // 测试关闭branchID 5 r($branch->closeTest($branchID[5])) && p('id,status') && e('6,closed'); // 测试关闭branchID 6 r($branch->closeTest($branchID[0])) && p('id,status') && e('1,closed'); // 测试重复关闭branchID 1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/create.php b/test/model/branch/create.php index a36859b70d..203930993b 100755 --- a/test/model/branch/create.php +++ b/test/model/branch/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($branch->createTest($productID, $branch2)) && p('name,desc') && e('新建 r($branch->createTest($productID, $repeatName1)) && p() && e('分支名称已存在'); // 测试新建 重名新建分支1 r($branch->createTest($productID, $repeatName2)) && p() && e('分支名称已存在'); // 测试新建 重名分支1 r($branch->createTest($productID, $emptyName)) && p() && e('『名称』不能为空。'); // 测试新建 名称为空的分支 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/linkbranch4project.php b/test/model/branch/linkbranch4project.php index bef7c4a536..0dcb9d9cd1 100755 --- a/test/model/branch/linkbranch4project.php +++ b/test/model/branch/linkbranch4project.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($branch->linkBranch4ProjectTest($productID[1])) && p() && e('4'); // 测试关 r($branch->linkBranch4ProjectTest($productID[2])) && p() && e('4'); // 测试关联产品 43 的分支到项目 r($branch->linkBranch4ProjectTest($productID[3])) && p() && e('4'); // 测试关联产品 44 的分支到项目 r($branch->linkBranch4ProjectTest($productID[4])) && p() && e('4'); // 测试关联产品 45 的分支到项目 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/mergebranch.php b/test/model/branch/mergebranch.php index b51bcfa669..3067c80892 100755 --- a/test/model/branch/mergebranch.php +++ b/test/model/branch/mergebranch.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ $branch = new branchTest(); r($branch->mergeBranchTest($productID[0], $mergedBranches[0], $mergeBranch1)) && p() && e('2'); // 测试合并分支 1 到 分支 2 r($branch->mergeBranchTest($productID[0], $mergedBranches[1], $mergeBranch2)) && p() && e('2'); // 测试合并分支 2 到 新建分支 r($branch->mergeBranchTest($productID[1], $mergedBranches[2], $mergeBranch3)) && p() && e('12'); // 测试合并分支 3 4 到 主干 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/sort.php b/test/model/branch/sort.php index d5af203c7c..dfa5a41252 100755 --- a/test/model/branch/sort.php +++ b/test/model/branch/sort.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($branch->sortTest($branches[0], $order)) && p() && e('2,1'); // 测试产品 4 r($branch->sortTest($branches[1], $order)) && p() && e('4,3'); // 测试产品 42 order 排序 r($branch->sortTest($branches[2], $order)) && p() && e('6,5'); // 测试产品 43 order 排序 r($branch->sortTest($branches[3], $order)) && p() && e('8,7'); // 测试产品 44 order 排序 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/unlinkbranch4project.php b/test/model/branch/unlinkbranch4project.php index dba58b6b02..1afc8d226b 100755 --- a/test/model/branch/unlinkbranch4project.php +++ b/test/model/branch/unlinkbranch4project.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ r($branch->unlinkBranch4ProjectTest($productIDList[0])) && p() && e('0'); // 测 r($branch->unlinkBranch4ProjectTest($productIDList[1])) && p() && e('0'); // 测试产品 42 转为普通产品接触分支关联 r($branch->unlinkBranch4ProjectTest($productIDList[2])) && p() && e('0'); // 测试产品 43 转为普通产品接触分支关联 r($branch->unlinkBranch4ProjectTest($productIDList[3])) && p() && e('0'); // 测试产品 44 45 转为普通产品接触分支关联 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/branch/update.php b/test/model/branch/update.php index e75ab4056b..9cb4d38654 100755 --- a/test/model/branch/update.php +++ b/test/model/branch/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($branch->updateTest($changeStatus)) && p('0:field,old,new') && e('status,activ r($branch->updateTest($changeDesc)) && p('0:field,old,new') && e('desc,,修改后的分支1描述'); // 测试修改分支描述 r($branch->updateTest($emptyName)) && p('name:0') && e('『名称』不能为空。'); // 测试修改分支名称 r($branch->updateTest($repeatName)) && p('name:0') && e('分支名称已存在'); // 测试修改分支名称 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/activate.php b/test/model/bug/activate.php index 9c308f403c..6240cced21 100755 --- a/test/model/bug/activate.php +++ b/test/model/bug/activate.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -9,16 +10,15 @@ title=bugModel->activate(); cid=1 pid=1 -测试激活状态为active的bug1 >> activatedCount,0,1 -测试激活状态为active的bug2 >> activatedCount,0,1 +测试激活状态为active的bug1 >> activatedCount,0,1 +测试激活状态为active的bug2 >> activatedCount,0,1 测试激活状态为resolved的bug51 >> assignedTo,dev1,admin;activatedCount,0,1 测试激活状态为resolved的bug52 >> assignedTo,dev1,admin;activatedCount,0,1 -测试激活状态为closed的bug81 >> assignedTo,test1,admin;activatedCount,0,1 -测试激活状态为closed的bug82 >> assignedTo,test1,admin;activatedCount,0,1 +测试激活状态为closed的bug81 >> assignedTo,test1,admin;activatedCount,0,1 +测试激活状态为closed的bug82 >> assignedTo,test1,admin;activatedCount,0,1 */ - $bugIDList = array('1', '2', '51', '52', '81', '82'); $bug=new bugTest(); @@ -28,4 +28,4 @@ r($bug->activateObject($bugIDList[2])) && p('0:field,old,new;2:field,old,new') & r($bug->activateObject($bugIDList[3])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,dev1,admin;activatedCount,0,1'); // 测试激活状态为resolved的bug52 r($bug->activateObject($bugIDList[4])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,test1,admin;activatedCount,0,1'); // 测试激活状态为closed的bug81 r($bug->activateObject($bugIDList[5])) && p('0:field,old,new;2:field,old,new') && e('assignedTo,test1,admin;activatedCount,0,1'); // 测试激活状态为closed的bug82 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/assign.php b/test/model/bug/assign.php index 4dec264826..16806378cc 100755 --- a/test/model/bug/assign.php +++ b/test/model/bug/assign.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,12 @@ title=bugModel->assign(); cid=1 pid=1 -指派bugID为1的bug >> assignedTo,admin,user92 -指派bugID为2的bug >> assignedTo,admin,user93 -指派bugID为3的bug >> assignedTo,admin,user94 -指派bugID为4的bug >> assignedTo,admin,user95 -指派bugID为51的bug >> assignedTo,dev1,user96 -指派bugid为81的bug >> assignedTo,test1,user97 +指派bugID为1的bug >> assignedTo,admin,user92 +指派bugID为2的bug >> assignedTo,admin,user93 +指派bugID为3的bug >> assignedTo,admin,user94 +指派bugID为4的bug >> assignedTo,admin,user95 +指派bugID为51的bug >> assignedTo,dev1,user96 +指派bugID为81的bug >> assignedTo,test1,user97 指派人不发生变化的bug >> 0 */ @@ -37,4 +38,4 @@ r($bug->assignTest($bugIDlist[3],$bug4)) && p('0:field,old,new') && e('assigned r($bug->assignTest($bugIDlist[4],$bug51)) && p('0:field,old,new') && e('assignedTo,dev1,user96'); // 指派bugID为51的bug r($bug->assignTest($bugIDlist[5],$bug81)) && p('0:field,old,new') && e('assignedTo,test1,user97'); // 指派bugID为81的bug r($bug->assignTest($bugIDlist[5],$bug81)) && p() && e('0'); // 指派人不发生变化的bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchactivate.php b/test/model/bug/batchactivate.php index 089982a587..847020e83c 100755 --- a/test/model/bug/batchactivate.php +++ b/test/model/bug/batchactivate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -18,4 +19,4 @@ $bugIDList = array('1' => '1', '52' => '53', '82' => '82'); $bug = new bugTest(); r($bug->batchActivateObject($bugIDList)) && p('53:status;82:status') && e('active;active'); // 测试批量激活bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchchangebranch.php b/test/model/bug/batchchangebranch.php index 212cddc86d..29a6c1687b 100755 --- a/test/model/bug/batchchangebranch.php +++ b/test/model/bug/batchchangebranch.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,17 +12,17 @@ cid=1 pid=1 修改分支为主干 未发生变化 >> 0 -修改分支为分支11 >> branch,0,11 -修改分支为分支12 >> branch,11,12 +修改分支为分支11 >> branch,0,11 +修改分支为分支12 >> branch,11,12 修改分支为主干 未发生变化 >> 0 -修改分支为分支9 >> branch,0,9 -修改分支为分支10 >> branch,9,10 +修改分支为分支9 >> branch,0,9 +修改分支为分支10 >> branch,9,10 修改分支为主干 未发生变化 >> 0 -修改分支为分支7 >> branch,0,7 -修改分支为分支8 >> branch,7,8 +修改分支为分支7 >> branch,0,7 +修改分支为分支8 >> branch,7,8 修改分支为主干 未发生变化 >> 0 -修改分支为分支37 >> branch,0,37 -修改分支为分支38 >> branch,37,38 +修改分支为分支37 >> branch,0,37 +修改分支为分支38 >> branch,37,38 */ @@ -35,7 +36,6 @@ $branchList2 = array('0', '9', '10'); $branchList3 = array('0', '7', '8'); $branchList4 = array('0', '37', '38'); - $bug = new bugTest(); r($bug->batchChangeBranchTest($bugIDList1, $branchList1[0], $bugIDList1[0])) && p() && e('0'); // 修改分支为主干 未发生变化 r($bug->batchChangeBranchTest($bugIDList1, $branchList1[1], $bugIDList1[1])) && p('0:field,old,new') && e('branch,0,11'); // 修改分支为分支11 @@ -49,4 +49,4 @@ r($bug->batchChangeBranchTest($bugIDList3, $branchList3[2], $bugIDList3[2])) && r($bug->batchChangeBranchTest($bugIDList4, $branchList4[0], $bugIDList4[0])) && p() && e('0'); // 修改分支为主干 未发生变化 r($bug->batchChangeBranchTest($bugIDList4, $branchList4[1], $bugIDList4[1])) && p('0:field,old,new') && e('branch,0,37'); // 修改分支为分支37 r($bug->batchChangeBranchTest($bugIDList4, $branchList4[2], $bugIDList4[2])) && p('0:field,old,new') && e('branch,37,38'); // 修改分支为分支38 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchchangemodule.php b/test/model/bug/batchchangemodule.php index ee16b9ded9..c7f816942d 100755 --- a/test/model/bug/batchchangemodule.php +++ b/test/model/bug/batchchangemodule.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,29 +11,29 @@ title=测试bugModel->batchChangeModule(); cid=1 pid=1 -修改bug1 2模块为0 >> module,1821,0 -修改bug1 2模块为8 >> module,0,8 -修改bug1 2模块为9 >> module,8,9 -修改bug1 2模块为10 >> module,9,10 -修改bug1 2模块为11 >> module,10,11 +修改bug1 2模块为0 >> module,1821,0 +修改bug1 2模块为8 >> module,0,8 +修改bug1 2模块为9 >> module,8,9 +修改bug1 2模块为10 >> module,9,10 +修改bug1 2模块为11 >> module,10,11 修改bug1 2模块为11 未发生变化 >> 0 -修改bug1 3模块为0 >> module,11,0 -修改bug1 3模块为8 >> module,0,8 -修改bug1 3模块为9 >> module,8,9 -修改bug1 3模块为10 >> module,9,10 -修改bug1 3模块为11 >> module,10,11 +修改bug1 3模块为0 >> module,11,0 +修改bug1 3模块为8 >> module,0,8 +修改bug1 3模块为9 >> module,8,9 +修改bug1 3模块为10 >> module,9,10 +修改bug1 3模块为11 >> module,10,11 修改bug1 3模块为11 未发生变化 >> 0 -修改bug1 4模块为0 >> module,11,0 -修改bug1 4模块为8 >> module,0,8 -修改bug1 4模块为9 >> module,8,9 -修改bug1 4模块为10 >> module,9,10 -修改bug1 4模块为11 >> module,10,11 +修改bug1 4模块为0 >> module,11,0 +修改bug1 4模块为8 >> module,0,8 +修改bug1 4模块为9 >> module,8,9 +修改bug1 4模块为10 >> module,9,10 +修改bug1 4模块为11 >> module,10,11 修改bug1 4模块为11 未发生变化 >> 0 -修改bug2 3模块为0 >> module,11,0 -修改bug2 3模块为8 >> module,0,8 -修改bug2 3模块为9 >> module,8,9 -修改bug2 3模块为10 >> module,9,10 -修改bug2 3模块为11 >> module,10,11 +修改bug2 3模块为0 >> module,11,0 +修改bug2 3模块为8 >> module,0,8 +修改bug2 3模块为9 >> module,8,9 +修改bug2 3模块为10 >> module,9,10 +修改bug2 3模块为11 >> module,10,11 修改bug2 3模块为11 未发生变化 >> 0 */ @@ -44,7 +45,6 @@ $bugIDList4 = array('2', '3'); $moduleList = array('0', '8', '9', '10', '11'); - $bug = new bugTest(); r($bug->batchChangeModuleTest($bugIDList1, $moduleList[0], $bugIDList1[0])) && p('0:field,old,new') && e('module,1821,0');// 修改bug1 2模块为0 r($bug->batchChangeModuleTest($bugIDList1, $moduleList[1], $bugIDList1[1])) && p('0:field,old,new') && e('module,0,8'); // 修改bug1 2模块为8 @@ -70,4 +70,4 @@ r($bug->batchChangeModuleTest($bugIDList4, $moduleList[2], $bugIDList4[0])) && p r($bug->batchChangeModuleTest($bugIDList4, $moduleList[3], $bugIDList4[1])) && p('0:field,old,new') && e('module,9,10'); // 修改bug2 3模块为10 r($bug->batchChangeModuleTest($bugIDList4, $moduleList[4], $bugIDList4[0])) && p('0:field,old,new') && e('module,10,11'); // 修改bug2 3模块为11 r($bug->batchChangeModuleTest($bugIDList4, $moduleList[4], $bugIDList4[1])) && p() && e('0'); // 修改bug2 3模块为11 未发生变化 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchchangeplan.php b/test/model/bug/batchchangeplan.php index c4e8a13038..788d3c71fd 100755 --- a/test/model/bug/batchchangeplan.php +++ b/test/model/bug/batchchangeplan.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,17 +12,17 @@ cid=1 pid=1 修改计划为0 未发生变化 >> 0 -修改计划为计划1 >> plan,0,1 -修改计划为计划2 >> plan,1,2 +修改计划为计划1 >> plan,0,1 +修改计划为计划2 >> plan,1,2 修改计划为0 未发生变化 >> 0 -修改计划为计划1 >> plan,0,1 -修改计划为计划2 >> plan,1,2 +修改计划为计划1 >> plan,0,1 +修改计划为计划2 >> plan,1,2 修改计划为0 未发生变化 >> 0 -修改计划为计划1 >> plan,0,1 -修改计划为计划2 >> plan,1,2 +修改计划为计划1 >> plan,0,1 +修改计划为计划2 >> plan,1,2 修改计划为0 未发生变化 >> 0 -修改计划为计划1 >> plan,0,1 -修改计划为计划2 >> plan,1,2 +修改计划为计划1 >> plan,0,1 +修改计划为计划2 >> plan,1,2 */ @@ -32,7 +33,6 @@ $bugIDList4 = array('175', '176', '177'); $planList = array('0', '1', '2'); - $bug = new bugTest(); r($bug->batchChangePlanTest($bugIDList1, $planList[0], $bugIDList1[0])) && p() && e('0'); // 修改计划为0 未发生变化 r($bug->batchChangePlanTest($bugIDList1, $planList[1], $bugIDList1[1])) && p('0:field,old,new') && e('plan,0,1'); // 修改计划为计划1 @@ -46,4 +46,4 @@ r($bug->batchChangePlanTest($bugIDList3, $planList[2], $bugIDList3[2])) && p('0: r($bug->batchChangePlanTest($bugIDList4, $planList[0], $bugIDList4[0])) && p() && e('0'); // 修改计划为0 未发生变化 r($bug->batchChangePlanTest($bugIDList4, $planList[1], $bugIDList4[1])) && p('0:field,old,new') && e('plan,0,1'); // 修改计划为计划1 r($bug->batchChangePlanTest($bugIDList4, $planList[2], $bugIDList4[2])) && p('0:field,old,new') && e('plan,1,2'); // 修改计划为计划2 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchconfirm.php b/test/model/bug/batchconfirm.php index ffc7081677..fa89aafd42 100755 --- a/test/model/bug/batchconfirm.php +++ b/test/model/bug/batchconfirm.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,7 +12,8 @@ cid=1 pid=1 批量确认1 3 4 51 81 >> ,1,1,1,1,1 -批量确认2 7 >> ,1,1 +批量确认2 7 >> ,1,1 + */ $bugIDlist1 = array('1','3','4','51','81'); @@ -21,4 +23,4 @@ $bugIDlist2 = array('2', '7'); $bug = new bugTest(); r($bug->batchConfirmTest($bugIDlist1)) && p() && e(',1,1,1,1,1'); // 批量确认1 3 4 51 81 r($bug->batchConfirmTest($bugIDlist2)) && p() && e(',1,1'); // 批量确认2 7 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchcreate.php b/test/model/bug/batchcreate.php index affb66104f..cb87c6dd55 100755 --- a/test/model/bug/batchcreate.php +++ b/test/model/bug/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,11 @@ title=bugModel->batchCreate(); cid=1 pid=1 -测试正常批量创建bug1 >> 批量bug一,trunk,3,codeerror,3,3,1,101 -测试正常批量创建bug2 >> 批量bug五,trunk,codeerror,3,3,1,101 -测试正常批量创建bug3 >> 批量bug九,1,config,3,3,1,0 -测试短时间内重复批量创建bug >> 0 -测试异常创建bug >> 『影响版本』不能为空。 - +测试正常批量创建bug1 >> 批量bug一,trunk,3,codeerror,3,3,1,101 +测试正常批量创建bug2 >> 批量bug五,trunk,codeerror,3,3,1,101 +测试正常批量创建bug3 >> 批量bug九,1,config,3,3,1,0 +测试短时间内重复批量创建bug >> 0 +测试异常创建bug >> 『影响版本』不能为空。 */ @@ -30,7 +30,6 @@ $normal_create1 = array('title' => $title, 'types' => $type, 'openedBuilds' => $ $title = array('批量bug四','批量bug五','批量bug六'); $normal_create2 = array('title' => $title, 'types' => $type, 'openedBuilds' => $openedBuild, 'severity' => $severity); - $title = array('批量bug七','批量bug八','批量bug九'); $normal_create3 = array('title' => $title, 'types' => $type, 'openedBuilds' => $openedBuild, 'severity' => $severity); @@ -45,4 +44,4 @@ r($bug->batchCreateObject($productID, $normal_create3)) && p('2:title,openedBu r($bug->batchCreateObject($productID, $normal_create1)) && p() && e('0'); // 测试短时间内重复批量创建bug r($bug->batchCreateObject($productID, $exception_create)) && p('message:0') && e("『影响版本』不能为空。"); // 测试异常创建bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchresolve.php b/test/model/bug/batchresolve.php index a31426bd32..06bdbcff07 100755 --- a/test/model/bug/batchresolve.php +++ b/test/model/bug/batchresolve.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,15 +11,15 @@ title=测试bugModel->batchResolve(); cid=1 pid=1 -解决bug1 2 3,解决方式为bydesign >> resolution,,bydesign;status,active,resolved -解决bug4 5 6,解决方式为duplicate >> resolution,,duplicate;status,active,resolved -解决bug7 8 9,解决方式为external >> resolution,,external;status,active,resolved -解决bug10 11 12,解决方式为fixed >> resolution,,fixed;status,active,resolved -解决bug13 14 15,解决方式为notrepro >> resolution,,notrepro;status,active,resolved -解决bug16 17 18,解决方式为postponed >> resolution,,postponed;status,active,resolved +解决bug1 2 3,解决方式为bydesign >> resolution,,bydesign;status,active,resolved +解决bug4 5 6,解决方式为duplicate >> resolution,,duplicate;status,active,resolved +解决bug7 8 9,解决方式为external >> resolution,,external;status,active,resolved +解决bug10 11 12,解决方式为fixed >> resolution,,fixed;status,active,resolved +解决bug13 14 15,解决方式为notrepro >> resolution,,notrepro;status,active,resolved +解决bug16 17 18,解决方式为postponed >> resolution,,postponed;status,active,resolved 解决bug19 20 21,解决方式为willnotfix >> resolution,,willnotfix;status,active,resolved -解决bug22 23 24,解决方式为tostory >> resolution,,tostory;status,active,resolved -解决bug状态为resolve的bug >> 0 +解决bug22 23 24,解决方式为tostory >> resolution,,tostory;status,active,resolved +解决bug状态为resolve的bug >> 0 */ @@ -33,7 +34,6 @@ $bugIDList8 = array('22', '23', '24'); $resolutionList = array('bydesign', 'duplicate', 'external', 'fixed', 'notrepro', 'postponed', 'willnotfix', 'tostory'); - $bug = new bugTest(); r($bug->batchResolveTest($bugIDList1, $resolutionList[0], $bugIDList1[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,bydesign;status,active,resolved'); // 解决bug1 2 3,解决方式为bydesign r($bug->batchResolveTest($bugIDList2, $resolutionList[1], $bugIDList2[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,duplicate;status,active,resolved'); // 解决bug4 5 6,解决方式为duplicate @@ -44,4 +44,4 @@ r($bug->batchResolveTest($bugIDList6, $resolutionList[5], $bugIDList6[0])) && p( r($bug->batchResolveTest($bugIDList7, $resolutionList[6], $bugIDList7[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,willnotfix;status,active,resolved'); // 解决bug19 20 21,解决方式为willnotfix r($bug->batchResolveTest($bugIDList8, $resolutionList[7], $bugIDList8[0])) && p('0:field,old,new;3:field,old,new') && e('resolution,,tostory;status,active,resolved'); // 解决bug22 23 24,解决方式为tostory r($bug->batchResolveTest($bugIDList8, $resolutionList[7], $bugIDList8[0])) && p('0:field,old,new;3:field,old,new') && e('0'); // 解决bug状态为resolve的bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/batchupdate.php b/test/model/bug/batchupdate.php index d949c30402..e31ee7e282 100755 --- a/test/model/bug/batchupdate.php +++ b/test/model/bug/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ $bug = new bugTest(); r($bug->batchUpdateObject($bugIDList, $title[$bugIDList[0]], $type[$bugIDList[0]], $bugIDList[0])) && p('0:field,old,new;1:field,old,new') && e('type,codeerror,config;title,BUG1,批量修改bug一'); // 测试批量修改bug1 r($bug->batchUpdateObject($bugIDList, $title[$bugIDList[1]], $type[$bugIDList[1]], $bugIDList[1])) && p('0:field,old,new;1:field,old,new') && e('type,config,install;title,BUG2,批量修改bug二'); // 测试批量修改bug2 r($bug->batchUpdateObject($bugIDList, $title[$bugIDList[2]], $type[$bugIDList[2]], $bugIDList[2])) && p('0:field,old,new;1:field,old,new') && e('type,install,security;title,BUG3,批量修改bug三'); // 测试批量修改bug3 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/checkdelayedbug.php b/test/model/bug/checkdelayedbug.php index e00159c9aa..67a4d5caa3 100755 --- a/test/model/bug/checkdelayedbug.php +++ b/test/model/bug/checkdelayedbug.php @@ -10,9 +10,9 @@ title=bugModel->checkDelayBug(); cid=1 pid=1 -检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期 >> 1 -检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期 >> 1 -检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期 >> 1 +检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期 >> 1 +检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期 >> 1 +检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期 >> 1 检查deadline在3天前 resolvedDate在1天前 状态为未解决的bug是否延期 >> 2 检查deadline在3天前 resolvedDate在1天前 状态为已解决的bug是否延期 >> 2 检查deadline在3天前 resolvedDate在1天前 状态为已关闭的bug是否延期 >> 2 @@ -65,4 +65,4 @@ r($bug->checkDelayBugTest($bug4, $statusList[1])) && p('delay') && e('1'); // r($bug->checkDelayBugTest($bug4, $statusList[2])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为已关闭的bug是否延期 r($bug->checkDelayBugTest($bug5, $statusList[0])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为未解决的bug是否延期 r($bug->checkDelayBugTest($bug5, $statusList[1])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已解决的bug是否延期 -r($bug->checkDelayBugTest($bug5, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期 +r($bug->checkDelayBugTest($bug5, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期 \ No newline at end of file diff --git a/test/model/bug/checkdelayedbugs.php b/test/model/bug/checkdelayedbugs.php index f2fd4bc2f1..dc986eea4d 100755 --- a/test/model/bug/checkdelayedbugs.php +++ b/test/model/bug/checkdelayedbugs.php @@ -17,8 +17,6 @@ pid=1 检查deadline在resolvedDate前 状态为已关闭的bug是否延期 >> 15,13,11 检查deadline在resolvedDate后 状态为已关闭的bug是否延期 >> 6,4,2 - - */ $productIDList = array('1', '7','18', '20', '28', '33'); @@ -29,4 +27,4 @@ r($bug->checkDelayedBugsTest($productIDList[1])) && p('delay') && e('2,0,0,25'); r($bug->checkDelayedBugsTest($productIDList[2])) && p('delay') && e('16,14,12'); // 检查deadline在resolvedDate前 状态为已解决的bug是否延期 r($bug->checkDelayedBugsTest($productIDList[3])) && p('delay') && e('4,2,0'); // 检查deadline在resolvedDate后 状态为已解决的bug是否延期 r($bug->checkDelayedBugsTest($productIDList[4])) && p('delay') && e('15,13,11'); // 检查deadline在resolvedDate前 状态为已关闭的bug是否延期 -r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期 +r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期 \ No newline at end of file diff --git a/test/model/bug/close.php b/test/model/bug/close.php index 6e46f2c695..8890514375 100755 --- a/test/model/bug/close.php +++ b/test/model/bug/close.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -9,14 +10,14 @@ title=bugModel->close(); cid=1 pid=1 -测试关闭状态为active的bug1 >> assignedTo,admin,closed;status,active,closed -测试关闭状态为active的bug2 >> assignedTo,admin,closed;status,active,closed +测试关闭状态为active的bug1 >> assignedTo,admin,closed;status,active,closed +测试关闭状态为active的bug2 >> assignedTo,admin,closed;status,active,closed 测试关闭状态为resolved的bug51 >> assignedTo,dev1,closed;status,resolved,closed 测试关闭状态为resolved的bug52 >> assignedTo,dev1,closed;status,resolved,closed -测试关闭状态为closed的bug81 >> assignedTo,dev1,closed;status,active,closed -测试关闭状态为closed的bug82 >> assignedTo,dev1,closed;status,active,closed -*/ +测试关闭状态为closed的bug81 >> assignedTo,dev1,closed;status,active,closed +测试关闭状态为closed的bug82 >> assignedTo,dev1,closed;status,active,closed +*/ $bugIDList = array('1', '2', '51', '52', '34', '36'); @@ -27,4 +28,4 @@ r($bug->closeObject($bugIDList[2])) && p('0:field,old,new;1:field,old,new') && e r($bug->closeObject($bugIDList[3])) && p('0:field,old,new;1:field,old,new') && e('assignedTo,dev1,closed;status,resolved,closed'); // 测试关闭状态为resolved的bug52 r($bug->closeObject($bugIDList[4])) && p('0:field,old,new;1:field,old,new') && e('assignedTo,dev1,closed;status,active,closed'); // 测试关闭状态为closed的bug81 r($bug->closeObject($bugIDList[5])) && p('0:field,old,new;1:field,old,new') && e('assignedTo,dev1,closed;status,active,closed'); // 测试关闭状态为closed的bug82 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/confirm.php b/test/model/bug/confirm.php index 311839d258..ae2dd106f2 100755 --- a/test/model/bug/confirm.php +++ b/test/model/bug/confirm.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,10 +12,10 @@ cid=1 pid=1 确认指派人变化的bug >> assignedTo,admin,user92;confirmed,0,1 -确认类型变化的bug >> type,install,codeerror;confirmed,0,1 -确认已确认的bug >> assignedTo,admin,user95 +确认类型变化的bug >> type,install,codeerror;confirmed,0,1 +确认已确认的bug >> assignedTo,admin,user95 确认优先级变化的bug >> status,resolved,active;pri,3,2 -确认bug >> status,closed,active +确认bug >> status,closed,active */ @@ -32,4 +33,4 @@ r($bug->confirmTest($bugIDlist[1],$bug3)) && p('0:field,old,new;1:field,old,new' r($bug->confirmTest($bugIDlist[2],$bug4)) && p('0:field,old,new') && e('assignedTo,admin,user95'); // 确认已确认的bug r($bug->confirmTest($bugIDlist[3],$bug5)) && p('0:field,old,new;1:field,old,new') && e('status,resolved,active;pri,3,2'); // 确认优先级变化的bug r($bug->confirmTest($bugIDlist[4],$bug8)) && p('0:field,old,new') && e('status,closed,active'); // 确认bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/create.php b/test/model/bug/create.php index b9197ba2ae..b96e967010 100755 --- a/test/model/bug/create.php +++ b/test/model/bug/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -18,10 +19,10 @@ pid=1 测试正常的创建标准规范bug >> active 测试正常的创建测试脚本bug >> admin 测试正常的创建设计缺陷bug >> 3 -测试正常的创建其他bug >> 2021-03-19 -测试不输入名称创建bug >> 『Bug标题』不能为空。 +测试正常的创建其他bug >> 2021-03-19 +测试不输入名称创建bug >> 『Bug标题』不能为空。 测试不输入影响版本创建bug >> 『影响版本』不能为空。 -测试指派人bug >> user92 +测试指派人bug >> user92 */ @@ -52,4 +53,4 @@ r($bug->createObject($b_notitle)) && p('title:0') && e('『Bug标题 r($bug->createObject($b_nobuild)) && p('openedBuild:0') && e('『影响版本』不能为空。'); // 测试不输入影响版本创建bug r($bug->createObject($b_assign)) && p('assignedTo') && e('user92'); // 测试指派人bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/createbugfromgitlabissue.php b/test/model/bug/createbugfromgitlabissue.php index c481435603..53b9b16cc1 100755 --- a/test/model/bug/createbugfromgitlabissue.php +++ b/test/model/bug/createbugfromgitlabissue.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,12 @@ title=bugModel->createBugFromGitlabIssue (); cid=1 pid=1 -测试正常的创建来源于gitlab issue的bug的title >> 问题1 +测试正常的创建来源于gitlab issue的bug的title >> 问题1 测试正常的创建来源于gitlab issue的bug的execution >> 101 -测试正常的创建来源于gitlab issue的bug的pri >> 3 -测试正常的创建来源于gitlab issue的bug的severity >> 3 -测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。 -测试短时间内重复创建来源于gitlab issue的bug >> 0 +测试正常的创建来源于gitlab issue的bug的pri >> 3 +测试正常的创建来源于gitlab issue的bug的severity >> 3 +测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。 +测试短时间内重复创建来源于gitlab issue的bug >> 0 */ @@ -25,7 +26,6 @@ $bug1 = new stdclass(); $bug1->title = '问题1'; $bug1->execution = $executionID; - $bug2 = new stdclass(); $bug2->title = '问题2'; $bug2->execution = $executionID; @@ -50,4 +50,4 @@ r($bug->createBugFromGitlabIssueTest($bug4, $executionID)) && p('severity') r($bug->createBugFromGitlabIssueTest($bug5, $executionID)) && p('title:0') && e('『Bug标题』不能为空。'); // 测试创建没有标题 来源于gitlab issue的异常bug r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('task') && e('0'); // 测试短时间内重复创建来源于gitlab issue的bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/extractaccountsfromlist.php b/test/model/bug/extractaccountsfromlist.php index 802849e893..2f4bd305c7 100755 --- a/test/model/bug/extractaccountsfromlist.php +++ b/test/model/bug/extractaccountsfromlist.php @@ -9,17 +9,15 @@ title=bugModel->extractAccountsFromList(); cid=1 pid=1 -测试提取bug1 2 3的用户 >> admin; -测试提取bug4 5 6的用户 >> admin; +测试提取bug1 2 3的用户 >> admin; +测试提取bug4 5 6的用户 >> admin; 测试提取bug51 52 53的用户 >> admin;dev1 测试提取bug54 55 56的用户 >> admin;dev1 测试提取bug81 82 83的用户 >> admin;test1 测试提取bug84 85 86的用户 >> admin;test1 - */ - $bugIDList1 = array('1', '2', '3'); $bugIDList2 = array('4', '5', '6'); $bugIDList3 = array('51', '52', '53'); @@ -33,4 +31,4 @@ r($bug->extractAccountsFromListTest($bugIDList2)) && p('0;1') && e('admin;'); r($bug->extractAccountsFromListTest($bugIDList3)) && p('0;1') && e('admin;dev1'); // 测试提取bug51 52 53的用户 r($bug->extractAccountsFromListTest($bugIDList4)) && p('0;1') && e('admin;dev1'); // 测试提取bug54 55 56的用户 r($bug->extractAccountsFromListTest($bugIDList5)) && p('0;1') && e('admin;test1'); // 测试提取bug81 82 83的用户 -r($bug->extractAccountsFromListTest($bugIDList6)) && p('0;1') && e('admin;test1'); // 测试提取bug84 85 86的用户 +r($bug->extractAccountsFromListTest($bugIDList6)) && p('0;1') && e('admin;test1'); // 测试提取bug84 85 86的用户 \ No newline at end of file diff --git a/test/model/bug/extractaccountsfromsingle.php b/test/model/bug/extractaccountsfromsingle.php index 97b1f68a83..7197276995 100755 --- a/test/model/bug/extractaccountsfromsingle.php +++ b/test/model/bug/extractaccountsfromsingle.php @@ -30,7 +30,6 @@ pid=1 */ - $bugIDList1 = array('1', '2', '3'); $bugIDList2 = array('4', '5', '6'); $bugIDList3 = array('51', '52', '53'); @@ -56,4 +55,4 @@ r($bug->extractAccountsFromSingleTest($bugIDList5[1])) && p('0;1') && e('admin;t r($bug->extractAccountsFromSingleTest($bugIDList5[2])) && p('0;1') && e('admin;test1'); // 测试提取bug83的用户 r($bug->extractAccountsFromSingleTest($bugIDList6[0])) && p('0;1') && e('admin;test1'); // 测试提取bug84的用户 r($bug->extractAccountsFromSingleTest($bugIDList6[1])) && p('0;1') && e('admin;test1'); // 测试提取bug85的用户 -r($bug->extractAccountsFromSingleTest($bugIDList6[2])) && p('0;1') && e('admin;test1'); // 测试提取bug86的用户 +r($bug->extractAccountsFromSingleTest($bugIDList6[2])) && p('0;1') && e('admin;test1'); // 测试提取bug86的用户 \ No newline at end of file diff --git a/test/model/bug/formcustomedbugs.php b/test/model/bug/formcustomedbugs.php index b962f4bb80..0702fa184f 100755 --- a/test/model/bug/formcustomedbugs.php +++ b/test/model/bug/formcustomedbugs.php @@ -10,11 +10,11 @@ title=测试bugModel->formCustomedBugs(); cid=1 pid=1 -获取bug 1 2的module story task case execution名称 >> 产品模块1,软件需求2,0,0,迭代1;产品模块2,软件需求6,0,0,迭代1 -获取bug 3 4的module story task case execution名称 >> 产品模块3,软件需求10,0,0,迭代1;产品模块5,软件需求14,0,0,迭代2 -获取bug 5 6的module story task case execution名称 >> 产品模块6,软件需求18,0,0,迭代2;产品模块7,软件需求22,0,0,迭代2 -获取bug 7 8的module story task case execution名称 >> 产品模块11,软件需求26,0,0,迭代3;产品模块12,软件需求30,0,0,迭代3 -获取bug 9 10的module story task case execution名称 >> 产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代4 +获取bug 1 2的module story task case execution名称 >> 产品模块1,软件需求2,0,0,迭代1;产品模块2,软件需求6,0,0,迭代1 +获取bug 3 4的module story task case execution名称 >> 产品模块3,软件需求10,0,0,迭代1;产品模块5,软件需求14,0,0,迭代2 +获取bug 5 6的module story task case execution名称 >> 产品模块6,软件需求18,0,0,迭代2;产品模块7,软件需求22,0,0,迭代2 +获取bug 7 8的module story task case execution名称 >> 产品模块11,软件需求26,0,0,迭代3;产品模块12,软件需求30,0,0,迭代3 +获取bug 9 10的module story task case execution名称 >> 产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代 */ @@ -29,4 +29,4 @@ r($bug->formCustomedBugsTest($bugIDList1)) && p('1:module,story,task,case,execut r($bug->formCustomedBugsTest($bugIDList2)) && p('3:module,story,task,case,execution;4:module,story,task,case,execution') && e('产品模块3,软件需求10,0,0,迭代1;产品模块5,软件需求14,0,0,迭代2'); // 获取bug 3 4的module story task case execution名称 r($bug->formCustomedBugsTest($bugIDList3)) && p('5:module,story,task,case,execution;6:module,story,task,case,execution') && e('产品模块6,软件需求18,0,0,迭代2;产品模块7,软件需求22,0,0,迭代2'); // 获取bug 5 6的module story task case execution名称 r($bug->formCustomedBugsTest($bugIDList4)) && p('7:module,story,task,case,execution;8:module,story,task,case,execution') && e('产品模块11,软件需求26,0,0,迭代3;产品模块12,软件需求30,0,0,迭代3'); // 获取bug 7 8的module story task case execution名称 -r($bug->formCustomedBugsTest($bugIDList5)) && p('9:module,story,task,case,execution;10:module,story,task,case,execution') && e('产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代'); // 获取bug 9 10的module story task case execution名称 +r($bug->formCustomedBugsTest($bugIDList5)) && p('9:module,story,task,case,execution;10:module,story,task,case,execution') && e('产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代'); // 获取bug 9 10的module story task case execution名称 \ No newline at end of file diff --git a/test/model/bug/getactiveandpostponedbugs.php b/test/model/bug/getactiveandpostponedbugs.php index b42432686b..95f93a4a7e 100755 --- a/test/model/bug/getactiveandpostponedbugs.php +++ b/test/model/bug/getactiveandpostponedbugs.php @@ -13,17 +13,15 @@ pid=1 查询产品1 2 3 不存在的产品1000001 execution为101下的bug >> BUG3,BUG2,BUG1 查询产品1 2 3 不存在的产品1000001 execution为102下的bug >> BUG6,BUG5,BUG4 查询产品1 2 3 不存在的产品1000001 execution为103下的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -查询产品1 3 execution为101下的bug >> BUG3,BUG2,BUG1 -查询产品1 3 execution为102下的bug >> 0 -查询产品1 3 execution为103下的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -查询产品1 execution为101下的bug >> BUG3,BUG2,BUG1 -查询产品1 execution为102下的bug >> 0 -查询产品1 execution为103下的bug >> 0 -查询不存在的产品1000001 execution为101下的bug >> 0 -查询不存在的产品1000001 execution为102下的bug >> 0 -查询不存在的产品1000001 execution为103下的bug >> 0 - - +查询产品1 3 execution为101下的bug >> BUG3,BUG2,BUG1 +查询产品1 3 execution为102下的bug >> 0 +查询产品1 3 execution为103下的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +查询产品1 execution为101下的bug >> BUG3,BUG2,BUG1 +查询产品1 execution为102下的bug >> 0 +查询产品1 execution为103下的bug >> 0 +查询不存在的产品1000001 execution为101下的bug >> 0 +查询不存在的产品1000001 execution为102下的bug >> 0 +查询不存在的产品1000001 execution为103下的bug >> 0 */ @@ -43,4 +41,4 @@ r($bug->getActiveAndPostponedBugsTest($productIDList[2], $executionList[1])) && r($bug->getActiveAndPostponedBugsTest($productIDList[2], $executionList[2])) && p() && e('0'); // 查询产品1 execution为103下的bug r($bug->getActiveAndPostponedBugsTest($productIDList[3], $executionList[0])) && p() && e('0'); // 查询不存在的产品1000001 execution为101下的bug r($bug->getActiveAndPostponedBugsTest($productIDList[3], $executionList[1])) && p() && e('0'); // 查询不存在的产品1000001 execution为102下的bug -r($bug->getActiveAndPostponedBugsTest($productIDList[3], $executionList[2])) && p() && e('0'); // 查询不存在的产品1000001 execution为103下的bug +r($bug->getActiveAndPostponedBugsTest($productIDList[3], $executionList[2])) && p() && e('0'); // 查询不存在的产品1000001 execution为103下的bug \ No newline at end of file diff --git a/test/model/bug/getactivebugs.php b/test/model/bug/getactivebugs.php index 107358a95a..6cdfddbb47 100755 --- a/test/model/bug/getactivebugs.php +++ b/test/model/bug/getactivebugs.php @@ -10,19 +10,18 @@ title=bugModel->getActiveBugs(); cid=1 pid=1 -查询产品1 2 3 不存在的产品1000001下 且不排除bug的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 -查询产品1 2 3 不存在的产品1000001下 且排除bug2的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG1 +查询产品1 2 3 不存在的产品1000001下 且不排除bug的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 +查询产品1 2 3 不存在的产品1000001下 且排除bug2的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG1 查询产品1 2 3 不存在的产品1000001下 且排除bug3 8的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG2,BUG1 -查询产品1 3下 且不排除bug的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 -查询产品1 3下 且排除bug2的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1 -查询产品1 3下 且排除bug3 8的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG2,BUG1 -查询产品1下 且不排除bug的bug >> BUG3,BUG2,BUG1 -查询产品1下 且排除bug2的bug >> BUG3,BUG1 -查询产品1下 且排除bug3 8的bug >> BUG2,BUG1 -查询不存在的产品1000001下 且不排除bug的bug >> 0 -查询不存在的产品1000001下 且排除bug2的bug >> 0 -查询不存在的产品1000001下 且排除bug3 8的bug >> 0 - +查询产品1 3下 且不排除bug的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 +查询产品1 3下 且排除bug2的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1 +查询产品1 3下 且排除bug3 8的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG2,BUG1 +查询产品1下 且不排除bug的bug >> BUG3,BUG2,BUG1 +查询产品1下 且排除bug2的bug >> BUG3,BUG1 +查询产品1下 且排除bug3 8的bug >> BUG2,BUG1 +查询不存在的产品1000001下 且不排除bug的bug >> 0 +查询不存在的产品1000001下 且排除bug2的bug >> 0 +查询不存在的产品1000001下 且排除bug3 8的bug >> 0 */ @@ -42,4 +41,4 @@ r($bug->getActiveBugsTest($productIDList[2], $statusList[1])) && p() && e('BUG3, r($bug->getActiveBugsTest($productIDList[2], $statusList[2])) && p() && e('BUG2,BUG1'); // 查询产品1下 且排除bug3 8的bug r($bug->getActiveBugsTest($productIDList[3], $statusList[0])) && p() && e('0'); // 查询不存在的产品1000001下 且不排除bug的bug r($bug->getActiveBugsTest($productIDList[3], $statusList[1])) && p() && e('0'); // 查询不存在的产品1000001下 且排除bug2的bug -r($bug->getActiveBugsTest($productIDList[3], $statusList[2])) && p() && e('0'); // 查询不存在的产品1000001下 且排除bug3 8的bug +r($bug->getActiveBugsTest($productIDList[3], $statusList[2])) && p() && e('0'); // 查询不存在的产品1000001下 且排除bug3 8的bug \ No newline at end of file diff --git a/test/model/bug/getallbugs.php b/test/model/bug/getallbugs.php index 075176cbae..d3c6502ef9 100755 --- a/test/model/bug/getallbugs.php +++ b/test/model/bug/getallbugs.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 +查询产品1 3与模块1821, 1825下的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getAllBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e( r($bug->getAllBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug r($bug->getAllBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug r($bug->getAllBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug -r($bug->getAllBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug +r($bug->getAllBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug \ No newline at end of file diff --git a/test/model/bug/getallprojectids.php b/test/model/bug/getallprojectids.php index dd6ff6101d..0ffecd572a 100755 --- a/test/model/bug/getallprojectids.php +++ b/test/model/bug/getallprojectids.php @@ -26,4 +26,4 @@ r($bug->getAllProjectIdsTest()) && p("$projectIDList[1]") && e('12'); // 测试p r($bug->getAllProjectIdsTest()) && p("$projectIDList[2]") && e('13'); // 测试projectId为13的项目 r($bug->getAllProjectIdsTest()) && p("$projectIDList[3]") && e('41'); // 测试projectId为41的项目 r($bug->getAllProjectIdsTest()) && p("$projectIDList[4]") && e('51'); // 测试projectId为51的项目 -r($bug->getAllProjectIdsTest()) && p("$projectIDList[5]") && e('91'); // 测试projectId为91的项目 +r($bug->getAllProjectIdsTest()) && p("$projectIDList[5]") && e('91'); // 测试projectId为91的项目 \ No newline at end of file diff --git a/test/model/bug/getbuginfofromresult.php b/test/model/bug/getbuginfofromresult.php index 78a8965cc5..6fb2899b2e 100755 --- a/test/model/bug/getbuginfofromresult.php +++ b/test/model/bug/getbuginfofromresult.php @@ -9,23 +9,21 @@ title=bugModel->getBugInfoFromResult(); cid=1 pid=1 -测试获取runID为0 caseID为2的bug >> 这个是测试用例2 -测试获取runID为0 caseID为6的bug >> 这个是测试用例6 -测试获取runID为0 caseID为10的bug >> 这个是测试用例10 -测试获取runID为2 caseID为2的bug >> 这个是测试用例2 -测试获取runID为2 caseID为6的bug >> 这个是测试用例6 -测试获取runID为2 caseID为10的bug >> 这个是测试用例10 -测试获取runID为6 caseID为2的bug >> 这个是测试用例2 -测试获取runID为6 caseID为6的bug >> 这个是测试用例6 -测试获取runID为6 caseID为10的bug >> 这个是测试用例10 -测试获取runID为10 caseID为2的bug >> 这个是测试用例2 -测试获取runID为10 caseID为6的bug >> 这个是测试用例6 +测试获取runID为0 caseID为2的bug >> 这个是测试用例2 +测试获取runID为0 caseID为6的bug >> 这个是测试用例6 +测试获取runID为0 caseID为10的bug >> 这个是测试用例10 +测试获取runID为2 caseID为2的bug >> 这个是测试用例2 +测试获取runID为2 caseID为6的bug >> 这个是测试用例6 +测试获取runID为2 caseID为10的bug >> 这个是测试用例10 +测试获取runID为6 caseID为2的bug >> 这个是测试用例2 +测试获取runID为6 caseID为6的bug >> 这个是测试用例6 +测试获取runID为6 caseID为10的bug >> 这个是测试用例10 +测试获取runID为10 caseID为2的bug >> 这个是测试用例2 +测试获取runID为10 caseID为6的bug >> 这个是测试用例6 测试获取runID为10 caseID为10的bug >> 这个是测试用例10 - */ - $runIDList = array('0', '2', '6', '10'); $caseIDList = array('0', '2', '6', '10'); @@ -42,4 +40,4 @@ r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[2])) && p() && e(' r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为6 caseID为10的bug r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为10 caseID为2的bug r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为10 caseID为6的bug -r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为10 caseID为10的bug +r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为10 caseID为10的bug \ No newline at end of file diff --git a/test/model/bug/getbugquery.php b/test/model/bug/getbugquery.php index cd4d92ccc1..045f15f3df 100755 --- a/test/model/bug/getbugquery.php +++ b/test/model/bug/getbugquery.php @@ -37,4 +37,4 @@ r($bug->getBugQueryTest($bugQuery[2])) && p() && e(" `resolvedDate` != '0000-00 r($bug->getBugQueryTest($bugQuery[3])) && p() && e(" `closedDate` != '0000-00-00 00:00:00' AND `closedDate` <= '2022-01-01'"); // 查询 `closedDate` = '2022-01-01' 的bugQuery r($bug->getBugQueryTest($bugQuery[4])) && p() && e(" `story` IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0"); // 查询 `story` LIKE '%abc%' 的bugQuery r($bug->getBugQueryTest($bugQuery[5])) && p() && e(" `story` NOT IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0"); // 查询 `story` NOT LIKE '%abc%' 的bugQuery -r($bug->getBugQueryTest($bugQuery[6])) && p() && e("`product` = '1' and `project` = '1' and `story` > 'abc' AND `story` != 0"); // 查询 `product` = '1' and `project` = '1' and `story` > 'abc' 的bugQuery +r($bug->getBugQueryTest($bugQuery[6])) && p() && e("`product` = '1' and `project` = '1' and `story` > 'abc' AND `story` != 0"); // 查询 `product` = '1' and `project` = '1' and `story` > 'abc' 的bugQuery \ No newline at end of file diff --git a/test/model/bug/getbugs.php b/test/model/bug/getbugs.php index 555f068e81..4ba2d539a2 100755 --- a/test/model/bug/getbugs.php +++ b/test/model/bug/getbugs.php @@ -10,17 +10,17 @@ title=bugModel->getBugs(); cid=1 pid=1 -查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 >> BUG3,BUG2,BUG1 +查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 >> BUG3,BUG2,BUG1 查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1 -查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1 -查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> BUG1 -查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 >> BUG3,BUG2,BUG1 -查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 -查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 -查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 >> 0 -查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 -查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 >> 0 -查询不存在的产品的全部bug的标题拼接 >> 0 +查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1 +查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> BUG1 +查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 >> BUG3,BUG2,BUG1 +查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 +查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 +查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 >> 0 +查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175 +查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 >> 0 +查询不存在的产品的全部bug的标题拼接 >> 0 */ @@ -41,4 +41,4 @@ r($bug->getBugsTest($productIDList[1], $branchList[1], $browseTypeList[0], $modu r($bug->getBugsTest($productIDList[1], $branchList[2], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();175'); // 查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 -r($bug->getBugsTest($productIDList[2], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品的全部bug的标题拼接 +r($bug->getBugsTest($productIDList[2], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品的全部bug的标题拼接 \ No newline at end of file diff --git a/test/model/bug/getbyassignedbyme.php b/test/model/bug/getbyassignedbyme.php index 7c416836ae..ed27bcac62 100755 --- a/test/model/bug/getbyassignedbyme.php +++ b/test/model/bug/getbyassignedbyme.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug >> 0 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我指派的bug >> 0 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我指派的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug >> 0 -查询产品1 3与模块1821, 1825下由我指派的bug >> 0 -查询产品1 3与模块不存在的模块1000001下由我指派的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下由我指派的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下由我指派的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我指派的bug >> 0 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我指派的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug >> 0 +查询产品1 3与模块1821, 1825下由我指派的bug >> 0 +查询产品1 3与模块不存在的模块1000001下由我指派的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下由我指派的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下由我指派的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getByAssignedbymeTest($productIDList[1], $moduleIDList[1])) && p('title' r($bug->getByAssignedbymeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下由我指派的bug r($bug->getByAssignedbymeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我指派的bug r($bug->getByAssignedbymeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下由我指派的bug -r($bug->getByAssignedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我指派的bug +r($bug->getByAssignedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我指派的bug \ No newline at end of file diff --git a/test/model/bug/getbyassigntome.php b/test/model/bug/getbyassigntome.php index b726006ef7..2747ff9c35 100755 --- a/test/model/bug/getbyassigntome.php +++ b/test/model/bug/getbyassigntome.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下指派给我的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下指派给我的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下指派给我的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下指派给我的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下指派给我的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 +查询产品1 3与模块1821, 1825下指派给我的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下指派给我的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下指派给我的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[1])) && p('title') r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下指派给我的bug r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下指派给我的bug -r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下指派给我的bug +r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下指派给我的bug \ No newline at end of file diff --git a/test/model/bug/getbyassigntonull.php b/test/model/bug/getbyassigntonull.php index 53b5bee530..a08622c0c1 100755 --- a/test/model/bug/getbyassigntonull.php +++ b/test/model/bug/getbyassigntonull.php @@ -11,8 +11,8 @@ cid=1 pid=1 查询产品1 581 58 不存在的产品10001下由我创建的bug >> BUG174,BUG173,BUG172,BUG93,BUG92,BUG91 -查询产品1 58下由我创建的bug >> BUG174,BUG173,BUG172 -查询不存在的产品10001下由我创建的bug >> 0 +查询产品1 58下由我创建的bug >> BUG174,BUG173,BUG172 +查询不存在的产品10001下由我创建的bug >> 0 */ @@ -22,4 +22,4 @@ $bug=new bugTest(); r($bug->getByAssigntonullTest($productIDList[0])) && p('title') && e('BUG174,BUG173,BUG172,BUG93,BUG92,BUG91'); // 查询产品1 581 58 不存在的产品10001下由我创建的bug r($bug->getByAssigntonullTest($productIDList[1])) && p('title') && e('BUG174,BUG173,BUG172'); // 查询产品1 58下由我创建的bug -r($bug->getByAssigntonullTest($productIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001下由我创建的bug +r($bug->getByAssigntonullTest($productIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001下由我创建的bug \ No newline at end of file diff --git a/test/model/bug/getbyid.php b/test/model/bug/getbyid.php index 159ed6e334..28b4ff1bef 100755 --- a/test/model/bug/getbyid.php +++ b/test/model/bug/getbyid.php @@ -10,26 +10,26 @@ title=bugModel->getById(); cid=1 pid=1 -查询id为1的bug的title >> BUG1 -查询id为1的bug的status >> active -查询id为1的bug的plan >> 1 -查询id为1的bug的module >> 1821 -查询id为1的bug的story >> 2 -查询id为4的bug的title >> BUG4 -查询id为4的bug的status >> active -查询id为4的bug的plan >> 4 -查询id为4的bug的module >> 1825 -查询id为4的bug的story >> 14 -查询id为7的bug的title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -查询id为7的bug的status >> active -查询id为7的bug的plan >> 7 -查询id为7的bug的module >> 1831 -查询id为7的bug的story >> 26 -查询id为不存在的1000001的bug的title >> 0 +查询id为1的bug的title >> BUG1 +查询id为1的bug的status >> active +查询id为1的bug的plan >> 1 +查询id为1的bug的module >> 1821 +查询id为1的bug的story >> 2 +查询id为4的bug的title >> BUG4 +查询id为4的bug的status >> active +查询id为4的bug的plan >> 4 +查询id为4的bug的module >> 1825 +查询id为4的bug的story >> 14 +查询id为7的bug的title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +查询id为7的bug的status >> active +查询id为7的bug的plan >> 7 +查询id为7的bug的module >> 1831 +查询id为7的bug的story >> 26 +查询id为不存在的1000001的bug的title >> 0 查询id为不存在的1000001的bug的status >> 0 -查询id为不存在的1000001的bug的plan >> 0 +查询id为不存在的1000001的bug的plan >> 0 查询id为不存在的1000001的bug的module >> 0 -查询id为不存在的1000001的bug的story >> 0 +查询id为不存在的1000001的bug的story >> 0 */ @@ -56,4 +56,4 @@ r($bug->getByIdTest($bugIDList[3])) && p('title') && e('0'); // 查询id为不 r($bug->getByIdTest($bugIDList[3])) && p('status') && e('0'); // 查询id为不存在的1000001的bug的status r($bug->getByIdTest($bugIDList[3])) && p('plan') && e('0'); // 查询id为不存在的1000001的bug的plan r($bug->getByIdTest($bugIDList[3])) && p('module') && e('0'); // 查询id为不存在的1000001的bug的module -r($bug->getByIdTest($bugIDList[3])) && p('story') && e('0'); // 查询id为不存在的1000001的bug的story +r($bug->getByIdTest($bugIDList[3])) && p('story') && e('0'); // 查询id为不存在的1000001的bug的story \ No newline at end of file diff --git a/test/model/bug/getbylist.php b/test/model/bug/getbylist.php index 30b47f87f9..015e8b8bde 100755 --- a/test/model/bug/getbylist.php +++ b/test/model/bug/getbylist.php @@ -10,21 +10,18 @@ title=bugModel->getByList(); cid=1 pid=1 -查询id为1的bug title >> BUG1 +查询id为1的bug title >> BUG1 查询id为2的bug status >> active -查询id为3的bug title >> BUG3 -查询id为1的bug title >> BUG1 -查询id为4的bug title >> BUG4 +查询id为3的bug title >> BUG3 +查询id为1的bug title >> BUG1 +查询id为4的bug title >> BUG4 查询id为4的bug status >> active -查询id为1的bug title >> BUG1 -查询id为1的bug title >> BUG1 -查询id为2的bug title >> BUG2 +查询id为1的bug title >> BUG1 +查询id为1的bug title >> BUG1 +查询id为2的bug title >> BUG2 查询id为2的bug status >> active -查询id为7的bug title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -查询id为7的bug title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 - - - +查询id为7的bug title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +查询id为7的bug title >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 */ @@ -44,4 +41,4 @@ r($bug->getByListTest($bugIDList[1], $fieldsList[3])) && p('1:title') && e('BUG r($bug->getByListTest($bugIDList[2], $fieldsList[0])) && p('2:title') && e('BUG2'); // 查询id为2的bug title r($bug->getByListTest($bugIDList[2], $fieldsList[1])) && p('2:status') && e('active'); // 查询id为2的bug status r($bug->getByListTest($bugIDList[2], $fieldsList[2])) && p('7:title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 查询id为7的bug title -r($bug->getByListTest($bugIDList[2], $fieldsList[3])) && p('7:title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 查询id为7的bug title +r($bug->getByListTest($bugIDList[2], $fieldsList[3])) && p('7:title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 查询id为7的bug title \ No newline at end of file diff --git a/test/model/bug/getbylonglifebugs.php b/test/model/bug/getbylonglifebugs.php index 669f9be4e6..9732b09eff 100755 --- a/test/model/bug/getbylonglifebugs.php +++ b/test/model/bug/getbylonglifebugs.php @@ -11,17 +11,17 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 -查询产品1 2 3 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 -查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG1 -查询产品1 3与模块1821, 1825下长时间未关闭的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug >> 0 -查询产品13 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 -查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 -查询不存在的产品10001下长时间未关闭的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 +查询产品1 2 3 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG1 +查询产品1 3与模块1821, 1825下长时间未关闭的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug >> 0 +查询产品13 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0 +查询不存在的产品10001下长时间未关闭的bug >> 0 */ @@ -41,4 +41,4 @@ r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[3])) && p('title' r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug -r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下长时间未关闭的bug +r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下长时间未关闭的bug \ No newline at end of file diff --git a/test/model/bug/getbyneedconfirm.php b/test/model/bug/getbyneedconfirm.php index cb7f247043..5307918cf4 100755 --- a/test/model/bug/getbyneedconfirm.php +++ b/test/model/bug/getbyneedconfirm.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下研发需求变更的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下研发需求变更的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下研发需求变更的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下研发需求变更的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下研发需求变更的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下研发需求变更的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下研发需求变更的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下研发需求变更的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 +查询产品1 3与模块1821, 1825下研发需求变更的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下研发需求变更的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下研发需求变更的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下研发需求变更的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getByNeedconfirmTest($productIDList[1], $moduleIDList[1])) && p('title') r($bug->getByNeedconfirmTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下研发需求变更的bug r($bug->getByNeedconfirmTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下研发需求变更的bug r($bug->getByNeedconfirmTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下研发需求变更的bug -r($bug->getByNeedconfirmTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下研发需求变更的bug +r($bug->getByNeedconfirmTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下研发需求变更的bug \ No newline at end of file diff --git a/test/model/bug/getbyopenedbyme.php b/test/model/bug/getbyopenedbyme.php index cb03a78624..ea5b16402e 100755 --- a/test/model/bug/getbyopenedbyme.php +++ b/test/model/bug/getbyopenedbyme.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我创建的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下由我创建的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下由我创建的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下由我创建的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我创建的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 +查询产品1 3与模块1821, 1825下由我创建的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下由我创建的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下由我创建的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[1])) && p('title') r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下由我创建的bug r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下由我创建的bug -r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我创建的bug +r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我创建的bug \ No newline at end of file diff --git a/test/model/bug/getbypostponedbugs.php b/test/model/bug/getbypostponedbugs.php index 60bcb2a2ea..416f23afe0 100755 --- a/test/model/bug/getbypostponedbugs.php +++ b/test/model/bug/getbypostponedbugs.php @@ -11,10 +11,10 @@ cid=1 pid=1 查询产品25 32 48 100001下被延期的bug >> BUG94,BUG75,BUG74,BUG73 -查询产品25下被延期的bug >> BUG75,BUG74,BUG73 -查询产品32下被延期的bug >> BUG94 -查询产品1下被延期的bug >> 0 -查询不存在的产品10001下被延期的bug >> 0 +查询产品25下被延期的bug >> BUG75,BUG74,BUG73 +查询产品32下被延期的bug >> BUG94 +查询产品1下被延期的bug >> 0 +查询不存在的产品10001下被延期的bug >> 0 */ @@ -26,4 +26,4 @@ r($bug->getByPostponedBugsTest($productIDList[0])) && p('title') && e('BUG94,BUG r($bug->getByPostponedBugsTest($productIDList[1])) && p('title') && e('BUG75,BUG74,BUG73'); // 查询产品25下被延期的bug r($bug->getByPostponedBugsTest($productIDList[2])) && p('title') && e('BUG94'); // 查询产品32下被延期的bug r($bug->getByPostponedBugsTest($productIDList[3])) && p('title') && e('0'); // 查询产品1下被延期的bug -r($bug->getByPostponedBugsTest($productIDList[4])) && p('title') && e('0'); // 查询不存在的产品10001下被延期的bug +r($bug->getByPostponedBugsTest($productIDList[4])) && p('title') && e('0'); // 查询不存在的产品10001下被延期的bug \ No newline at end of file diff --git a/test/model/bug/getbyresolvedbyme.php b/test/model/bug/getbyresolvedbyme.php index 222c1c237d..0f228daa56 100755 --- a/test/model/bug/getbyresolvedbyme.php +++ b/test/model/bug/getbyresolvedbyme.php @@ -11,9 +11,9 @@ cid=1 pid=1 查询产品1 29 98 不存在的产品10001 下由我解决的bug >> BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85 -查询产品1 98下由我解决的bug >> BUG294,BUG293,BUG292 -查询产品29下由我解决的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85 -查询不存在的产品10001 下由我解决的bug >> 0 +查询产品1 98下由我解决的bug >> BUG294,BUG293,BUG292 +查询产品29下由我解决的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85 +查询不存在的产品10001 下由我解决的bug >> 0 */ @@ -24,4 +24,4 @@ $bug=new bugTest(); r($bug->getByResolvedbymeTest($productIDList[0])) && p('title') && e('BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85'); // 查询产品1 29 98 不存在的产品10001 下由我解决的bug r($bug->getByResolvedbymeTest($productIDList[1])) && p('title') && e('BUG294,BUG293,BUG292'); // 查询产品1 98下由我解决的bug r($bug->getByResolvedbymeTest($productIDList[2])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();87,BUG86,BUG85'); // 查询产品29下由我解决的bug -r($bug->getByResolvedbymeTest($productIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001 下由我解决的bug +r($bug->getByResolvedbymeTest($productIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001 下由我解决的bug \ No newline at end of file diff --git a/test/model/bug/getbysonarqubeid.php b/test/model/bug/getbysonarqubeid.php index e18c0b9e8a..efdcbbe85b 100755 --- a/test/model/bug/getbysonarqubeid.php +++ b/test/model/bug/getbysonarqubeid.php @@ -14,10 +14,9 @@ pid=1 */ - $sonarqubeIDList = array('0', '2'); $bug=new bugTest(); r($bug->getBySonarqubeIDTest($sonarqubeIDList[0])) && p() && e('0'); //获取sonarqubeID为0的bug issueKey数量 -r($bug->getBySonarqubeIDTest($sonarqubeIDList[1])) && p() && e('1'); //获取sonarqubeID为2的bug issueKey数量 +r($bug->getBySonarqubeIDTest($sonarqubeIDList[1])) && p() && e('1'); //获取sonarqubeID为2的bug issueKey数量 \ No newline at end of file diff --git a/test/model/bug/getbystatus.php b/test/model/bug/getbystatus.php index 0073e2aa57..23413c98fd 100755 --- a/test/model/bug/getbystatus.php +++ b/test/model/bug/getbystatus.php @@ -10,33 +10,33 @@ title=bugModel->getByStatus(); cid=1 pid=1 -查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> bug8,BUG1 +查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> bug8,BUG1 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> bug8,BUG1 -查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> BUG1 -查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> BUG1 -查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> BUG1 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> BUG1 -查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询产品1 与模块1821状态为unclosed下未确认的bug >> BUG1 -查询产品1 与模块1821状态为unresolved下未确认的bug >> BUG1 -查询产品1 与模块1821状态为toclosed下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> BUG1 +查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> BUG1 +查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 +查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 +查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 +查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> BUG1 +查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> BUG1 +查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询产品1 与模块1821状态为unclosed下未确认的bug >> BUG1 +查询产品1 与模块1821状态为unresolved下未确认的bug >> BUG1 +查询产品1 与模块1821状态为toclosed下未确认的bug >> 0 +查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 +查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 +查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> 0 +查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> 0 +查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0 +查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> 0 +查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> 0 +查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0 */ @@ -72,4 +72,4 @@ r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[1])) && r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug -r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug +r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug \ No newline at end of file diff --git a/test/model/bug/getcasebugs.php b/test/model/bug/getcasebugs.php index bdb29c6fbe..7dbc916987 100755 --- a/test/model/bug/getcasebugs.php +++ b/test/model/bug/getcasebugs.php @@ -9,34 +9,33 @@ title=bugModel->getCaseBugs(); cid=1 pid=1 -测试获取runID为0 caseID为2的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为0 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为0 caseID为10的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为0 caseID不存在的bug >> 0 -测试获取runID为2 caseID为0的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为2 caseID为2的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为2 caseID为6的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为2 caseID为10的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为2 caseID不存在的bug >> 测试单转Bug1,测试单转Bug11 -测试获取runID为6 caseID为0的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为6 caseID为2的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为6 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为6 caseID为10的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为6 caseID不存在的bug >> SonarQube_Bug2,SonarQube_Bug12 -测试获取runID为10 caseID为0的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为10 caseID为2的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为10 caseID为6的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为10 caseID为10的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为10 caseID不存在的bug >> 测试单转Bug3,测试单转Bug13 -测试获取runID为不存在 caseID为0的bug >> 0 -测试获取runID为不存在 caseID为2的bug >> 0 -测试获取runID为不存在 caseID为6的bug >> 0 -测试获取runID为不存在 caseID为10的bug >> 0 -测试获取runID为不存在 caseID不存在的bug >> 0 +测试获取runID为0 caseID为2的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为0 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为0 caseID为10的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为0 caseID不存在的bug >> 0 +测试获取runID为2 caseID为0的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为2 caseID为2的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为2 caseID为6的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为2 caseID为10的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为2 caseID不存在的bug >> 测试单转Bug1,测试单转Bug11 +测试获取runID为6 caseID为0的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为6 caseID为2的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为6 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为6 caseID为10的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为6 caseID不存在的bug >> SonarQube_Bug2,SonarQube_Bug12 +测试获取runID为10 caseID为0的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为10 caseID为2的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为10 caseID为6的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为10 caseID为10的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为10 caseID不存在的bug >> 测试单转Bug3,测试单转Bug13 +测试获取runID为不存在 caseID为0的bug >> 0 +测试获取runID为不存在 caseID为2的bug >> 0 +测试获取runID为不存在 caseID为6的bug >> 0 +测试获取runID为不存在 caseID为10的bug >> 0 +测试获取runID为不存在 caseID不存在的bug >> 0 */ - $runIDList = array('0', '2', '6', '10', '1000001'); $caseIDList = array('0', '2', '6', '10', '1000001'); @@ -64,4 +63,4 @@ r($bug->getCaseBugsTest($runIDList[4], $caseIDList[0])) && p() && e('0'); r($bug->getCaseBugsTest($runIDList[4], $caseIDList[1])) && p() && e('0'); // 测试获取runID为不存在 caseID为2的bug r($bug->getCaseBugsTest($runIDList[4], $caseIDList[2])) && p() && e('0'); // 测试获取runID为不存在 caseID为6的bug r($bug->getCaseBugsTest($runIDList[4], $caseIDList[3])) && p() && e('0'); // 测试获取runID为不存在 caseID为10的bug -r($bug->getCaseBugsTest($runIDList[4], $caseIDList[4])) && p() && e('0'); // 测试获取runID为不存在 caseID不存在的bug +r($bug->getCaseBugsTest($runIDList[4], $caseIDList[4])) && p() && e('0'); // 测试获取runID为不存在 caseID不存在的bug \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperactivatedcount.php b/test/model/bug/getdataofbugsperactivatedcount.php index 3686205170..c23d87159b 100755 --- a/test/model/bug/getdataofbugsperactivatedcount.php +++ b/test/model/bug/getdataofbugsperactivatedcount.php @@ -13,6 +13,5 @@ pid=1 */ - $bug=new bugTest(); -r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,315'); // 获取bug激活次数数据 +r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,315'); // 获取bug激活次数数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperassignedto.php b/test/model/bug/getdataofbugsperassignedto.php index cc6269e823..eb5df7fd65 100755 --- a/test/model/bug/getdataofbugsperassignedto.php +++ b/test/model/bug/getdataofbugsperassignedto.php @@ -9,16 +9,15 @@ title=bugModel->getDataOfBugsPerAssignedTo(); cid=1 pid=1 -获取用户admin数据 >> admin,85 -获取用户dev1数据 >> 开发1,85 -获取用户test1数据 >> 测试1,85 +获取用户admin数据 >> admin,85 +获取用户dev1数据 >> 开发1,85 +获取用户test1数据 >> 测试1,85 获取用户closed数据 >> Closed,20 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerAssignedToTest()) && p('admin:name,value') && e('admin,85'); // 获取用户admin数据 r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('开发1,85'); // 获取用户dev1数据 r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('测试1,85'); // 获取用户test1数据 -r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('Closed,20'); // 获取用户closed数据 +r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('Closed,20'); // 获取用户closed数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperbuild.php b/test/model/bug/getdataofbugsperbuild.php index a5375fc40b..8b8f768f7f 100755 --- a/test/model/bug/getdataofbugsperbuild.php +++ b/test/model/bug/getdataofbugsperbuild.php @@ -9,14 +9,13 @@ title=bugModel->getDataOfBugsPerBuild(); cid=1 pid=1 -获取主干bug数 >> 主干,291 -获取bug数 >> ,3 -获取项目版本版本1bug数 >> 项目版本版本1,6 +获取主干bug数 >> 主干,291 +获取bug数 >> ,3 +获取项目版本版本1bug数 >> 迭代版本版本1,6 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerBuildTest()) && p('trunk:name,value') && e('主干,291'); // 获取主干bug数 r($bug->getDataOfBugsPerBuildTest()) && p('0:name,value') && e(',3'); // 获取bug数 -r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取项目版本版本1bug数 +r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取项目版本版本1bug数 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperexecution.php b/test/model/bug/getdataofbugsperexecution.php index c14d156fba..c9deca0b46 100755 --- a/test/model/bug/getdataofbugsperexecution.php +++ b/test/model/bug/getdataofbugsperexecution.php @@ -21,7 +21,6 @@ pid=1 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,4,迭代1'); // 获取执行101数据 r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,4,迭代2'); // 获取执行102数据 @@ -31,4 +30,4 @@ r($bug->getDataOfBugsPerExecutionTest()) && p('132:name,value,title') && e('阶 r($bug->getDataOfBugsPerExecutionTest()) && p('133:name,value,title') && e('阶段33,3,阶段33'); // 获取执行133数据 r($bug->getDataOfBugsPerExecutionTest()) && p('161:name,value,title') && e('看板61,3,看板61'); // 获取执行161数据 r($bug->getDataOfBugsPerExecutionTest()) && p('162:name,value,title') && e('看板62,3,看板62'); // 获取执行162数据 -r($bug->getDataOfBugsPerExecutionTest()) && p('163:name,value,title') && e('看板63,3,看板63'); // 获取执行163数据 +r($bug->getDataOfBugsPerExecutionTest()) && p('163:name,value,title') && e('看板63,3,看板63'); // 获取执行163数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugspermodule.php b/test/model/bug/getdataofbugspermodule.php index ea96a1736f..63e7f158cf 100755 --- a/test/model/bug/getdataofbugspermodule.php +++ b/test/model/bug/getdataofbugspermodule.php @@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerModule(); cid=1 pid=1 -获取module0数据 >> /,306 +获取module0数据 >> /,306 获取module1821数据 >> /产品模块1,1 获取module1822数据 >> /产品模块2,1 获取module1823数据 >> /产品模块3,1 @@ -20,10 +20,8 @@ pid=1 获取module1832数据 >> /产品模块12,1 获取module1833数据 >> /产品模块13,1 - */ - $bug=new bugTest(); r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,306'); // 获取module0数据 r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1,1'); // 获取module1821数据 @@ -34,4 +32,4 @@ r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模 r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块7,1'); // 获取module1827数据 r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块11,1'); // 获取module1831数据 r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块12,1'); // 获取module1832数据 -r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块13,1'); // 获取module1833数据 +r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块13,1'); // 获取module1833数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperpri.php b/test/model/bug/getdataofbugsperpri.php index d61b01fed3..e8727c66c3 100755 --- a/test/model/bug/getdataofbugsperpri.php +++ b/test/model/bug/getdataofbugsperpri.php @@ -16,9 +16,8 @@ pid=1 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,79'); // 获取pri为1的数据 r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,79'); // 获取pri为2的数据 r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,79'); // 获取pri为3的数据 -r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,78'); // 获取pri为4的数据 +r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,78'); // 获取pri为4的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperresolution.php b/test/model/bug/getdataofbugsperresolution.php index 51571b1b54..7b2261341c 100755 --- a/test/model/bug/getdataofbugsperresolution.php +++ b/test/model/bug/getdataofbugsperresolution.php @@ -9,18 +9,16 @@ title=bugModel->getDataOfBugsPerResolution(); cid=1 pid=1 -获取状态为fixed的数据 >> 已解决,45 +获取状态为fixed的数据 >> 已解决,45 获取状态为duplicate的数据 >> 重复Bug,30 -获取状态为external的数据 >> 设计如此,18 -获取状态为external的数据 >> 外部原因,18 -获取状态为willnotfix的数 >> 不予解决,18 +获取状态为external的数据 >> 设计如此,18 +获取状态为external的数据 >> 外部原因,18 +获取状态为willnotfix的数据 >> 不予解决,18 获取状态为postponed的数据 >> 延期处理,12 -获取状态为notrepro的数据 >> 无法重现,9 - +获取状态为notrepro的数据 >> 无法重现,9 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerResolutionTest()) && p('fixed:name,value') && e('已解决,45'); // 获取状态为fixed的数据 r($bug->getDataOfBugsPerResolutionTest()) && p('duplicate:name,value') && e('重复Bug,30'); // 获取状态为duplicate的数据 @@ -28,4 +26,4 @@ r($bug->getDataOfBugsPerResolutionTest()) && p('bydesign:name,value') && e(' r($bug->getDataOfBugsPerResolutionTest()) && p('external:name,value') && e('外部原因,18'); // 获取状态为external的数据 r($bug->getDataOfBugsPerResolutionTest()) && p('willnotfix:name,value') && e('不予解决,18'); // 获取状态为willnotfix的数据 r($bug->getDataOfBugsPerResolutionTest()) && p('postponed:name,value') && e('延期处理,12'); // 获取状态为postponed的数据 -r($bug->getDataOfBugsPerResolutionTest()) && p('notrepro:name,value') && e('无法重现,9'); // 获取状态为notrepro的数据 +r($bug->getDataOfBugsPerResolutionTest()) && p('notrepro:name,value') && e('无法重现,9'); // 获取状态为notrepro的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperseverity.php b/test/model/bug/getdataofbugsperseverity.php index d0026761f2..ca1986c193 100755 --- a/test/model/bug/getdataofbugsperseverity.php +++ b/test/model/bug/getdataofbugsperseverity.php @@ -16,9 +16,8 @@ pid=1 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,79'); // 获取严重程度1数据 r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,79'); // 获取严重程度2数据 r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,79'); // 获取严重程度3数据 -r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,78'); // 获取严重程度4数据 +r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,78'); // 获取严重程度4数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugsperstatus.php b/test/model/bug/getdataofbugsperstatus.php index 9333cbc923..0a950c9b57 100755 --- a/test/model/bug/getdataofbugsperstatus.php +++ b/test/model/bug/getdataofbugsperstatus.php @@ -9,14 +9,13 @@ title=bugModel->getDataOfBugsPerStatus(); cid=1 pid=1 -获取状态为active的数据 >> 激活,165 +获取状态为active的数据 >> 激活,165 获取状态为resolved的数据 >> 已解决,90 -获取状态为closed的数据 >> 已关闭,60 +获取状态为closed的数据 >> 已关闭,60 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,165'); // 获取状态为active的数据 r($bug->getDataOfBugsPerStatusTest()) && p('resolved:name,value') && e('已解决,90'); // 获取状态为resolved的数据 -r($bug->getDataOfBugsPerStatusTest()) && p('closed:name,value') && e('已关闭,60'); // 获取状态为closed的数据 +r($bug->getDataOfBugsPerStatusTest()) && p('closed:name,value') && e('已关闭,60'); // 获取状态为closed的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofbugspertype.php b/test/model/bug/getdataofbugspertype.php index b5093bbf4c..d6ebb357cd 100755 --- a/test/model/bug/getdataofbugspertype.php +++ b/test/model/bug/getdataofbugspertype.php @@ -9,19 +9,18 @@ title=bugModel->getDataOfBugsPerType(); cid=1 pid=1 -获取类型为codeerror的数据 >> 代码错误,49 -获取类型为config的数据 >> 配置相关,34 -获取类型为install的数据 >> 安装部署,34 -获取类型为security的数据 >> 安全相关,33 -获取类型为performance的数据 >> 性能问题,33 -获取类型为standard的数据 >> 标准规范,33 -获取类型为automation的数据 >> 测试脚本,33 +获取类型为codeerror的数据 >> 代码错误,49 +获取类型为config的数据 >> 配置相关,34 +获取类型为install的数据 >> 安装部署,34 +获取类型为security的数据 >> 安全相关,33 +获取类型为performance的数据 >> 性能问题,33 +获取类型为standard的数据 >> 标准规范,33 +获取类型为automation的数据 >> 测试脚本,33 获取类型为designdefect的数据 >> 设计缺陷,33 -获取类型为others的数据 >> 其他,33 +获取类型为others的数据 >> 其他,33 */ - $bug=new bugTest(); r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,49'); // 获取类型为codeerror的数据 r($bug->getDataOfBugsPerTypeTest()) && p('config:name,value') && e('配置相关,34'); // 获取类型为config的数据 @@ -31,4 +30,4 @@ r($bug->getDataOfBugsPerTypeTest()) && p('performance:name,value') && e('性能 r($bug->getDataOfBugsPerTypeTest()) && p('standard:name,value') && e('标准规范,33'); // 获取类型为standard的数据 r($bug->getDataOfBugsPerTypeTest()) && p('automation:name,value') && e('测试脚本,33'); // 获取类型为automation的数据 r($bug->getDataOfBugsPerTypeTest()) && p('designdefect:name,value') && e('设计缺陷,33'); // 获取类型为designdefect的数据 -r($bug->getDataOfBugsPerTypeTest()) && p('others:name,value') && e('其他,33'); // 获取类型为others的数据 +r($bug->getDataOfBugsPerTypeTest()) && p('others:name,value') && e('其他,33'); // 获取类型为others的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofclosedbugsperday.php b/test/model/bug/getdataofclosedbugsperday.php index 731cacc9da..e224d7259f 100755 --- a/test/model/bug/getdataofclosedbugsperday.php +++ b/test/model/bug/getdataofclosedbugsperday.php @@ -13,6 +13,5 @@ pid=1 */ - $bug=new bugTest(); -r($bug->getDataOfClosedBugsPerDayTest()) && p() && e('0'); // 获取关闭bug的数据 +r($bug->getDataOfClosedBugsPerDayTest()) && p() && e('0'); // 获取关闭bug的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofclosedbugsperuser.php b/test/model/bug/getdataofclosedbugsperuser.php index 1b7b21b933..05170358a1 100755 --- a/test/model/bug/getdataofclosedbugsperuser.php +++ b/test/model/bug/getdataofclosedbugsperuser.php @@ -13,6 +13,5 @@ pid=1 */ - $bug=new bugTest(); -r($bug->getDataOfClosedBugsPerUserTest()) && p('admin:name,value') && e('admin,100'); // 获取admin关闭的数据 +r($bug->getDataOfClosedBugsPerUserTest()) && p('admin:name,value') && e('admin,100'); // 获取admin关闭的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofopenedbugsperday.php b/test/model/bug/getdataofopenedbugsperday.php index 3530616d0f..4e6472bb3c 100755 --- a/test/model/bug/getdataofopenedbugsperday.php +++ b/test/model/bug/getdataofopenedbugsperday.php @@ -13,6 +13,5 @@ pid=1 */ - $bug=new bugTest(); -r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('23'); // 获取创建的数据 +r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('23'); // 获取创建的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofopenedbugsperuser.php b/test/model/bug/getdataofopenedbugsperuser.php index 56149d9049..5eafddf141 100755 --- a/test/model/bug/getdataofopenedbugsperuser.php +++ b/test/model/bug/getdataofopenedbugsperuser.php @@ -13,6 +13,5 @@ pid=1 */ - $bug=new bugTest(); -r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,315'); // 获取admin创建的数据 +r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,315'); // 获取admin创建的数据 \ No newline at end of file diff --git a/test/model/bug/getdataofresolvedbugsperday.php b/test/model/bug/getdataofresolvedbugsperday.php index 8bd3b7e5ab..0f1d9ba650 100755 --- a/test/model/bug/getdataofresolvedbugsperday.php +++ b/test/model/bug/getdataofresolvedbugsperday.php @@ -20,10 +20,8 @@ pid=1 获取解决的bug8 >> 14 获取解决的bug9 >> 14 - */ - $bug=new bugTest(); r($bug->getDataOfResolvedBugsPerDayTest()) && p('0:value') && e('14'); // 获取解决的bug0 r($bug->getDataOfResolvedBugsPerDayTest()) && p('1:value') && e('14'); // 获取解决的bug1 @@ -34,4 +32,4 @@ r($bug->getDataOfResolvedBugsPerDayTest()) && p('5:value') && e('14'); // 获取 r($bug->getDataOfResolvedBugsPerDayTest()) && p('6:value') && e('14'); // 获取解决的bug6 r($bug->getDataOfResolvedBugsPerDayTest()) && p('7:value') && e('14'); // 获取解决的bug7 r($bug->getDataOfResolvedBugsPerDayTest()) && p('8:value') && e('14'); // 获取解决的bug8 -r($bug->getDataOfResolvedBugsPerDayTest()) && p('9:value') && e('14'); // 获取解决的bug9 +r($bug->getDataOfResolvedBugsPerDayTest()) && p('9:value') && e('14'); // 获取解决的bug9 \ No newline at end of file diff --git a/test/model/bug/getdataofresolvedbugsperuser.php b/test/model/bug/getdataofresolvedbugsperuser.php index 05ca287d74..526fa8f4c4 100755 --- a/test/model/bug/getdataofresolvedbugsperuser.php +++ b/test/model/bug/getdataofresolvedbugsperuser.php @@ -9,12 +9,11 @@ title=bugModel->getDataOfResolvedBugsPerUser(); cid=1 pid=1 -获取admin解决的bug数 >> admin,60 -获取$assignTo解决的bug数 >> $assignedTo,90 +获取admin解决的bug数 >> admin,60 +获取 >> ,90 */ - $bug=new bugTest(); r($bug->getDataOfResolvedBugsPerUserTest()) && p('admin:name,value') && e('admin,60'); // 获取admin解决的bug数 -r($bug->getDataOfResolvedBugsPerUserTest()) && p('$assignedTo:name,value') && e('$assignedTo,90'); // 获取$assignTo解决的bug数 +r($bug->getDataOfResolvedBugsPerUserTest()) && p('$assignedTo:name,value') && e('$assignedTo,90'); // 获取$assignTo解决的bug数 \ No newline at end of file diff --git a/test/model/bug/getexecutionbugs.php b/test/model/bug/getexecutionbugs.php index 5147c28e72..2ee9a58e18 100755 --- a/test/model/bug/getexecutionbugs.php +++ b/test/model/bug/getexecutionbugs.php @@ -9,18 +9,16 @@ title=bugModel->getExecutionBugs(); cid=1 pid=1 -测试获取执行ID为101的bug >> BUG3,BUG2,BUG1 -测试获取执行ID为102的bug >> BUG6,BUG5,BUG4 -测试获取执行ID为103的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -测试获取执行ID为104的bug >> BUG12,BUG11,BUG10 -测试获取执行ID为105的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13 -测试获取执行ID为106的bug >> BUG18,BUG17,bug16 +测试获取执行ID为101的bug >> BUG3,BUG2,BUG1 +测试获取执行ID为102的bug >> BUG6,BUG5,BUG4 +测试获取执行ID为103的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +测试获取执行ID为104的bug >> BUG12,BUG11,BUG10 +测试获取执行ID为105的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13 +测试获取执行ID为106的bug >> BUG18,BUG17,bug16 测试获取不存在的执行的bug >> 0 - */ - $executionIDList = array('101', '102', '103', '104', '105', '106', '1000001'); $bug=new bugTest(); @@ -30,4 +28,4 @@ r($bug->getExecutionBugsTest($executionIDList[2])) && p() && e('BUG9,bug8,缺陷 r($bug->getExecutionBugsTest($executionIDList[3])) && p() && e('BUG12,BUG11,BUG10'); // 测试获取执行ID为104的bug r($bug->getExecutionBugsTest($executionIDList[4])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13'); // 测试获取执行ID为105的bug r($bug->getExecutionBugsTest($executionIDList[5])) && p() && e('BUG18,BUG17,bug16'); // 测试获取执行ID为106的bug -r($bug->getExecutionBugsTest($executionIDList[6])) && p() && e('0'); // 测试获取不存在的执行的bug +r($bug->getExecutionBugsTest($executionIDList[6])) && p() && e('0'); // 测试获取不存在的执行的bug \ No newline at end of file diff --git a/test/model/bug/getmodulebugs.php b/test/model/bug/getmodulebugs.php index 7d4b537d4d..4df912c902 100755 --- a/test/model/bug/getmodulebugs.php +++ b/test/model/bug/getmodulebugs.php @@ -11,14 +11,14 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0 -查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 -查询产品1 3与模块1821, 1825下的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0 +查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG1 +查询产品1 3与模块1821, 1825下的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下的bug >> 0 +查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下的bug >> 0 */ @@ -35,4 +35,4 @@ r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug -r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug +r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug \ No newline at end of file diff --git a/test/model/bug/getmoduleowner.php b/test/model/bug/getmoduleowner.php index 10ce71a06d..46f4f1729a 100755 --- a/test/model/bug/getmoduleowner.php +++ b/test/model/bug/getmoduleowner.php @@ -10,17 +10,17 @@ title=bugModel->getModuleOwner(); cid=1 pid=1 -查询模块1821 产品1的owner >> test1 -查询模块1821 产品2的owner >> test2 -查询模块1821 产品3的owner >> test3 +查询模块1821 产品1的owner >> test1 +查询模块1821 产品2的owner >> test2 +查询模块1821 产品3的owner >> test3 查询模块1821 不存在的产品1000001的owner >> 0 -查询模块1821 产品1的owner >> test1 -查询模块1821 产品2的owner >> test2 -查询模块1821 产品3的owner >> test3 +查询模块1821 产品1的owner >> test1 +查询模块1821 产品2的owner >> test2 +查询模块1821 产品3的owner >> test3 查询模块1821 不存在的产品1000001的owner >> 0 -查询模块1821 产品1的owner >> test1 -查询模块1821 产品2的owner >> test2 -查询模块1821 产品3的owner >> test3 +查询模块1821 产品1的owner >> test1 +查询模块1821 产品2的owner >> test2 +查询模块1821 产品3的owner >> test3 查询模块1821 不存在的产品1000001的owner >> 0 */ @@ -41,4 +41,4 @@ r($bug->getModuleOwnerTest($moduleIDList[1], $productIDList[3])) && p() && e('0' r($bug->getModuleOwnerTest($moduleIDList[2], $productIDList[0])) && p() && e('test1'); // 查询模块1821 产品1的owner r($bug->getModuleOwnerTest($moduleIDList[2], $productIDList[1])) && p() && e('test2'); // 查询模块1821 产品2的owner r($bug->getModuleOwnerTest($moduleIDList[2], $productIDList[2])) && p() && e('test3'); // 查询模块1821 产品3的owner -r($bug->getModuleOwnerTest($moduleIDList[2], $productIDList[3])) && p() && e('0'); // 查询模块1821 不存在的产品1000001的owner +r($bug->getModuleOwnerTest($moduleIDList[2], $productIDList[3])) && p() && e('0'); // 查询模块1821 不存在的产品1000001的owner \ No newline at end of file diff --git a/test/model/bug/getoverduebugs.php b/test/model/bug/getoverduebugs.php index e8aaf13ba4..2e12b7ed81 100755 --- a/test/model/bug/getoverduebugs.php +++ b/test/model/bug/getoverduebugs.php @@ -11,17 +11,17 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug >> BUG4,BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 -查询产品1 2 3 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 -查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG1 -查询产品1 3与模块1821, 1825下过期未解决的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下过期未解决的bug >> 0 -查询产品13 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 -查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下过期未解决的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 -查询不存在的产品10001下过期未解决的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug >> BUG4,BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 +查询产品1 2 3 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG1 +查询产品1 3与模块1821, 1825下过期未解决的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下过期未解决的bug >> 0 +查询产品13 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG2,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下过期未解决的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0 +查询不存在的产品10001下过期未解决的bug >> 0 */ @@ -41,4 +41,4 @@ r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[3])) && p('title') & r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下过期未解决的bug r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug -r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下过期未解决的bug +r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下过期未解决的bug \ No newline at end of file diff --git a/test/model/bug/getplanbugs.php b/test/model/bug/getplanbugs.php index e896a9d663..957f72a7aa 100755 --- a/test/model/bug/getplanbugs.php +++ b/test/model/bug/getplanbugs.php @@ -10,18 +10,18 @@ title=bugModel->getPlanBugs(); cid=1 pid=1 -查询计划1 状态为all的bug >> BUG3,BUG2,BUG1 -查询计划1 状态为active的bug >> BUG3,BUG2,BUG1 +查询计划1 状态为all的bug >> BUG3,BUG2,BUG1 +查询计划1 状态为active的bug >> BUG3,BUG2,BUG1 查询计划1 状态为resolved的bug >> 0 -查询计划1 状态为closed的bug >> 0 -查询计划4 状态为all的bug >> BUG6,BUG5,BUG4 -查询计划4 状态为active的bug >> BUG6,BUG5,BUG4 +查询计划1 状态为closed的bug >> 0 +查询计划4 状态为all的bug >> BUG6,BUG5,BUG4 +查询计划4 状态为active的bug >> BUG6,BUG5,BUG4 查询计划4 状态为resolved的bug >> 0 -查询计划4 状态为closed的bug >> 0 -查询计划7 状态为all的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -查询计划7 状态为active的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +查询计划4 状态为closed的bug >> 0 +查询计划7 状态为all的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +查询计划7 状态为active的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 查询计划7 状态为resolved的bug >> 0 -查询计划7 状态为closed的bug >> 0 +查询计划7 状态为closed的bug >> 0 */ @@ -41,4 +41,4 @@ r($bug->getPlanBugsTest($planIDList[1], $statusList[3])) && p('title') && e('0') r($bug->getPlanBugsTest($planIDList[2], $statusList[0])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 查询计划7 状态为all的bug r($bug->getPlanBugsTest($planIDList[2], $statusList[1])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 查询计划7 状态为active的bug r($bug->getPlanBugsTest($planIDList[2], $statusList[2])) && p('title') && e('0'); // 查询计划7 状态为resolved的bug -r($bug->getPlanBugsTest($planIDList[2], $statusList[3])) && p('title') && e('0'); // 查询计划7 状态为closed的bug +r($bug->getPlanBugsTest($planIDList[2], $statusList[3])) && p('title') && e('0'); // 查询计划7 状态为closed的bug \ No newline at end of file diff --git a/test/model/bug/getproductbugpairs.php b/test/model/bug/getproductbugpairs.php index c5231c70dc..018f1d3059 100755 --- a/test/model/bug/getproductbugpairs.php +++ b/test/model/bug/getproductbugpairs.php @@ -9,17 +9,16 @@ title=bugModel->getProductBugPairs(); cid=1 pid=1 -测试获取productID为1的bug >> 3:BUG3,2:BUG2,1:BUG1 -测试获取productID为2的bug >> 6:BUG6,5:BUG5,4:BUG4 -测试获取productID为3的bug >> 9:BUG9,8:bug8,7:缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 -测试获取productID为4的bug >> 12:BUG12,11:BUG11,10:BUG10 -测试获取productID为5的bug >> 15:缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,14:BUG14,13:BUG13 -测试获取productID为6的bug >> 18:BUG18,17:BUG17,16:bug16 +测试获取productID为1的bug >> 3:BUG3,2:BUG2,1:BUG1 +测试获取productID为2的bug >> 6:BUG6,5:BUG5,4:BUG4 +测试获取productID为3的bug >> 9:BUG9,8:bug8,7:缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7 +测试获取productID为4的bug >> 12:BUG12,11:BUG11,10:BUG10 +测试获取productID为5的bug >> 15:缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,14:BUG14,13:BUG13 +测试获取productID为6的bug >> 18:BUG18,17:BUG17,16:bug16 测试获取不存在的product的bug >> 0 */ - $productIDList = array('1', '2', '3', '4','5', '6', '1000001'); $bug=new bugTest(); @@ -29,4 +28,4 @@ r($bug->getProductBugPairsTest($productIDList[2])) && p() && e('9:BUG9,8:bug8,7: r($bug->getProductBugPairsTest($productIDList[3])) && p() && e('12:BUG12,11:BUG11,10:BUG10'); // 测试获取productID为4的bug r($bug->getProductBugPairsTest($productIDList[4])) && p() && e('15:缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,14:BUG14,13:BUG13'); // 测试获取productID为5的bug r($bug->getProductBugPairsTest($productIDList[5])) && p() && e('18:BUG18,17:BUG17,16:bug16'); // 测试获取productID为6的bug -r($bug->getProductBugPairsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug +r($bug->getProductBugPairsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug \ No newline at end of file diff --git a/test/model/bug/getproductleftbugs.php b/test/model/bug/getproductleftbugs.php index de8198f0bb..86fcf6805e 100755 --- a/test/model/bug/getproductleftbugs.php +++ b/test/model/bug/getproductleftbugs.php @@ -15,12 +15,11 @@ pid=1 测试获取buildID为14 productID为4的bug >> BUG10,BUG11,BUG12,SonarQube_Bug4 测试获取buildID为15 productID为5的bug >> BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5 测试获取buildID为16 productID为6的bug >> bug16,BUG17,BUG18,SonarQube_Bug6 -测试获取不存在的build的bug >> 0 -测试获取不存在的product的bug >> 0 +测试获取不存在的build的bug >> 0 +测试获取不存在的product的bug >> 0 */ - $buildIDList = array('11', '12', '13', '14', '15', '16', '1000001'); $productIDList = array('1', '2', '3', '4', '5', '6', '1000001'); @@ -32,4 +31,4 @@ r($bug->getProductLeftBugsTest($buildIDList[3], $productIDList[3])) && p() && e( r($bug->getProductLeftBugsTest($buildIDList[4], $productIDList[4])) && p() && e('BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5'); // 测试获取buildID为15 productID为5的bug r($bug->getProductLeftBugsTest($buildIDList[5], $productIDList[5])) && p() && e('bug16,BUG17,BUG18,SonarQube_Bug6'); // 测试获取buildID为16 productID为6的bug r($bug->getProductLeftBugsTest($buildIDList[6], $productIDList[1])) && p() && e('0'); // 测试获取不存在的build的bug -r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug +r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug \ No newline at end of file diff --git a/test/model/bug/getproductmemberpairs.php b/test/model/bug/getproductmemberpairs.php index ef67526ee9..a83443e796 100755 --- a/test/model/bug/getproductmemberpairs.php +++ b/test/model/bug/getproductmemberpairs.php @@ -9,18 +9,16 @@ title=bugModel->getProductMemberPairs(); cid=1 pid=1 -测试获取productID为1的bug的团队成员 >> A:admin,P:产品经理92,P:产品经理2,U:测试12 -测试获取productID为2的bug的团队成员 >> P:产品经理93,U:测试3,P:研发主管3,U:测试13 -测试获取productID为3的bug的团队成员 >> P:产品经理94,U:测试4,P:研发主管4,U:测试14 -测试获取productID为4的bug的团队成员 >> P:产品经理95,U:测试5,P:研发主管5,U:测试15 -测试获取productID为5的bug的团队成员 >> P:产品经理96,U:测试6,P:研发主管6,U:测试16 -测试获取productID为6的bug的团队成员 >> P:产品经理97,U:测试7,P:研发主管7,U:测试17 +测试获取productID为1的bug的团队成员 >> A:admin,P:产品经理92,P:产品经理2,U:测试12 +测试获取productID为2的bug的团队成员 >> P:产品经理93,U:测试3,P:研发主管3,U:测试13 +测试获取productID为3的bug的团队成员 >> P:产品经理94,U:测试4,P:研发主管4,U:测试14 +测试获取productID为4的bug的团队成员 >> P:产品经理95,U:测试5,P:研发主管5,U:测试15 +测试获取productID为5的bug的团队成员 >> P:产品经理96,U:测试6,P:研发主管6,U:测试16 +测试获取productID为6的bug的团队成员 >> P:产品经理97,U:测试7,P:研发主管7,U:测试17 测试获取不存在的product的bug的团队成员 >> 0 - */ - $productIDList = array('1', '2', '3', '4','5', '6', '1000001'); $bug=new bugTest(); @@ -30,4 +28,4 @@ r($bug->getProductMemberPairsTest($productIDList[2])) && p() && e('P:产品经 r($bug->getProductMemberPairsTest($productIDList[3])) && p() && e('P:产品经理95,U:测试5,P:研发主管5,U:测试15'); // 测试获取productID为4的bug的团队成员 r($bug->getProductMemberPairsTest($productIDList[4])) && p() && e('P:产品经理96,U:测试6,P:研发主管6,U:测试16'); // 测试获取productID为5的bug的团队成员 r($bug->getProductMemberPairsTest($productIDList[5])) && p() && e('P:产品经理97,U:测试7,P:研发主管7,U:测试17'); // 测试获取productID为6的bug的团队成员 -r($bug->getProductMemberPairsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug的团队成员 +r($bug->getProductMemberPairsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug的团队成员 \ No newline at end of file diff --git a/test/model/bug/getprojectbugs.php b/test/model/bug/getprojectbugs.php index 1e15ac68a2..059eef55f5 100755 --- a/test/model/bug/getprojectbugs.php +++ b/test/model/bug/getprojectbugs.php @@ -9,17 +9,16 @@ title=bugModel->getProjectBugs(); cid=1 pid=1 -测试获取项目ID为11的bug >> 测试单转Bug1;BUG3;BUG2 -测试获取项目ID为12的bug >> SonarQube_Bug2;BUG6;BUG5 -测试获取项目ID为13的bug >> 测试单转Bug3;BUG9;bug8 -测试获取项目ID为14的bug >> SonarQube_Bug4;BUG12;BUG11 -测试获取项目ID为15的bug >> 测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14 -测试获取项目ID为16的bug >> SonarQube_Bug6;BUG18;BUG17 +测试获取项目ID为11的bug >> 测试单转Bug1;BUG3;BUG2 +测试获取项目ID为12的bug >> SonarQube_Bug2;BUG6;BUG5 +测试获取项目ID为13的bug >> 测试单转Bug3;BUG9;bug8 +测试获取项目ID为14的bug >> SonarQube_Bug4;BUG12;BUG11 +测试获取项目ID为15的bug >> 测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14 +测试获取项目ID为16的bug >> SonarQube_Bug6;BUG18;BUG17 测试获取不存在的项目的bug >> 0 */ - $projectIDList = array('11', '12', '13', '14', '15', '16', '1000001'); $bug=new bugTest(); @@ -29,4 +28,4 @@ r($bug->getProjectBugsTest($projectIDList[2])) && p('0:title;1:title;2:title') & r($bug->getProjectBugsTest($projectIDList[3])) && p('0:title;1:title;2:title') && e('SonarQube_Bug4;BUG12;BUG11'); // 测试获取项目ID为14的bug r($bug->getProjectBugsTest($projectIDList[4])) && p('0:title;1:title;2:title') && e('测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14'); // 测试获取项目ID为15的bug r($bug->getProjectBugsTest($projectIDList[5])) && p('0:title;1:title;2:title') && e('SonarQube_Bug6;BUG18;BUG17'); // 测试获取项目ID为16的bug -r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug +r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug \ No newline at end of file diff --git a/test/model/bug/getprojects.php b/test/model/bug/getprojects.php index d5d899256c..7a7b8eaa5b 100755 --- a/test/model/bug/getprojects.php +++ b/test/model/bug/getprojects.php @@ -9,17 +9,16 @@ title=bugModel->getProjects(); cid=1 pid=1 -测试获取productID为1的项目 >> 项目1,项目11 -测试获取productID为2的项目 >> 项目2,项目12 -测试获取productID为3的项目 >> 项目3,项目13 -测试获取productID为4的项目 >> 项目4,项目14 -测试获取productID为5的项目 >> 项目5,项目15 -测试获取productID为6的项目 >> 项目6,项目16 +测试获取productID为1的项目 >> 项目1,项目11 +测试获取productID为2的项目 >> 项目2,项目12 +测试获取productID为3的项目 >> 项目3,项目13 +测试获取productID为4的项目 >> 项目4,项目14 +测试获取productID为5的项目 >> 项目5,项目15 +测试获取productID为6的项目 >> 项目6,项目16 测试获取不存在的product的项目 >> 0 */ - $productIDList = array('1', '2', '3', '4','5', '6', '1000001'); $bug=new bugTest(); @@ -29,4 +28,4 @@ r($bug->getProjectsTest($productIDList[2])) && p() && e('项目3,项目13'); // r($bug->getProjectsTest($productIDList[3])) && p() && e('项目4,项目14'); // 测试获取productID为4的项目 r($bug->getProjectsTest($productIDList[4])) && p() && e('项目5,项目15'); // 测试获取productID为5的项目 r($bug->getProjectsTest($productIDList[5])) && p() && e('项目6,项目16'); // 测试获取productID为6的项目 -r($bug->getProjectsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的项目 +r($bug->getProjectsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的项目 \ No newline at end of file diff --git a/test/model/bug/getreleasebugs.php b/test/model/bug/getreleasebugs.php index ef36931934..cdc0450a8d 100755 --- a/test/model/bug/getreleasebugs.php +++ b/test/model/bug/getreleasebugs.php @@ -18,7 +18,6 @@ pid=1 */ - $buildIDList = array('11', '12', '13', '14', '15', '16'); $productIDList = array('1', '2'); @@ -28,4 +27,4 @@ r($bug->getReleaseBugsTest($buildIDList[1], $productIDList[1])) && p('') && e('0 r($bug->getReleaseBugsTest($buildIDList[2], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为13 productID为1的bug r($bug->getReleaseBugsTest($buildIDList[3], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为14 productID为2的bug r($bug->getReleaseBugsTest($buildIDList[4], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug -r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为16 productID为2的bug +r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为16 productID为2的bug \ No newline at end of file diff --git a/test/model/bug/getstorybugcounts.php b/test/model/bug/getstorybugcounts.php index 56fd8de803..7f28878f50 100755 --- a/test/model/bug/getstorybugcounts.php +++ b/test/model/bug/getstorybugcounts.php @@ -9,17 +9,16 @@ title=bugModel->getStoryBugCounts(); cid=1 pid=1 -测试获取关联storyID为2的bug数量 >> 4 -测试获取关联storyID为6的bug数量 >> 4 -测试获取关联storyID为10的bug数量 >> 4 -测试获取关联storyID为14的bug数量 >> 4 -测试获取关联storyID为18的bug数量 >> 4 -测试获取关联storyID为22的bug数量 >> 4 +测试获取关联storyID为2的bug数量 >> 4 +测试获取关联storyID为6的bug数量 >> 4 +测试获取关联storyID为10的bug数量 >> 4 +测试获取关联storyID为14的bug数量 >> 4 +测试获取关联storyID为18的bug数量 >> 4 +测试获取关联storyID为22的bug数量 >> 4 测试获取关联storyID不存在的bug数量 >> 0 */ - $storyIDList = array('2', '6', '10', '14', '18', '22', '1000001'); $bug=new bugTest(); @@ -29,4 +28,4 @@ r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('4'); r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('4'); // 测试获取关联storyID为14的bug数量 r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('4'); // 测试获取关联storyID为18的bug数量 r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('4'); // 测试获取关联storyID为22的bug数量 -r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[6])) && p() && e('0'); // 测试获取关联storyID不存在的bug数量 +r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[6])) && p() && e('0'); // 测试获取关联storyID不存在的bug数量 \ No newline at end of file diff --git a/test/model/bug/getstorybugs.php b/test/model/bug/getstorybugs.php index 87b4133fe4..6b89205b5a 100755 --- a/test/model/bug/getstorybugs.php +++ b/test/model/bug/getstorybugs.php @@ -9,17 +9,16 @@ title=bugModel->getStoryBugs(); cid=1 pid=1 -测试获取关联需求ID为2的bug >> BUG1,BUG101,BUG201 -测试获取关联需求ID为6的bug >> BUG2,BUG102,BUG202 -测试获取关联需求ID为10的bug >> BUG3,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();103,BUG203 -测试获取关联需求ID为14的bug >> BUG4,bug104,BUG204 -测试获取关联需求ID为18的bug >> BUG5,BUG105,BUG205 -测试获取关联需求ID为22的bug >> BUG6,BUG106,BUG206 +测试获取关联需求ID为2的bug >> BUG1,BUG101,BUG201 +测试获取关联需求ID为6的bug >> BUG2,BUG102,BUG202 +测试获取关联需求ID为10的bug >> BUG3,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();103,BUG203 +测试获取关联需求ID为14的bug >> BUG4,bug104,BUG204 +测试获取关联需求ID为18的bug >> BUG5,BUG105,BUG205 +测试获取关联需求ID为22的bug >> BUG6,BUG106,BUG206 测试获取不存在的关联需求的bug >> 0 */ - $storyIDList = array('2', '6', '10', '14', '18', '22', '1000001'); $bug=new bugTest(); @@ -29,4 +28,4 @@ r($bug->getStoryBugsTest($storyIDList[2])) && p() && e('BUG3,缺陷!@()(){}|+=%^ r($bug->getStoryBugsTest($storyIDList[3])) && p() && e('BUG4,bug104,BUG204'); // 测试获取关联需求ID为14的bug r($bug->getStoryBugsTest($storyIDList[4])) && p() && e('BUG5,BUG105,BUG205'); // 测试获取关联需求ID为18的bug r($bug->getStoryBugsTest($storyIDList[5])) && p() && e('BUG6,BUG106,BUG206'); // 测试获取关联需求ID为22的bug -r($bug->getStoryBugsTest($storyIDList[6])) && p() && e('0'); // 测试获取不存在的关联需求的bug +r($bug->getStoryBugsTest($storyIDList[6])) && p() && e('0'); // 测试获取不存在的关联需求的bug \ No newline at end of file diff --git a/test/model/bug/gettoandcclist.php b/test/model/bug/gettoandcclist.php index eb74942821..604f9c20ad 100755 --- a/test/model/bug/gettoandcclist.php +++ b/test/model/bug/gettoandcclist.php @@ -9,15 +9,14 @@ title=bugModel->getToAndCcList(); cid=1 pid=1 -测试获取bug1的联系人 >> admin,admin -测试获取bug2的联系人 >> admin,admin -测试获取bug3的联系人 >> admin,admin +测试获取bug1的联系人 >> admin,admin +测试获取bug2的联系人 >> admin,admin +测试获取bug3的联系人 >> admin,admin 测试获取bug51的联系人 >> dev1,admin 测试获取bug81的联系人 >> test1,admin */ - $bugIDList = array('1', '2', '3', '51', '81'); $bug=new bugTest(); @@ -25,4 +24,4 @@ r($bug->getToAndCcListTest($bugIDList[0])) && p() && e('admin,admin'); // 测试 r($bug->getToAndCcListTest($bugIDList[1])) && p() && e('admin,admin'); // 测试获取bug2的联系人 r($bug->getToAndCcListTest($bugIDList[2])) && p() && e('admin,admin'); // 测试获取bug3的联系人 r($bug->getToAndCcListTest($bugIDList[3])) && p() && e('dev1,admin'); // 测试获取bug51的联系人 -r($bug->getToAndCcListTest($bugIDList[4])) && p() && e('test1,admin'); // 测试获取bug81的联系人 +r($bug->getToAndCcListTest($bugIDList[4])) && p() && e('test1,admin'); // 测试获取bug81的联系人 \ No newline at end of file diff --git a/test/model/bug/getunconfirmed.php b/test/model/bug/getunconfirmed.php index ce0d9fae1f..e8353dff6b 100755 --- a/test/model/bug/getunconfirmed.php +++ b/test/model/bug/getunconfirmed.php @@ -11,17 +11,17 @@ cid=1 pid=1 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1 -查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug >> BUG1 -查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 -查询产品1 2 3 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG5,BUG3,BUG1 -查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1 -查询产品1 3与模块1821, 1825下未确认的bug >> BUG1 -查询产品1 3与模块不存在的模块1000001下未确认的bug >> 0 -查询产品13 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1 -查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> 0 -查询不存在的产品10001 与模块1821, 1825下未确认的bug >> 0 -查询不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 -查询不存在的产品10001下未确认的bug >> 0 +查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug >> BUG1 +查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 +查询产品1 2 3 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG5,BUG3,BUG1 +查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1 +查询产品1 3与模块1821, 1825下未确认的bug >> BUG1 +查询产品1 3与模块不存在的模块1000001下未确认的bug >> 0 +查询产品13 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,BUG3,BUG1 +查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> 0 +查询不存在的产品10001 与模块1821, 1825下未确认的bug >> 0 +查询不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0 +查询不存在的产品10001下未确认的bug >> 0 */ @@ -41,4 +41,4 @@ r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[3])) && p('title') & r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下未确认的bug r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下未确认的bug -r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下未确认的bug +r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下未确认的bug \ No newline at end of file diff --git a/test/model/bug/getuserbugpairs.php b/test/model/bug/getuserbugpairs.php index 55f185fced..15b87c268c 100755 --- a/test/model/bug/getuserbugpairs.php +++ b/test/model/bug/getuserbugpairs.php @@ -12,12 +12,11 @@ pid=1 测试获取用户admin的bug >> 85 测试获取用户test1的bug >> 65 测试获取用户test2的bug >> 0 -测试获取用户dev1的bug >> 55 -测试获取用户po1的bug >> 0 +测试获取用户dev1的bug >> 55 +测试获取用户po1的bug >> 0 */ - $accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1'); $bug=new bugTest(); @@ -25,4 +24,4 @@ r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('85'); // 测试获 r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('65'); // 测试获取用户test1的bug r($bug->getUserBugPairsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug -r($bug->getUserBugPairsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug +r($bug->getUserBugPairsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug \ No newline at end of file diff --git a/test/model/bug/getuserbugs.php b/test/model/bug/getuserbugs.php index 167d6a14ea..01bbea8167 100755 --- a/test/model/bug/getuserbugs.php +++ b/test/model/bug/getuserbugs.php @@ -12,12 +12,11 @@ pid=1 测试获取用户admin的bug >> 85 测试获取用户test1的bug >> 85 测试获取用户test2的bug >> 0 -测试获取用户dev1的bug >> 55 -测试获取用户po1的bug >> 0 +测试获取用户dev1的bug >> 55 +测试获取用户po1的bug >> 0 */ - $accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1'); $bug=new bugTest(); @@ -25,4 +24,4 @@ r($bug->getUserBugsTest($accountIDList[0])) && p() && e('85'); // 测试获取 r($bug->getUserBugsTest($accountIDList[1])) && p() && e('85'); // 测试获取用户test1的bug r($bug->getUserBugsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug r($bug->getUserBugsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug -r($bug->getUserBugsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug +r($bug->getUserBugsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug \ No newline at end of file diff --git a/test/model/bug/isclickable.php b/test/model/bug/isclickable.php index 18ae54ae11..5cd10b26f7 100755 --- a/test/model/bug/isclickable.php +++ b/test/model/bug/isclickable.php @@ -11,29 +11,29 @@ cid=1 pid=1 状态为active confirmed为0的bug能否执行confirmbug动作 >> 1 -状态为active confirmed为0的bug能否执行resolve动作 >> 1 -状态为active confirmed为0的bug能否执行close动作 >> 2 -状态为active confirmed为0的bug能否执行activate动作 >> 2 -状态为active confirmed为0的bug能否执行tostory动作 >> 1 -状态为active confirmed为0的bug能否执行test动作 >> 1 +状态为active confirmed为0的bug能否执行resolve动作 >> 1 +状态为active confirmed为0的bug能否执行close动作 >> 2 +状态为active confirmed为0的bug能否执行activate动作 >> 2 +状态为active confirmed为0的bug能否执行tostory动作 >> 1 +状态为active confirmed为0的bug能否执行test动作 >> 1 状态为active confirmed为1的bug能否执行confirmbug动作 >> 2 -状态为active confirmed为1的bug能否执行resolve动作 >> 1 -状态为active confirmed为1的bug能否执行close动作 >> 2 -状态为active confirmed为1的bug能否执行activate动作 >> 2 -状态为active confirmed为1的bug能否执行tostory动作 >> 1 -状态为active confirmed为1的bug能否执行test动作 >> 1 -状态为resolved的bug能否执行confirmbug动作 >> 2 -状态为resolved的bug能否执行resolve动作 >> 2 -状态为resolved的bug能否执行close动作 >> 1 -状态为resolved的bug能否执行activate动作 >> 1 -状态为resolved的bug能否执行tostory动作 >> 2 -状态为resolved的bug能否执行test动作 >> 1 -状态为closed的bug能否执行confirmbug动作 >> 2 -状态为closed的bug能否执行resolve动作 >> 2 -状态为closed的bug能否执行close动作 >> 2 -状态为closed的bug能否执行activate动作 >> 1 -状态为closed的bug能否执行tostory动作 >> 2 -状态为closed的bug能否执行test动作 >> 1 +状态为active confirmed为1的bug能否执行resolve动作 >> 1 +状态为active confirmed为1的bug能否执行close动作 >> 2 +状态为active confirmed为1的bug能否执行activate动作 >> 2 +状态为active confirmed为1的bug能否执行tostory动作 >> 1 +状态为active confirmed为1的bug能否执行test动作 >> 1 +状态为resolved的bug能否执行confirmbug动作 >> 2 +状态为resolved的bug能否执行resolve动作 >> 2 +状态为resolved的bug能否执行close动作 >> 1 +状态为resolved的bug能否执行activate动作 >> 1 +状态为resolved的bug能否执行tostory动作 >> 2 +状态为resolved的bug能否执行test动作 >> 1 +状态为closed的bug能否执行confirmbug动作 >> 2 +状态为closed的bug能否执行resolve动作 >> 2 +状态为closed的bug能否执行close动作 >> 2 +状态为closed的bug能否执行activate动作 >> 1 +状态为closed的bug能否执行tostory动作 >> 2 +状态为closed的bug能否执行test动作 >> 1 */ @@ -41,7 +41,6 @@ $object1 = new stdclass(); $object1->status = 'active'; $object1->confirmed = 0; - $object2 = new stdclass(); $object2->status = 'active'; $object2->confirmed = 1; @@ -79,4 +78,4 @@ r($bug->isClickableTest($object4, $actionList[1])) && p() && e('2'); // 状态 r($bug->isClickableTest($object4, $actionList[2])) && p() && e('2'); // 状态为closed的bug能否执行close动作 r($bug->isClickableTest($object4, $actionList[3])) && p() && e('1'); // 状态为closed的bug能否执行activate动作 r($bug->isClickableTest($object4, $actionList[4])) && p() && e('2'); // 状态为closed的bug能否执行tostory动作 -r($bug->isClickableTest($object4, $actionList[5])) && p() && e('1'); // 状态为closed的bug能否执行test动作 +r($bug->isClickableTest($object4, $actionList[5])) && p() && e('1'); // 状态为closed的bug能否执行test动作 \ No newline at end of file diff --git a/test/model/bug/linkbugtobuild.php b/test/model/bug/linkbugtobuild.php index 83b22681f5..2f63aafc42 100755 --- a/test/model/bug/linkbugtobuild.php +++ b/test/model/bug/linkbugtobuild.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,11 @@ title=测试bugModel->linkBugToBuild(); cid=1 pid=1 -把bug 1 2关联到build 1 >> 1,2 -把bug 3 4关联到build 3 >> 3,4 -把bug 5 6关联到build 4 >> 5,6 -把bug 7 8关联到build 1 >> 1,2,7,8 -把bug 9 10关联到build 1 >> 1,2,7,8,9,10 - +把bug 1 2关联到build 1 >> 1,2 +把bug 3 4关联到build 3 >> 3,4 +把bug 5 6关联到build 5 >> 5,6 +把bug 5 6关联到build 1 >> 1,2,7,8 +把bug 5 6关联到build 1 >> 1,2,7,8,9,10 */ @@ -33,4 +33,4 @@ r($bug->linkBugToBuildTest($bugIDList2, $buildList[1])) && p('bugs') && e('3,4' r($bug->linkBugToBuildTest($bugIDList3, $buildList[2])) && p('bugs') && e('5,6'); // 把bug 5 6关联到build 5 r($bug->linkBugToBuildTest($bugIDList4, $buildList[0])) && p('bugs') && e('1,2,7,8'); // 把bug 5 6关联到build 1 r($bug->linkBugToBuildTest($bugIDList5, $buildList[0])) && p('bugs') && e('1,2,7,8,9,10'); // 把bug 5 6关联到build 1 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/processbuildforbugs.php b/test/model/bug/processbuildforbugs.php index 40c114fc22..3e9d8b07c4 100755 --- a/test/model/bug/processbuildforbugs.php +++ b/test/model/bug/processbuildforbugs.php @@ -9,17 +9,15 @@ title=bugModel->processBuildForBugs(); cid=1 pid=1 -测试处理bug1 2 3的openedBuild resolvedBuild字段 >> 产品发布9,;0,;产品发布9, -测试处理bug4 5 6的openedBuild resolvedBuild字段 >> 主干,;主干,;主干, +测试处理bug1 2 3的openedBuild resolvedBuild字段 >> 产品发布9,;0,;产品发布9, +测试处理bug4 5 6的openedBuild resolvedBuild字段 >> 主干,;主干,;主干, 测试处理bug51 52 53的openedBuild resolvedBuild字段 >> 主干,;主干,;主干, 测试处理bug54 55 56的openedBuild resolvedBuild字段 >> 主干,;主干,;主干,主干 测试处理bug81 82 83的openedBuild resolvedBuild字段 >> 主干,;主干,;主干, 测试处理bug84 85 86的openedBuild resolvedBuild字段 >> 主干,;主干,;主干, - */ - $bugIDList1 = array('1', '2', '3'); $bugIDList2 = array('4', '5', '6'); $bugIDList3 = array('51', '52', '53'); @@ -33,4 +31,4 @@ r($bug->processBuildForBugsTest($bugIDList2)) && p('4:openedBuild,resolvedBuild; r($bug->processBuildForBugsTest($bugIDList3)) && p('51:openedBuild,resolvedBuild;52:openedBuild,resolvedBuild;53:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug51 52 53的openedBuild resolvedBuild字段 r($bug->processBuildForBugsTest($bugIDList4)) && p('54:openedBuild,resolvedBuild;55:openedBuild,resolvedBuild;56:openedBuild,resolvedBuild') && e('主干,;主干,;主干,主干'); // 测试处理bug54 55 56的openedBuild resolvedBuild字段 r($bug->processBuildForBugsTest($bugIDList5)) && p('81:openedBuild,resolvedBuild;82:openedBuild,resolvedBuild;83:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug81 82 83的openedBuild resolvedBuild字段 -r($bug->processBuildForBugsTest($bugIDList6)) && p('84:openedBuild,resolvedBuild;85:openedBuild,resolvedBuild;86:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug84 85 86的openedBuild resolvedBuild字段 +r($bug->processBuildForBugsTest($bugIDList6)) && p('84:openedBuild,resolvedBuild;85:openedBuild,resolvedBuild;86:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug84 85 86的openedBuild resolvedBuild字段 \ No newline at end of file diff --git a/test/model/bug/resolve.php b/test/model/bug/resolve.php index b5d3aa1339..922a6dbabf 100755 --- a/test/model/bug/resolve.php +++ b/test/model/bug/resolve.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,15 +12,15 @@ cid=1 pid=1 解决原因为设计如此 指派人变化的bug >> resolvedBuild,,trunk;resolution,,bydesign -不填解决原因的bug >> 『解决方案』不能为空。 -解决原因为重复Bug 不填bugID的bug >> 『重复ID』不能为空。 -解决原因为重复Bug 填bugID的bug >> duplicateBug,0,1;status,active,resolved -解决原因为外部原因的bug >> resolvedBuild,,trunk;resolution,,external -解决原因为已解决的bug >> resolvedBuild,,trunk;resolution,,fixed -解决原因为无法重现的bug >> resolvedBuild,,trunk;resolution,,notrepro -解决原因为延期处理的bug >> resolvedBuild,,trunk;resolution,,postponed -解决原因为不予解决的bug >> resolvedBuild,,trunk;resolution,,willnotfix -解决已解决的bug >> resolvedBuild,,trunk;confirmed,0,1 +不填解决原因的bug >> 『解决方案』不能为空。 +解决原因为重复Bug 不填bugID的bug >> 『重复ID』不能为空。 +解决原因为重复Bug 填bugID的bug >> duplicateBug,0,1;status,active,resolved +解决原因为外部原因的bug >> resolvedBuild,,trunk;resolution,,external +解决原因为已解决的bug >> resolvedBuild,,trunk;resolution,,fixed +解决原因为无法重现的bug >> resolvedBuild,,trunk;resolution,,notrepro +解决原因为延期处理的bug >> resolvedBuild,,trunk;resolution,,postponed +解决原因为不予解决的bug >> resolvedBuild,,trunk;resolution,,willnotfix +解决已解决的bug >> resolvedBuild,,trunk;confirmed,0,1 */ @@ -46,4 +47,4 @@ r($bug->resolveTest($bugIDList[4],$bug5)) && p('0:field,old,new;3:field,old,n r($bug->resolveTest($bugIDList[5],$bug6)) && p('0:field,old,new;3:field,old,new') && e('resolvedBuild,,trunk;resolution,,postponed'); // 解决原因为延期处理的bug r($bug->resolveTest($bugIDList[6],$bug7)) && p('0:field,old,new;3:field,old,new') && e('resolvedBuild,,trunk;resolution,,willnotfix'); // 解决原因为不予解决的bug r($bug->resolveTest($bugIDList[7],$bug51)) && p('0:field,old,new;3:field,old,new') && e('resolvedBuild,,trunk;confirmed,0,1'); // 解决已解决的bug -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/bug/update.php b/test/model/bug/update.php index 05908734c5..81d59effdb 100755 --- a/test/model/bug/update.php +++ b/test/model/bug/update.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -9,16 +10,14 @@ title=bugModel->update(); cid=1 pid=1 -测试更新bug名称 >> title,BUG1,john -测试更新bug类型 >> type,codeerror,config -测试更新bug名称和类型 >> title,john,jack;type,config,install -测试不更改bug名称 >> 没有数据更新 -测试不更改bug类型 >> 没有数据更新 - +测试更新bug名称 >> title,BUG1,john +测试更新bug类型 >> type,codeerror,config +测试更新bug名称和类型 >> title,john,jack;type,config,install +测试不更改bug名称 >> 没有数据更新 +测试不更改bug类型 >> 没有数据更新 */ - $projectIdList = array('1', '2'); $t_uptitle = array('title' => 'john'); @@ -33,4 +32,4 @@ r($bug->updateObject($projectIdList[0], $t_uptype)) && p('0:field,old,new') r($bug->updateObject($projectIdList[0], $t_typetitle)) && p('0:field,old,new;1:field,old,new') && e('title,john,jack;type,config,install'); // 测试更新bug名称和类型 r($bug->updateObject($projectIdList[0], $t_untitle)) && p() && e('没有数据更新'); // 测试不更改bug名称 r($bug->updateObject($projectIdList[0], $t_untype)) && p() && e('没有数据更新'); // 测试不更改bug类型 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/batchunlinkbug.php b/test/model/build/batchunlinkbug.php index e6931c0f27..bc3f8c3120 100755 --- a/test/model/build/batchunlinkbug.php +++ b/test/model/build/batchunlinkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ $build = new buildTest(); r($build->batchUnlinkBugTest($buildIDList[0],$bugs)) && p('1:bugs,project') && e(',11');//批量解除项目版本bug r($build->batchUnlinkBugTest($buildIDList[1],$bugs)) && p('11:bugs,execution') && e(',101');//批量解除执行版本bug -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/batchunlinkstory.php b/test/model/build/batchunlinkstory.php index 3efbb65e34..ce19e8c08d 100755 --- a/test/model/build/batchunlinkstory.php +++ b/test/model/build/batchunlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ $build = new buildTest(); r($build->batchUnlinkStoryTest($buildIDList[0],$stories)) && p('1:stories,project') && e(',11'); //批量解除项目版本需求 r($build->batchUnlinkStoryTest($buildIDList[1],$stories)) && p('11:stories,execution') && e(',101'); //批量解除执行版本需求 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/create.php b/test/model/build/create.php index 676a597e90..72bb4d6afc 100755 --- a/test/model/build/create.php +++ b/test/model/build/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -42,4 +43,4 @@ r($build->createTest($executionIDList[0], $noName)) && p('name:0') & r($build->createTest($executionIDList[0], $noProduct)) && p('product:0') && e('『产品』不能为空。'); //产品为空测试 r($build->createTest($executionIDList[0], $noBuilder)) && p('builder:0') && e('『构建者』不能为空。'); //构建者为空测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/linkbug.php b/test/model/build/linkbug.php index b2e6a9e1dc..8e1fe6b115 100755 --- a/test/model/build/linkbug.php +++ b/test/model/build/linkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($build->linkBugTest($buildIDList[0], $nomalBuglink)) && p('1:bugs,project') r($build->linkBugTest($buildIDList[1], $nomalBuglink)) && p('11:bugs,execution') && e(',311,301,101');//执行版本链接bug r($build->linkBugTest($buildIDList[0], $noBuglink)) && p('1:bugs') && e(',311,301,'); //不传bugID // -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/linkstory.php b/test/model/build/linkstory.php index 9ace56d457..59f15ba03d 100755 --- a/test/model/build/linkstory.php +++ b/test/model/build/linkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($build->linkStoryTest($buildIDList[0], $nomalStorylink)) && p('1:stories,proje r($build->linkStoryTest($buildIDList[1], $nomalStorylink)) && p('11:stories,execution') && e(',2,4,101'); r($build->linkStoryTest($buildIDList[0], $noStorylink)) && p('1:stories') && e(''); -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/unlinkbug.php b/test/model/build/unlinkbug.php index 3034ea2f45..9255f90886 100755 --- a/test/model/build/unlinkbug.php +++ b/test/model/build/unlinkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($build->unlinkBugTest($buildIDList[0],$bugs,$bugs[0])) && p('1:bugs,project') r($build->unlinkBugTest($buildIDList[1],$bugs,$bugs[1])) && p('11:bugs,execution') && e(',301,101'); //执行版本解除bug r($build->unlinkBugTest($buildIDList[1],$bugs,'')) && p('objectID:0') && e('『对象ID』应当是数字。');//不传入BugID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/unlinkstory.php b/test/model/build/unlinkstory.php index 1a1fbba714..ab5b4e080f 100755 --- a/test/model/build/unlinkstory.php +++ b/test/model/build/unlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ r($build->unlinkStoryTest($buildIDList[0],$stories,$stories[0])) && p('1:stories r($build->unlinkStoryTest($buildIDList[1],$stories,$stories[1])) && p('11:stories,execution') && e(',2,101'); //解除执行版本需求 r($build->unlinkStoryTest($buildIDList[0],$stories,'')) && p('objectID:0') && e('『对象ID』应当是数字。');//需求id为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/update.php b/test/model/build/update.php index fda8a97188..347549e570 100755 --- a/test/model/build/update.php +++ b/test/model/build/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($build->updateTest($buildIDList[0], $pathBuild)) && p('1:field,old,new') r($build->updateTest($buildIDList[0], $noName)) && p('name:0') && e('『名称编号』不能为空。'); //名称为空测试 r($build->updateTest($buildIDList[0], $noBuilder)) && p('builder:0') && e('『构建者』不能为空。'); //构建者为空测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/build/updatelinkedbug.php b/test/model/build/updatelinkedbug.php index e468a6cae2..5af3efcd4e 100755 --- a/test/model/build/updatelinkedbug.php +++ b/test/model/build/updatelinkedbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -36,4 +37,4 @@ r($executionLink) && p('311:resolvedBuild') && e('1'); //执行版本修 r($noResolvedByLink) && p('302:resolvedBy') && e(''); //不设置解决人 r($noBugs) && p() && e('0'); //不设置bugID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/caselib/batchcreatecase.php b/test/model/caselib/batchcreatecase.php index 70fd2f2226..074c29d3da 100755 --- a/test/model/caselib/batchcreatecase.php +++ b/test/model/caselib/batchcreatecase.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -36,4 +37,4 @@ r($total) && p() && e('12'); // 添加两 r($cases) && p('411:title,type') && e('测试导入添加1,performance'); // 添加数据之后查询新加用例的名称,用例类型 r($cases) && p('412:title,type') && e('测试导入添加2,unit'); // 添加数据之后查询新加用例的名称,用例类型 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/caselib/create.php b/test/model/caselib/create.php index 3a7d717eef..62e6ffa189 100755 --- a/test/model/caselib/create.php +++ b/test/model/caselib/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($result2) && p('name') && e('测试用例库名称'); //测试添加的 r($result2) && p('desc') && e('测试用例库描述'); //测试添加的描述信息 r($result3) && p('name:0') && e('『名称』已经有『测试用例库名称』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试名称是空时候添加 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/caselib/createfromimport.php b/test/model/caselib/createfromimport.php index dc3460156c..7c877d3471 100755 --- a/test/model/caselib/createfromimport.php +++ b/test/model/caselib/createfromimport.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($total) && p() && e('12'); //添加 r($cases) && p('411:title,keywords') && e('测试导入添加1,keywords1'); //添加数据之后查询新加用例的名称,关键字 r($cases) && p('412:title,keywords') && e('测试导入添加2,keywords2'); //添加数据之后查询新加用例的名称,关键字 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/caselib/delete.php b/test/model/caselib/delete.php index c847a8fa88..dca5b0bfe0 100755 --- a/test/model/caselib/delete.php +++ b/test/model/caselib/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $lib = $caselib->deleteTest(201); r($lib) && p('deleted') && e('1'); //测试删除之后deleted值是否为1 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/caselib/savelibstate.php b/test/model/caselib/savelibstate.php index 3555267ba5..18ccf098df 100755 --- a/test/model/caselib/savelibstate.php +++ b/test/model/caselib/savelibstate.php @@ -18,4 +18,4 @@ $caselib = new caselibTest(); $libs = $tester->loadModel('caselib')->getLibraries(); $id = $caselib->saveLibStateTest(201, $libs); -r($id) && p() && e('201'); //保存用例库状态之后返回值 +r($id) && p() && e('201'); //保存用例库状态之后返回值 \ No newline at end of file diff --git a/test/model/caselib/setlibmenu.php b/test/model/caselib/setlibmenu.php index f209bb65d8..5956ccde75 100755 --- a/test/model/caselib/setlibmenu.php +++ b/test/model/caselib/setlibmenu.php @@ -22,4 +22,4 @@ $info = $caselib->setLibMenuTest($libs, 201); $menuStr = << EOT; -r($tester->lang->switcherMenu == trim($menuStr)) && p() && e('1'); //修改下拉菜单之后返回值 +r($tester->lang->switcherMenu == trim($menuStr)) && p() && e('1'); //修改下拉菜单之后返回值 \ No newline at end of file diff --git a/test/model/caselib/update.php b/test/model/caselib/update.php index eb904f76b0..2f3502a95a 100755 --- a/test/model/caselib/update.php +++ b/test/model/caselib/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($lib1) && p('name:0') && e('『name』不能为空。'); //测试更新名称 r($lib2) && p('name') && e('测试修改名称'); //测试更新之后名称信息 r($lib2) && p('desc') && e('测试修改描述'); //测试更新之后描述信息 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/ci/sendrequest.php b/test/model/ci/sendrequest.php old mode 100644 new mode 100755 index ea7f4e49a1..cd6bf7cf7c --- a/test/model/ci/sendrequest.php +++ b/test/model/ci/sendrequest.php @@ -33,4 +33,4 @@ $normalData->PARAM_TAG = 'tag_test1'; r($ci->sendRequestTest($url, $normalData, $userPWD)) && p() && e('1'); //成功执行jenkins构建 r($ci->sendRequestTest($url, $normalData, $errorPWD)) && p() && e('0'); //错误的密码执行jenkins构建 r($ci->sendRequestTest($url, $emptyData, $userPWD)) && p() && e('1'); //空的参数执行jenkins构建 -r($ci->sendRequestTest($errorUrl, $normalData, $userPWD)) && p() && e('0'); //错误的路径执行jenkins构建 +r($ci->sendRequestTest($errorUrl, $normalData, $userPWD)) && p() && e('0'); //错误的路径执行jenkins构建 \ No newline at end of file diff --git a/test/model/ci/setmenu.php b/test/model/ci/setmenu.php old mode 100644 new mode 100755 index 1b2c298dc3..51415b8a11 --- a/test/model/ci/setmenu.php +++ b/test/model/ci/setmenu.php @@ -10,10 +10,10 @@ title=测试 ciModel->setMenu(); cid=1 pid=1 -替换devops模块的参数 >> 代码|repo|browse|repoID=1 +替换devops模块导航的参数 >> 代码|repo|browse|repoID=1 */ $ci = new ciTest(); -r($ci->setMenuTest()) && p('link') && e('代码|repo|browse|repoID=1'); //替换devops模块导航的参数 +r($ci->setMenuTest()) && p('link') && e('代码|repo|browse|repoID=1'); //替换devops模块导航的参数 \ No newline at end of file diff --git a/test/model/ci/synccompilestatus.php b/test/model/ci/synccompilestatus.php old mode 100644 new mode 100755 index 80d017226e..7693b762bd --- a/test/model/ci/synccompilestatus.php +++ b/test/model/ci/synccompilestatus.php @@ -16,4 +16,4 @@ pid=1 $ci = new ciTest(); -r($ci->syncCompileStatusTest(1)) && p('status') && e('created'); //同步jenkins构建结果 +r($ci->syncCompileStatusTest(1)) && p('status') && e('created'); //同步jenkins构建结果 \ No newline at end of file diff --git a/test/model/ci/syncgitlabtaskstatus.php b/test/model/ci/syncgitlabtaskstatus.php old mode 100644 new mode 100755 index 49e8794781..659bd7078c --- a/test/model/ci/syncgitlabtaskstatus.php +++ b/test/model/ci/syncgitlabtaskstatus.php @@ -10,10 +10,10 @@ title=测试 ciModel->syncGitlabTaskStatus(); cid=1 pid=1 -同步gitlab构建结果 >> 1 + */ $ci = new ciTest(); -r($ci->syncGitlabTaskStatusTest(2)) && p() && e(1); //同步jenkins构建结果 +r($ci->syncGitlabTaskStatusTest(2)) && p() && e(1); //同步jenkins构建结果 \ No newline at end of file diff --git a/test/model/ci/updatebuildstatus.php b/test/model/ci/updatebuildstatus.php old mode 100644 new mode 100755 index 1a85bd0d72..d4c5f26f76 --- a/test/model/ci/updatebuildstatus.php +++ b/test/model/ci/updatebuildstatus.php @@ -20,4 +20,4 @@ $ci = new ciTest(); r($ci->updateBuildStatusTest(1, 'building')) && p('status') && e('building'); //更新构建任务状态为构建中 r($ci->updateBuildStatusTest(1, 'success')) && p('status') && e('success'); //更新构建任务状态为成功 -r($ci->updateBuildStatusTest(1, 'failure')) && p('status') && e('failure'); //更新构建任务状态为失败 +r($ci->updateBuildStatusTest(1, 'failure')) && p('status') && e('failure'); //更新构建任务状态为失败 \ No newline at end of file diff --git a/test/model/company/update.php b/test/model/company/update.php index c0adfe28fd..762054bf4b 100755 --- a/test/model/company/update.php +++ b/test/model/company/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($company->updateObject($companyID, $changeWebsite)) && p('website') && e('ww r($company->updateObject($companyID, $changeBackyard)) && p('backyard') && e('https://'); // 修改公司网址前缀 r($company->updateObject($companyID, $changeGuest)) && p('guest') && e('1'); // 修改公司游客访问控制 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/compile/createbyjob.php b/test/model/compile/createbyjob.php index eb4927644f..54a4e6b8ba 100755 --- a/test/model/compile/createbyjob.php +++ b/test/model/compile/createbyjob.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,12 @@ title=测试 compileModel->createByJob(); cid=1 pid=1 +检查是否可以拿到通过id为1的job数据创建的compile >> 这是一个Job1 +检查是否可以拿到通过不存在的job数据创建的compile >> 0 + */ $compile = new compileTest(); r($compile->createByJobTest('1', '123')) && p('0:name') && e('这是一个Job1'); //检查是否可以拿到通过id为1的job数据创建的compile r($compile->createByJobTest('3', '123')) && p('0:name') && e('0'); //检查是否可以拿到通过不存在的job数据创建的compile -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/compile/exec.php b/test/model/compile/exec.php index 2eeba59a0d..4a2385dc77 100755 --- a/test/model/compile/exec.php +++ b/test/model/compile/exec.php @@ -10,6 +10,10 @@ title=测试 compileModel->exec(); cid=1 pid=1 +检测job不存在时是否能执行编译 >> 0 +检测job存在但是->id不等于->job是否能执行编译 >> 1 +检测job存在同时->id等于->job是否能执行编译 >> 1 + */ $compile1 = new stdclass(); $compile1->id = 2; @@ -30,4 +34,4 @@ $compile = new compileTest(); r($compile->execTest($compile1)) && p() && e('0'); //检测job不存在时是否能执行编译 r($compile->execTest($compile2)) && p() && e('1'); //检测job存在但是$compile->id不等于$compile->job是否能执行编译 -r($compile->execTest($compile3)) && p() && e('1'); //检测job存在同时$compile->id等于$compile->job是否能执行编译 +r($compile->execTest($compile3)) && p() && e('1'); //检测job存在同时$compile->id等于$compile->job是否能执行编译 \ No newline at end of file diff --git a/test/model/compile/getbuildurl.php b/test/model/compile/getbuildurl.php index 67546cc4fa..e1cd069fec 100755 --- a/test/model/compile/getbuildurl.php +++ b/test/model/compile/getbuildurl.php @@ -10,6 +10,11 @@ title=测试 compileModel->getBuildUrl(); cid=1 pid=1 +检测password为空时获取的信息 >> 123456:zxd +检测token为空时获取的信息 >> pms.cc.cc/job/11/buildWithParameters/api/json +检测jenkins为空时获取的信息 >> /job//buildWithParameters/api/json +检测jenkins为空时获取的信息 >> : + */ $jenkins1 = new stdclass(); $jenkins1->url = 'pms.cc.cc'; @@ -36,4 +41,4 @@ $compile = new compileTest(); r($compile->getBuildUrlTest($jenkins1)) && p('userPWD') && e('123456:zxd'); //检测password为空时获取的信息 r($compile->getBuildUrlTest($jenkins2)) && p('url') && e('pms.cc.cc/job/11/buildWithParameters/api/json'); //检测token为空时获取的信息 r($compile->getBuildUrlTest($jenkins3)) && p('url') && e('/job//buildWithParameters/api/json'); //检测jenkins为空时获取的信息 -r($compile->getBuildUrlTest($jenkins3)) && p('userPWD') && e(':'); //检测jenkins为空时获取的信息 +r($compile->getBuildUrlTest($jenkins3)) && p('userPWD') && e(':'); //检测jenkins为空时获取的信息 \ No newline at end of file diff --git a/test/model/compile/getbyid.php b/test/model/compile/getbyid.php index 1fdfd20372..ac65ce4f48 100755 --- a/test/model/compile/getbyid.php +++ b/test/model/compile/getbyid.php @@ -10,9 +10,12 @@ title=测试 compileModel->getByID(); cid=1 pid=1 +检查当id存在的时候是否能拿到数据 >> 这是一个Job1 +检查当id不存在的时候返回的结果 >> 0 + */ $compile = new compileTest(); r($compile->getByIDTest('1')) && p('name') && e('这是一个Job1'); //检查当id存在的时候是否能拿到数据 -r($compile->getByIDTest('2')) && p('name') && e('0'); //检查当id不存在的时候返回的结果 +r($compile->getByIDTest('2')) && p('name') && e('0'); //检查当id不存在的时候返回的结果 \ No newline at end of file diff --git a/test/model/compile/getlastresult.php b/test/model/compile/getlastresult.php index 44ee00fb5f..5a84477f3c 100755 --- a/test/model/compile/getlastresult.php +++ b/test/model/compile/getlastresult.php @@ -10,9 +10,12 @@ title=测试 compileModel->getLastResult(); cid=1 pid=1 +检查id存在的时候是否能拿到数据 >> admin +检查id不存在的时候返回的结果 >> 0 + */ $compile = new compileTest(); r($compile->getLastResultTest('1')) && p('createdBy') && e('admin'); //检查id存在的时候是否能拿到数据 -r($compile->getLastResultTest('3')) && p('createdBy') && e('0'); //检查id不存在的时候返回的结果 +r($compile->getLastResultTest('3')) && p('createdBy') && e('0'); //检查id不存在的时候返回的结果 \ No newline at end of file diff --git a/test/model/compile/getlist.php b/test/model/compile/getlist.php index 32aea0349a..da708cec52 100755 --- a/test/model/compile/getlist.php +++ b/test/model/compile/getlist.php @@ -10,9 +10,12 @@ title=测试 compileModel->getList(); cid=1 pid=1 +检查是否能获取到数据 >> 这是一个Job1 +检查获取不存在的数据会返回什么 >> 0 + */ $compile = new compileTest(); r($compile->getListTest('1')) && p('1:name') && e('这是一个Job1'); //检查是否能获取到数据 -r($compile->getListTest('3')) && p('') && e('0'); //检查获取不存在的数据会返回什么 +r($compile->getListTest('3')) && p('') && e('0'); //检查获取不存在的数据会返回什么 \ No newline at end of file diff --git a/test/model/compile/getlistbyjobid.php b/test/model/compile/getlistbyjobid.php index 50ed6f993c..3a77388ca3 100755 --- a/test/model/compile/getlistbyjobid.php +++ b/test/model/compile/getlistbyjobid.php @@ -10,9 +10,12 @@ title=测试 compileModel->getListByJobID(); cid=1 pid=1 +检查是否能拿到数据 >> 这是一个Job1 +检查传一个不存在的jobid会返回什么 >> 0 + */ $compile = new compileTest(); r($compile->getListByJobIDTest('1')) && p('1:name') && e('这是一个Job1'); //检查是否能拿到数据 -r($compile->getListByJobIDTest('3')) && p() && e('0'); //检查传一个不存在的jobid会返回什么 +r($compile->getListByJobIDTest('3')) && p() && e('0'); //检查传一个不存在的jobid会返回什么 \ No newline at end of file diff --git a/test/model/cron/changestatus.php b/test/model/cron/changestatus.php index 041fdf4539..c2ff2a497d 100755 --- a/test/model/cron/changestatus.php +++ b/test/model/cron/changestatus.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ $cronInfo = $tester->cron->getById($cronID); r($result) && p() && e('1'); //更新定时任务状态之后查看返回值 r($cronInfo) && p('status') && e('stop'); //更新定时任务状态之后查看状态值 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/cron/changestatusrunning.php b/test/model/cron/changestatusrunning.php index ff13f28fea..74fb49228b 100755 --- a/test/model/cron/changestatusrunning.php +++ b/test/model/cron/changestatusrunning.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ $cronInfo = $tester->cron->getById($cronID); r($result) && p() && e('1'); // 更新之后查看返回值是否是1 r($cronInfo) && p('status') && e('running'); // 更新之后查看状态值是否是running -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/cron/checkrule.php b/test/model/cron/checkrule.php index 45d0043d36..3f474d2cb4 100755 --- a/test/model/cron/checkrule.php +++ b/test/model/cron/checkrule.php @@ -49,4 +49,4 @@ r($res2) && p() && e('"小时" 填写的不是合法的值'); // 定时任务' r($res3) && p() && e('"天" 填写的不是合法的值'); // 定时任务'天'填写不正确情况 r($res4) && p() && e('"月" 填写的不是合法的值'); // 定时任务'月'填写不正确情况 r($res5) && p() && e('"周" 填写的不是合法的值'); // 定时任务'周'填写不正确情况 -r($res6) && p() && e('『命令』不能为空。'); // 定时任务'命令'填写不正确情况 +r($res6) && p() && e('『命令』不能为空。'); // 定时任务'命令'填写不正确情况 \ No newline at end of file diff --git a/test/model/cron/create.php b/test/model/cron/create.php index 19fe20253c..64c51baf4f 100755 --- a/test/model/cron/create.php +++ b/test/model/cron/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($result1[0]) && p() && e('『命令』不能为空'); //命 r($result2) && p('command,type') && e('test comand,zentao');//添加之后对比添加数据信息 r($result2) && p('m,h,dom,mon,dow') && e('55,23,30,12,6'); //添加之后对比添加数据信息 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/cron/markcronstatus.php b/test/model/cron/markcronstatus.php index d8b4eb0a78..d765906cfd 100755 --- a/test/model/cron/markcronstatus.php +++ b/test/model/cron/markcronstatus.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ $tester->dao->update(TABLE_CONFIG)->set('id')->eq($id)->where( 'id')->eq($config r($config1) && p('value') && e('stop'); //修改配置项之后查看更新信息 r($config2) && p('value') && e('run'); //修改配置项之后查看更新信息 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/cron/parsecron.php b/test/model/cron/parsecron.php index f288d827bd..8a59b0de09 100755 --- a/test/model/cron/parsecron.php +++ b/test/model/cron/parsecron.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ $parse = $cron->parseCronTest($crons); r($parse) && p('19:command') && e('moduleName=measurement&methodName=execCrontabQueue');//获取id为19的定时任务的定时信息和命令信息 r($parse) && p('15:command') && e('moduleName=execution&methodName=computeTaskEffort'); //获取id为15的定时任务的定时信息和命令信息 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/cron/update.php b/test/model/cron/update.php index 1ad1a82988..628f365586 100755 --- a/test/model/cron/update.php +++ b/test/model/cron/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -36,4 +37,4 @@ r($result1[0]) && p() && e('『命令』不能为空'); //命 r($result2) && p('command,type') && e('test comand,zentao');//更新之后对比更新数据信息 r($result2) && p('m,h,dom,mon,dow') && e('55,23,30,12,6'); //更新之后对比更新数据信息 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/deleteitems.php b/test/model/custom/deleteitems.php index a7cc6f8bb3..74154f7034 100755 --- a/test/model/custom/deleteitems.php +++ b/test/model/custom/deleteitems.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($custom->deleteItemsTest($paramString[2])) && p() && e('0'); //测试参数 r($custom->deleteItemsTest($paramString[3])) && p() && e('0'); //测试参数为lang,key,section r($custom->deleteItemsTest($paramString[4])) && p() && e('0'); //测试参数为lang,key,section,module r($custom->deleteItemsTest($paramString[5])) && p() && e('0'); //测试参数为lang,key,section,module,vision -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/preparesql.php b/test/model/custom/preparesql.php index 8e7964c4ee..effa115377 100755 --- a/test/model/custom/preparesql.php +++ b/test/model/custom/preparesql.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -47,4 +48,4 @@ r($custom->prepareSQLTest($paramString[2], $method[1])) && p() && r($custom->prepareSQLTest($paramString[3], $method[1])) && p() && e('0'); //测试method为delete,paramString参数为lang,key,section r($custom->prepareSQLTest($paramString[4], $method[1])) && p() && e('0'); //测试method为delete,paramString参数为lang,key,section,module r($custom->prepareSQLTest($paramString[5], $method[1])) && p() && e('0'); //测试method为delete,paramString参数为lang,key,section,module,vision -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/saverequiredfields.php b/test/model/custom/saverequiredfields.php index d52f33a695..dd02f2e4bc 100755 --- a/test/model/custom/saverequiredfields.php +++ b/test/model/custom/saverequiredfields.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -146,4 +147,4 @@ r($custom->saveRequiredFieldsTest($moduleName[5], $requiredFields['testcaseField r($custom->saveRequiredFieldsTest($moduleName[5], $requiredFields['testcaseFields6'], $fieldsType[0])) && p('value') && e('stage,story,title,type'); //测试moduleName为testcase,requiredFields中的create,edit各存在多个值 r($custom->saveRequiredFieldsTest($moduleName[3], $requiredFields['taskFields6'], $fieldsType[2])) && p('value') && e('comment,realStarted,finishedDate,currentConsumed');//测试moduleName为task,requiredFields中的finish存在一个值 -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/setconcept.php b/test/model/custom/setconcept.php index 6f22e6e75e..2642f8bbf9 100755 --- a/test/model/custom/setconcept.php +++ b/test/model/custom/setconcept.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ $custom = new customTest(); r($custom->setConceptTest($sprintConcept[0])) && p('id') && e('45'); //测试sprintConcept值为0,编辑为产品 - 项目 r($custom->setConceptTest($sprintConcept[1])) && p('id') && e('45'); //测试sprintConcept值为1,编辑为产品 - 迭代 r($custom->setConceptTest($sprintConcept[2])) && p('id') && e('45'); //测试sprintConcept值为2,编辑为产品 - 冲刺 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/setitem.php b/test/model/custom/setitem.php index d598e278f8..c9935ed5b2 100755 --- a/test/model/custom/setitem.php +++ b/test/model/custom/setitem.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($custom->setItemTest($path[3], $value[0])) && p('lang,module,key,value') && e( r($custom->setItemTest($path[3], $value[1])) && p('lang,module,key,value') && e('zh-cn,story,feature,'); //测试path中.出现的个数为3,value为空,能保存 r($custom->setItemTest($path[4], $value[0])) && p('lang,module,key,value') && e('zh-cn,story,feature,功能'); //测试path中.出现的个数为4,value正常存在,能保存 r($custom->setItemTest($path[4], $value[1])) && p('lang,module,key,value') && e('zh-cn,story,feature,'); //测试path中.出现的个数为5,value为空,能保存 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/seturandsr.php b/test/model/custom/seturandsr.php index 6945c0d134..32132c0241 100755 --- a/test/model/custom/seturandsr.php +++ b/test/model/custom/seturandsr.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ $custom = new customTest(); r($custom->setURAndSRTest($SRName[0])) && p() && e('1'); //测试SRName值为空 r($custom->setURAndSRTest($SRName[1])) && p() && e('1'); //测试SRName值有一个 r($custom->setURAndSRTest($SRName[2])) && p() && e('1'); //测试SRName值有多个 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/custom/updateurandsr.php b/test/model/custom/updateurandsr.php index 10f975e9f2..d523c45cd3 100755 --- a/test/model/custom/updateurandsr.php +++ b/test/model/custom/updateurandsr.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($custom->updateURAndSRTest($key[1], $SRName[0])) && p() && e('0'); r($custom->updateURAndSRTest($key[1], $SRName[1])) && p() && e('0'); //测试修改key为0,SRName值更改为软件需求 r($custom->updateURAndSRTest($key[1], $SRName[2])) && p() && e('0'); //测试修改key为0,SRName值更改为软件需求1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/datatable/getFieldList.php b/test/model/datatable/getFieldList.php old mode 100644 new mode 100755 index ef6183a769..827b9972e9 --- a/test/model/datatable/getFieldList.php +++ b/test/model/datatable/getFieldList.php @@ -10,9 +10,9 @@ title=测试 datatableModel::getFieldList(); cid=1 pid=1 -获取产品模块browse方法自定义列 >> ID -获取项目模块browse方法自定义列 >> 项目名称 -获取执行模块task方法自定义列 >> 70 +获取产品模块browse方法自定义列 >> ID +获取项目模块browse方法自定义列 >> 项目名称 +获取执行模块task方法自定义列 >> 70 获取测试用例模块browse方法自定义列 >> auto */ @@ -21,4 +21,4 @@ $datatable = new datatableTest(); r($datatable->getFieldListTest('product', 'browse')) && p('id:title') && e('ID'); //获取产品模块browse方法自定义列 r($datatable->getFieldListTest('project', 'browse')) && p('name:title') && e('项目名称'); //获取项目模块browse方法自定义列 r($datatable->getFieldListTest('execution', 'task')) && p('id:width') && e('70'); //获取执行模块task方法自定义列 -r($datatable->getFieldListTest('testcase', 'browse')) && p('title:width') && e('auto'); //获取测试用例模块browse方法自定义列 +r($datatable->getFieldListTest('testcase', 'browse')) && p('title:width') && e('auto'); //获取测试用例模块browse方法自定义列 \ No newline at end of file diff --git a/test/model/datatable/getSetting.php b/test/model/datatable/getSetting.php old mode 100644 new mode 100755 index dcb3c87da8..3df0d1616a --- a/test/model/datatable/getSetting.php +++ b/test/model/datatable/getSetting.php @@ -10,9 +10,9 @@ title=测试 datatableModel::getSetting(); cid=1 pid=1 -获取产品模块browse方法设置 >> ID -获取项目模块browse方法设置 >> 项目名称 -获取执行模块task方法设置 >> 70 +获取产品模块browse方法设置 >> ID +获取项目模块browse方法设置 >> 项目名称 +获取执行模块task方法设置 >> 70 获取测试用例模块browse方法设置 >> auto */ @@ -21,4 +21,4 @@ $datatable = new datatableTest(); r($datatable->getSettingTest('product', 'browse')) && p('0:title') && e('ID'); //获取产品模块browse方法设置 r($datatable->getSettingTest('project', 'browse')) && p('1:title') && e('项目名称'); //获取项目模块browse方法设置 r($datatable->getSettingTest('execution', 'task')) && p('0:width') && e('70'); //获取执行模块task方法设置 -r($datatable->getSettingTest('testcase', 'browse')) && p('2:width') && e('auto'); //获取测试用例模块browse方法设置 +r($datatable->getSettingTest('testcase', 'browse')) && p('2:width') && e('auto'); //获取测试用例模块browse方法设置 \ No newline at end of file diff --git a/test/model/datatable/printHead.php b/test/model/datatable/printHead.php old mode 100644 new mode 100755 index e48162d59f..101dc591b6 --- a/test/model/datatable/printHead.php +++ b/test/model/datatable/printHead.php @@ -10,10 +10,7 @@ title=测试 datatableModel::printHead(); cid=1 pid=1 -获取产品模块browse方法头部html >> 1 -获取产品模块browse方法头部html带排序 >> 1 -获取产品模块browse方法头部html带参数 >> 1 -获取产品模块browse方法头部html带checkbox >> 1 + */ @@ -28,4 +25,4 @@ $data_check = array('cols' => $productSetting[0], 'orderBy' => 'id_asc', 'vars' r($datatable->printHeadTest($data)) && p() && e(1); //获取产品模块browse方法头部html r($datatable->printHeadTest($data_order)) && p() && e(1); //获取产品模块browse方法头部html带排序 r($datatable->printHeadTest($data_vars)) && p() && e(1); //获取产品模块browse方法头部html带参数 -r($datatable->printHeadTest($data_check)) && p() && e(1); //获取产品模块browse方法头部html带checkbox +r($datatable->printHeadTest($data_check)) && p() && e(1); //获取产品模块browse方法头部html带checkbox \ No newline at end of file diff --git a/test/model/datatable/setFixedFieldWidth.php b/test/model/datatable/setFixedFieldWidth.php old mode 100644 new mode 100755 index f615831913..8dd96bd310 --- a/test/model/datatable/setFixedFieldWidth.php +++ b/test/model/datatable/setFixedFieldWidth.php @@ -10,9 +10,9 @@ title=测试 datatableModel::setFixedFieldWidth(); cid=1 pid=1 -获取产品模块browse方法设置宽度 >> 550 -获取项目模块browse方法设置宽度 >> 180 -获取执行模块task方法设置宽度 >> 550 +获取产品模块browse方法设置宽度 >> 550 +获取项目模块browse方法设置宽度 >> 180 +获取执行模块browse方法设置宽度 >> 550 获取测试用例模块browse方法设置宽度 >> 150 */ @@ -26,4 +26,4 @@ $testcaseSetting = $datatable->getSettingTest('testcase', 'browse'); r($datatable->setFixedFieldWidthTest($productSetting)) && p('leftWidth') && e('550'); //获取产品模块browse方法设置宽度 r($datatable->setFixedFieldWidthTest($projectSetting)) && p('rightWidth') && e('180'); //获取项目模块browse方法设置宽度 r($datatable->setFixedFieldWidthTest($executionSetting)) && p('leftWidth') && e('550'); //获取执行模块browse方法设置宽度 -r($datatable->setFixedFieldWidthTest($testcaseSetting)) && p('rightWidth') && e('150'); //获取测试用例模块browse方法设置宽度 +r($datatable->setFixedFieldWidthTest($testcaseSetting)) && p('rightWidth') && e('150'); //获取测试用例模块browse方法设置宽度 \ No newline at end of file diff --git a/test/model/dept/delete.php b/test/model/dept/delete.php index 5ed257cd6b..954ea3fdd2 100755 --- a/test/model/dept/delete.php +++ b/test/model/dept/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $deptID = '11'; $dept = new deptTest(); r($dept->deleteTest($deptID)) && p() && e('99'); //删除后统计数量 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/dept/managechild.php b/test/model/dept/managechild.php index 2c94aec739..89e9ce5e75 100755 --- a/test/model/dept/managechild.php +++ b/test/model/dept/managechild.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($dept->manageChildTest('', $depts, $count[0])) && p('1') r($dept->manageChildTest('', $depts, $count[1])) && p() && e('3'); //无父级部门下添加子级部门统计 r($dept->manageChildTest($parentDeptID, $depts = array(), $count[0])) && p() && e('0'); //无部门名称 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/dept/update.php b/test/model/dept/update.php index a59452b4d7..794d7cb320 100755 --- a/test/model/dept/update.php +++ b/test/model/dept/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($dept->updateTest($deptIDList[1], $noParent)) && p('parent:0') r($dept->updateTest($deptIDList[3], $noName)) && p('name:0') && e('『部门名称』不能为空。'); //部门名称为空 r($dept->updateTest($deptIDList[4], $noManager)) && p('20:name,parent,path,manager') && e('无负责人部门,1,,1,20,,'); //无负责人 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/design/batchcreate.php b/test/model/design/batchcreate.php index 700d522b4e..bb4313873c 100755 --- a/test/model/design/batchcreate.php +++ b/test/model/design/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -41,4 +42,4 @@ r($design->batchCreateTest($projectIDList[4], $productIDList[0], $noTypeDesign)) r($design->batchCreateTest($projectIDList[5], $productIDList[0], $noNameDesign)) && p() && e('0'); //不输入名字 r($design->batchCreateTest($projectIDList[6], $productIDList[0], $noDescDesign)) && p('0:desc') && e(''); //不输入详情 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/design/create.php b/test/model/design/create.php index e68709721a..499cb46e3f 100755 --- a/test/model/design/create.php +++ b/test/model/design/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -41,4 +42,4 @@ r($design->createTest($projectIDList[0], $noProductDesign)) && p('product') && e r($design->createTest($projectIDList[0], $noStoryDesign)) && p('story') && e(''); //不输入需求创建设计 r($design->createTest($projectIDList[0], $noTypeDesign)) && p('type:0') && e('『设计类型』不能为空。'); //不输入类型创建设计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/design/update.php b/test/model/design/update.php index c5823cc406..b37555a1b7 100755 --- a/test/model/design/update.php +++ b/test/model/design/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($design->updateTest($designIDList[0],$updateDesc)) && p('0:field,old,new') r($design->updateTest($designIDList[0],$noName)) && p('name:0') && e('『设计名称』不能为空。'); //设计名称不能为空 r($design->updateTest($designIDList[0],$noType)) && p('type:0') && e('『设计类型』不能为空。'); //设计类型不能为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/dev/getAPIs.php b/test/model/dev/getAPIs.php old mode 100644 new mode 100755 index f8996ee6d5..a20adef265 --- a/test/model/dev/getAPIs.php +++ b/test/model/dev/getAPIs.php @@ -10,7 +10,7 @@ title=测试 devModel::getAPIs(); cid=1 pid=1 -获取todo模块api名字 >> create +获取todo模块api名字 >> create 获取product模块api名字 >> index 获取project模块api描述 >> Project create guide. @@ -19,4 +19,4 @@ pid=1 $dev = new devTest(); r($dev->getAPIsTest('todo')) && p('0:name') && e('create'); //获取todo模块api名字 r($dev->getAPIsTest('product')) && p('0:name') && e('index'); //获取product模块api名字 -r($dev->getAPIsTest('project')) && p('0:desc') && e('Project create guide.'); //获取project模块api描述 +r($dev->getAPIsTest('project')) && p('0:desc') && e('Project create guide.'); //获取project模块api描述 \ No newline at end of file diff --git a/test/model/dev/getFields.php b/test/model/dev/getFields.php old mode 100644 new mode 100755 index a0cae868f0..7c29ad0b85 --- a/test/model/dev/getFields.php +++ b/test/model/dev/getFields.php @@ -10,7 +10,7 @@ title=测试 devModel::getFields(); cid=1 pid=1 -获取todo表字段名字 >> 开始 +获取todo表字段名字 >> 开始 获取product表字段类型 >> varchar 获取acl表字段null属性 >> NO @@ -19,4 +19,4 @@ pid=1 $dev = new devTest(); r($dev->getFieldsTest('zt_todo')) && p('begin:name') && e('开始'); //获取todo表字段名字 r($dev->getFieldsTest('zt_product')) && p('name:type') && e('varchar'); //获取product表字段类型 -r($dev->getFieldsTest('zt_acl')) && p('account:null') && e('NO'); //获取acl表字段null属性 +r($dev->getFieldsTest('zt_acl')) && p('account:null') && e('NO'); //获取acl表字段null属性 \ No newline at end of file diff --git a/test/model/dev/getModules.php b/test/model/dev/getModules.php old mode 100644 new mode 100755 index ca2b30c7e1..b1e5a8db2f --- a/test/model/dev/getModules.php +++ b/test/model/dev/getModules.php @@ -10,13 +10,13 @@ title=测试 devModel::getModules(); cid=1 pid=1 -获取所有模块的my分组第一个 >> index +获取所有模块的my分组第一个 >> index 获取所有模块的product分组第三个 >> product -获取所有模块的system分组第二个 >> file +获取所有模块的system分组第二个 >> file */ $dev = new devTest(); r($dev->getModulesTest()) && p('my:0') && e('index'); //获取所有模块的my分组第一个 r($dev->getModulesTest()) && p('product:2') && e('product'); //获取所有模块的product分组第三个 -r($dev->getModulesTest()) && p('system:1') && e('file'); //获取所有模块的system分组第二个 +r($dev->getModulesTest()) && p('system:1') && e('file'); //获取所有模块的system分组第二个 \ No newline at end of file diff --git a/test/model/dev/getTables.php b/test/model/dev/getTables.php old mode 100644 new mode 100755 index 943a81fb1a..31c884a368 --- a/test/model/dev/getTables.php +++ b/test/model/dev/getTables.php @@ -10,13 +10,13 @@ title=测试 devModel::getTables(); cid=1 pid=1 -获取所有表my分组todo表 >> zt_todo +获取所有表my分组todo表 >> zt_todo 获取所有表product分组product表 >> zt_product -获取所有表other分组acl表 >> zt_acl +获取所有表other分组acl表 >> zt_acl */ $dev = new devTest(); r($dev->getTablesTest()) && p('my:todo') && e('zt_todo'); //获取所有表my分组todo表 r($dev->getTablesTest()) && p('product:product') && e('zt_product'); //获取所有表product分组product表 -r($dev->getTablesTest()) && p('other:acl') && e('zt_acl'); //获取所有表other分组acl表 +r($dev->getTablesTest()) && p('other:acl') && e('zt_acl'); //获取所有表other分组acl表 \ No newline at end of file diff --git a/test/model/doc/buildbrowseswitch.php b/test/model/doc/buildbrowseswitch.php old mode 100644 new mode 100755 diff --git a/test/model/doc/buildcollectbutton4doc.php b/test/model/doc/buildcollectbutton4doc.php old mode 100644 new mode 100755 diff --git a/test/model/doc/buildcreatebutton4doc.php b/test/model/doc/buildcreatebutton4doc.php old mode 100644 new mode 100755 diff --git a/test/model/doc/buildcrumbtitle.php b/test/model/doc/buildcrumbtitle.php old mode 100644 new mode 100755 diff --git a/test/model/doc/checkautoloadpage.php b/test/model/doc/checkautoloadpage.php index 4ca8c0e86d..ae2349c4ff 100755 --- a/test/model/doc/checkautoloadpage.php +++ b/test/model/doc/checkautoloadpage.php @@ -10,9 +10,8 @@ title=测试 docModel->checkAutoloadPage(); cid=1 pid=1 -查询文档type为text时数据 >>1 -查询文档type为markdown时数据 >>1 -查询文档不存在时数据 >>1 + + */ $docID = array('1', '3', ''); @@ -20,4 +19,4 @@ $doc = new docTest(); r($doc->checkAutoloadPageTest($docID[0])) && p() && e('1'); //查询文档type为text时数据 r($doc->checkAutoloadPageTest($docID[1])) && p() && e('1'); //查询文档type为markdown时数据 -r($doc->checkAutoloadPageTest($docID[2])) && p() && e('1'); //查询文档不存在时数据 +r($doc->checkAutoloadPageTest($docID[2])) && p() && e('1'); //查询文档不存在时数据 \ No newline at end of file diff --git a/test/model/doc/create.php b/test/model/doc/create.php old mode 100644 new mode 100755 index 60d16e880e..8dbcc3971f --- a/test/model/doc/create.php +++ b/test/model/doc/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -52,4 +53,4 @@ r($doc->createTest($customDoc)) && p('0:acl,groups') && e('custom, r($doc->createTest($noLib)) && p('lib') && e('『所属文档库』不能为空。');//不输入文档库 r($doc->createTest($noTitle)) && p('title:0') && e('『文档标题』不能为空。'); //不输入标题 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/createapilib.php b/test/model/doc/createapilib.php old mode 100644 new mode 100755 index 442157c270..beef01de1c --- a/test/model/doc/createapilib.php +++ b/test/model/doc/createapilib.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -38,4 +39,4 @@ r($doc->createApiLibTest($noAcl)) && p('acl') && e(''); r($doc->createApiLibTest($noBaseUrl)) && p('baseUrl') && e(''); //接口库地址为空 r($doc->createApiLibTest($openApilib)) && p('name:0') && e('『接口库名称』已经有『新建api文档库』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。');//重复创建接口库 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/createlib.php b/test/model/doc/createlib.php old mode 100644 new mode 100755 index eaebcde663..298fde8df4 --- a/test/model/doc/createlib.php +++ b/test/model/doc/createlib.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -53,4 +54,4 @@ r($doc->createLibTest($noProject)) && p('project:0') && e('『proj r($doc->createLibTest($noExecution)) && p('execution:0') && e('『迭代库』应当是数字。'); //新建无执行执行文档库 r($doc->createLibTest($noAcl)) && p('acl') && e(''); //新建无权限控制文档库 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/extractketablecss.php b/test/model/doc/extractketablecss.php old mode 100644 new mode 100755 index 326c6c9df9..b0228524bc --- a/test/model/doc/extractketablecss.php +++ b/test/model/doc/extractketablecss.php @@ -10,7 +10,8 @@ title=测试 docModel->extractKETableCSS(); cid=1 pid=1 - +未过滤数据查询 >> 0 +过滤后数据查询 >> .ke-table1{border:1px #000000 solid} */ global $tester; @@ -19,4 +20,4 @@ $content = 'test'; $css = ''; r($doc->extractKETableCSS($content)) && p() && e('0'); //未过滤数据查询 -r($doc->extractKETableCSS($css)) && p() && e('.ke-table1{border:1px #000000 solid}');//过滤后数据查询 +r($doc->extractKETableCSS($css)) && p() && e('.ke-table1{border:1px #000000 solid}');//过滤后数据查询 \ No newline at end of file diff --git a/test/model/doc/filldocsintree.php b/test/model/doc/filldocsintree.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getalllibgroups.php b/test/model/doc/getalllibgroups.php old mode 100644 new mode 100755 index 80b885d873..d714343d40 --- a/test/model/doc/getalllibgroups.php +++ b/test/model/doc/getalllibgroups.php @@ -10,7 +10,12 @@ title=测试 docModel->getAllLibGroups(); cid=1 pid=1 - +查询产品库 >> 正常产品1 +查询项目库 >> 项目主库 +查询执行库 >> 子阶段1 +查询产品库统计 >> 100 +查询项目库统计 >> 90 +查询执行库统计 >> 603 */ global $tester; @@ -23,4 +28,4 @@ r($doc->getAllLibGroups($appendLibs)['project']) && p('117') && e( r($doc->getAllLibGroups($appendLibs)['execution']) && p('701:name') && e('子阶段1'); //查询执行库 r(count($doc->getAllLibGroups($appendLibs)['product'])) && p() && e('100'); //查询产品库统计 r(count($doc->getAllLibGroups($appendLibs)['project'])) && p() && e('90'); //查询项目库统计 -r(count($doc->getAllLibGroups($appendLibs)['execution'])) && p() && e('603'); //查询执行库统计 +r(count($doc->getAllLibGroups($appendLibs)['execution'])) && p() && e('603'); //查询执行库统计 \ No newline at end of file diff --git a/test/model/doc/getalllibsbytype.php b/test/model/doc/getalllibsbytype.php old mode 100644 new mode 100755 index 8d239cab0e..f9bba31c55 --- a/test/model/doc/getalllibsbytype.php +++ b/test/model/doc/getalllibsbytype.php @@ -10,7 +10,16 @@ title=测试 docModel->getAllLibsByType(); cid=1 pid=1 - +collector类型查询 >> 0 +all类型查询 >> 0 +product类型查询 >> 正常产品2,po2 +product类型传入产品id查询 >> 正常产品3,po3 +product类型查询统计 >> 100 +product类型传入产品id查询统计 >> 100 +execution类型查询 >> 迭代1, +execution类型传入产品id查询 >> 看板62, +execution类型查询统计 >> 14 +execution类型传入产品id查询统计 >> 630 */ $types = array('collector', 'all', 'product', 'execution'); @@ -27,4 +36,4 @@ r(count($doc->getAllLibsByTypeTest($types[2], $product[1]))) && p() r($doc->getAllLibsByTypeTest($types[3], $product[0])) && p('101:name,createdBy') && e('迭代1,'); //execution类型查询 r($doc->getAllLibsByTypeTest($types[3], $product[1])) && p('162:name,createdBy') && e('看板62,'); //execution类型传入产品id查询 r(count($doc->getAllLibsByTypeTest($types[3], $product[0]))) && p() && e('14'); //execution类型查询统计 -r(count($doc->getAllLibsByTypeTest($types[3], $product[1]))) && p() && e('630'); //execution类型传入产品id查询统计 +r(count($doc->getAllLibsByTypeTest($types[3], $product[1]))) && p() && e('630'); //execution类型传入产品id查询统计 \ No newline at end of file diff --git a/test/model/doc/getapilibs.php b/test/model/doc/getapilibs.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getapimoduletree.php b/test/model/doc/getapimoduletree.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getbyid.php b/test/model/doc/getbyid.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getbyidlist.php b/test/model/doc/getbyidlist.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getdocmenu.php b/test/model/doc/getdocmenu.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getdocs.php b/test/model/doc/getdocs.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getdocsbybrowsetype.php b/test/model/doc/getdocsbybrowsetype.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getdoctree.php b/test/model/doc/getdoctree.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getexecutionmodulepairs.php b/test/model/doc/getexecutionmodulepairs.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getfileicon.php b/test/model/doc/getfileicon.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getfilesourcepairs.php b/test/model/doc/getfilesourcepairs.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getlibbyid.php b/test/model/doc/getlibbyid.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getlibfiles.php b/test/model/doc/getlibfiles.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getlibidlistbyproject.php b/test/model/doc/getlibidlistbyproject.php index 66d7472a89..35ecf89b02 100755 --- a/test/model/doc/getlibidlistbyproject.php +++ b/test/model/doc/getlibidlistbyproject.php @@ -23,4 +23,4 @@ $t_numProjectID = array('11', '12', '17', '18'); r($doc->getLibIdListByProjectTest($t_numProjectID[0])) && p('1;2') && e('822;823'); //测试未开始项目相关的库id r($doc->getLibIdListByProjectTest($t_numProjectID[1])) && p('6;7') && e('827;828'); //测试进行中项目相关的库id r($doc->getLibIdListByProjectTest($t_numProjectID[2])) && p('88;89') && e('87;97'); //测试已暂停项目相关的库id -r($doc->getLibIdListByProjectTest($t_numProjectID[3])) && p('88;89') && e('88;98'); //测试已关闭项目相关的库id +r($doc->getLibIdListByProjectTest($t_numProjectID[3])) && p('88;89') && e('88;98'); //测试已关闭项目相关的库id \ No newline at end of file diff --git a/test/model/doc/getlibs.php b/test/model/doc/getlibs.php old mode 100644 new mode 100755 index 62b2ebec9c..a4ffb719fa --- a/test/model/doc/getlibs.php +++ b/test/model/doc/getlibs.php @@ -62,4 +62,4 @@ r(count($doc->getLibs($types[0], $extra[2], '', $objectIDs[3]))) && p() r(count($doc->getLibs($types[1], $extra[0], $appendLibs, $objectIDs[3]))) && p() && e('2'); //额外文档库查询统计 r(count($doc->getLibs($types[2], $extra[0], '', $objectIDs[0]))) && p() && e('1'); //产品单独查询统计 r(count($doc->getLibs($types[3], $extra[0], '', $objectIDs[1]))) && p() && e('1'); //项目单独查询统计 -r(count($doc->getLibs($types[4], $extra[0], '', $objectIDs[2]))) && p() && e('1'); //执行单独查询统计 +r(count($doc->getLibs($types[4], $extra[0], '', $objectIDs[2]))) && p() && e('1'); //执行单独查询统计 \ No newline at end of file diff --git a/test/model/doc/getlibsbyobject.php b/test/model/doc/getlibsbyobject.php old mode 100644 new mode 100755 index b9ec93c86f..471ab0801e --- a/test/model/doc/getlibsbyobject.php +++ b/test/model/doc/getlibsbyobject.php @@ -10,7 +10,13 @@ title=测试 docModel->getLibsByObject(); cid=1 pid=1 - +all类型查询 >> 0 +api类型查询 >> 0 +product类型查询 >> 产品主库;execution +project类型查询 >> 0 +execution类型查询 >> 迭代主库;execution +custom类型查询 >> 自定义库;execution +book类型查询 >> execution */ global $tester; @@ -26,4 +32,4 @@ r($doc->getLibsByObject($types[2], $objectIDList[0], '', $appendLib)) && p('1:na r($doc->getLibsByObject($types[3], $objectIDList[1], '', $appendLib)) && p() && e('0'); //project类型查询 r($doc->getLibsByObject($types[4], $objectIDList[2], '', $appendLib)) && p('307:name;701:type') && e('迭代主库;execution');//execution类型查询 r($doc->getLibsByObject($types[5], $objectIDList[3], '', $appendLib)) && p('900:name;701:type') && e('自定义库;execution');//custom类型查询 -r($doc->getLibsByObject($types[6], $objectIDList[3], '', $appendLib)) && p('701:type') && e('execution'); //book类型查询 +r($doc->getLibsByObject($types[6], $objectIDList[3], '', $appendLib)) && p('701:type') && e('execution'); //book类型查询 \ No newline at end of file diff --git a/test/model/doc/getlimitlibs.php b/test/model/doc/getlimitlibs.php old mode 100644 new mode 100755 index 905454a69b..a245ea9122 --- a/test/model/doc/getlimitlibs.php +++ b/test/model/doc/getlimitlibs.php @@ -10,7 +10,15 @@ title=测试 docModel->getLimitLibs(); cid=1 pid=1 - +其他类型库查询 >> 0 +接口库查询 >> 接口库 +产品库查询 >> 多平台产品100 +项目库查询 >> 项目主库 +接口库查询统计 >> 10 +产品库查询统计 >> 100 +项目库查询统计 >> 90 +执行库查询统计 >> 630 +执行库单条查询统计 >> 1 */ global $tester; @@ -28,4 +36,4 @@ r(count($doc->getLimitLibs($types[1]))) && p() && e('10'); r(count($doc->getLimitLibs($types[2]))) && p() && e('100'); //产品库查询统计 r(count($doc->getLimitLibs($types[3]))) && p() && e('90'); //项目库查询统计 r(count($doc->getLimitLibs($types[4]))) && p() && e('630'); //执行库查询统计 -r(count($doc->getLimitLibs($types[4], $limit))) && p() && e('1'); //执行库单条查询统计 +r(count($doc->getLimitLibs($types[4], $limit))) && p() && e('1'); //执行库单条查询统计 \ No newline at end of file diff --git a/test/model/doc/getobjectsbydoc.php b/test/model/doc/getobjectsbydoc.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getorderedobjects.php b/test/model/doc/getorderedobjects.php old mode 100644 new mode 100755 index c203673190..8ce8255cc5 --- a/test/model/doc/getorderedobjects.php +++ b/test/model/doc/getorderedobjects.php @@ -10,7 +10,14 @@ title=测试 docModel->getOrderedObjects(); cid=1 pid=1 - +all类型查询 >> 0 +api类型查询 >> 0 +product类型查询 >> 已关闭的多分支产品70 +project类型查询 >> 项目87 +execution类型查询 >> 项目60 / 阶段600 +product类型查询统计 >> 120 +project类型查询统计 >> 110 +execution类型查询统计 >> 630 */ global $tester; @@ -25,4 +32,4 @@ r($doc->getOrderedObjects($types[3])) && p('97') && e('项目87'); r($doc->getOrderedObjects($types[4])) && p('700') && e('项目60 / 阶段600'); //execution类型查询 r(count($doc->getOrderedObjects($types[2]))) && p('70') && e('120'); //product类型查询统计 r(count($doc->getOrderedObjects($types[3]))) && p('97') && e('110'); //project类型查询统计 -r(count($doc->getOrderedObjects($types[4]))) && p('700') && e('630'); //execution类型查询统计 +r(count($doc->getOrderedObjects($types[4]))) && p('700') && e('630'); //execution类型查询统计 \ No newline at end of file diff --git a/test/model/doc/getpreandnextdoc.php b/test/model/doc/getpreandnextdoc.php old mode 100644 new mode 100755 index 4a635940d4..58351abebd --- a/test/model/doc/getpreandnextdoc.php +++ b/test/model/doc/getpreandnextdoc.php @@ -10,22 +10,7 @@ title=测试 docModel->getPreAndNextDoc(); cid=1 pid=1 -查询空数据 >> , -查询文档ID为空的数据 >> , -查询文档ID为空的数据 >> , -查询文档ID为空的数据 >> , -查询文档库ID为空的数据 >> , -查询文档库ID为空的数据 >> , -查询文档库ID为空的数据 >> , -查询文档ID为1并且文档库ID为1的数据 >> , -查询文档ID为2并且文档库ID为1的数据 >> , -查询文档ID不存在并且文档库ID为1的数据 >> , -查询文档ID为1并且文档库ID为2的数据 >> , -查询文档ID为2并且文档库ID为2的数据 >> , -查询文档ID不存在并且文档库ID为2的数据 >> , -查询文档ID为1并且文档库ID不存在的数据 >> , -查询文档ID为2并且文档库ID不存在的数据 >> , -查询文档ID不存在并且文档库ID不存在的数据 >> , + */ @@ -49,4 +34,4 @@ r($doc->getPreAndNextDocTest($docIDList[2], $libIDList[2])) && p('pre,next') && r($doc->getPreAndNextDocTest($docIDList[3], $libIDList[2])) && p('pre,next') && e(','); // 查询文档ID不存在并且文档库ID为2的数据 r($doc->getPreAndNextDocTest($docIDList[1], $libIDList[3])) && p('pre,next') && e(','); // 查询文档ID为1并且文档库ID不存在的数据 r($doc->getPreAndNextDocTest($docIDList[2], $libIDList[3])) && p('pre,next') && e(','); // 查询文档ID为2并且文档库ID不存在的数据 -r($doc->getPreAndNextDocTest($docIDList[3], $libIDList[3])) && p('pre,next') && e(','); // 查询文档ID不存在并且文档库ID不存在的数据 +r($doc->getPreAndNextDocTest($docIDList[3], $libIDList[3])) && p('pre,next') && e(','); // 查询文档ID不存在并且文档库ID不存在的数据 \ No newline at end of file diff --git a/test/model/doc/getprivdocs.php b/test/model/doc/getprivdocs.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getprivlibsbydoc.php b/test/model/doc/getprivlibsbydoc.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getproductcrumb.php b/test/model/doc/getproductcrumb.php old mode 100644 new mode 100755 diff --git a/test/model/doc/getstatisticinfo.php b/test/model/doc/getstatisticinfo.php old mode 100644 new mode 100755 index c095600292..64ba399e6f --- a/test/model/doc/getstatisticinfo.php +++ b/test/model/doc/getstatisticinfo.php @@ -11,8 +11,9 @@ cid=1 pid=1 测试正常查询 >> 900,0,0,900,0,900,900 + */ $doc = new docTest(); -r($doc->getStatisticInfoTest()) && p('totalDocs,todayEditedDocs,lastEditedDocs,lastAddedDocs,myCollection,myDocs,pastEditedDocs') && e('900,0,0,900,0,900,900'); //测试正常查询 +r($doc->getStatisticInfoTest()) && p('totalDocs,todayEditedDocs,lastEditedDocs,lastAddedDocs,myCollection,myDocs,pastEditedDocs') && e('900,0,0,900,0,900,900'); //测试正常查询 \ No newline at end of file diff --git a/test/model/doc/getsublibgroups.php b/test/model/doc/getsublibgroups.php old mode 100644 new mode 100755 index aebb585ad1..56c89dbf84 --- a/test/model/doc/getsublibgroups.php +++ b/test/model/doc/getsublibgroups.php @@ -10,7 +10,10 @@ title=测试 docModel->getSubLibGroups(); cid=1 pid=1 - +all查询 >> 0 +产品库查询 >> 产品主库;附件库 +执行库查询 >> 0 +产品库查询统计 >> 2 */ global $tester; @@ -22,4 +25,4 @@ $idList = array('17', '1'); r($doc->getSubLibGroups($types[0], $idList)) && p() && e('0'); //all查询 r($doc->getSubLibGroups($types[1], $idList)[1]) && p('1;files') && e('产品主库;附件库');//产品库查询 r($doc->getSubLibGroups($types[2], $idList)) && p() && e('0'); //执行库查询 -r(count($doc->getSubLibGroups($types[1], $idList))) && p() && e('2'); //产品库查询统计 +r(count($doc->getSubLibGroups($types[1], $idList))) && p() && e('2'); //产品库查询统计 \ No newline at end of file diff --git a/test/model/doc/gettoandcclist.php b/test/model/doc/gettoandcclist.php index bdab3aa14f..2cca86c844 100755 --- a/test/model/doc/gettoandcclist.php +++ b/test/model/doc/gettoandcclist.php @@ -10,9 +10,8 @@ title=测试 docModel->getToAndCcList(); cid=1 pid=1 -查询文档type为text的数据 >> admin; -查询文档type为markdown的数据 >>admin; -查询文档type为url的数据 >>admin; + + */ $docID = array('1', '2', '3'); @@ -20,4 +19,4 @@ $doc = new docTest(); r($doc->getToAndCcListTest($docID[0])) && p('0;1') && e('admin;'); //查询文档type为text的数据 r($doc->getToAndCcListTest($docID[1])) && p('0;1') && e('admin;'); //查询文档type为markdown的数据 -r($doc->getToAndCcListTest($docID[2])) && p('0;1') && e('admin;'); //查询文档type为url的数据 +r($doc->getToAndCcListTest($docID[2])) && p('0;1') && e('admin;'); //查询文档type为url的数据 \ No newline at end of file diff --git a/test/model/doc/gettreemenu.php b/test/model/doc/gettreemenu.php old mode 100644 new mode 100755 diff --git a/test/model/doc/printchildmodule.php b/test/model/doc/printchildmodule.php old mode 100644 new mode 100755 diff --git a/test/model/doc/savedraft.php b/test/model/doc/savedraft.php old mode 100644 new mode 100755 index 9153c3fc9d..ce8ea5970a --- a/test/model/doc/savedraft.php +++ b/test/model/doc/savedraft.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ r($doc->saveDraftTest($docIDList[1], $content)) && p('118:draft') && e('测试') r($doc->saveDraftTest($docIDList[2], $content)) && p('217:draft') && e('测试');//执行文档内容保存 r($doc->saveDraftTest($docIDList[0])) && p('17:draft') && e('测试');//文档无内容保存 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/select.php b/test/model/doc/select.php old mode 100644 new mode 100755 diff --git a/test/model/doc/setfastmenu.php b/test/model/doc/setfastmenu.php old mode 100644 new mode 100755 diff --git a/test/model/doc/setlibusers.php b/test/model/doc/setlibusers.php old mode 100644 new mode 100755 diff --git a/test/model/doc/setmenubytype.php b/test/model/doc/setmenubytype.php old mode 100644 new mode 100755 diff --git a/test/model/doc/statlibcounts.php b/test/model/doc/statlibcounts.php old mode 100644 new mode 100755 diff --git a/test/model/doc/summary.php b/test/model/doc/summary.php old mode 100644 new mode 100755 diff --git a/test/model/doc/update.php b/test/model/doc/update.php old mode 100644 new mode 100755 index 21ee7ccc0c..b74ca4a51c --- a/test/model/doc/update.php +++ b/test/model/doc/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -44,4 +45,4 @@ r($doc->updateTest($docID[0], $noLib)) && p('0:field,old,new') && e r($doc->updateTest($docID[0], $noTitle)) && p('title:0') && e('『文档标题』不能为空。'); //修改标题为空 r($doc->updateTest($docID[0], $noType)) && p('2:field,old,new') && e('type,text,'); //修改type为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/updateapilib.php b/test/model/doc/updateapilib.php old mode 100644 new mode 100755 index 6fa09031a1..e6b50a5b2b --- a/test/model/doc/updateapilib.php +++ b/test/model/doc/updateapilib.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($doc->updateApiLibTest($ids[0], $updateUsers)) && p('0:field,old,new') r($doc->updateApiLibTest($ids[0], $noName)) && p('name:0') && e('『接口库名称』不能为空。'); //修改名字为空 r($doc->updateApiLibTest($ids[0], $repeatName)) && p() && e('0'); //修改成重复名称 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/doc/updatelib.php b/test/model/doc/updatelib.php old mode 100644 new mode 100755 index ca022ed8f0..4287711309 --- a/test/model/doc/updatelib.php +++ b/test/model/doc/updatelib.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -54,4 +55,4 @@ r($doc->updateLibTest($docLibIds[0],$noProject)) && p('project:0') & r($doc->updateLibTest($docLibIds[0],$noExecution)) && p('execution:0') && e('『迭代库』应当是数字。'); //正常修改无迭代 r($doc->updateLibTest($docLibIds[0],$noName)) && p('name:0') && e('『文档库名称』不能为空。'); //正常修改无文档库名 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/create.php b/test/model/entry/create.php index 0fcc195a78..50ea7e79bc 100755 --- a/test/model/entry/create.php +++ b/test/model/entry/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($result_name['name'][0]) && p() && e('『名称』不能为空'); // 测 r($result_code['code'][0]) && p() && e('『代号』不能为空'); // 测试创建应用code为空报错 r($entry->createObject($e_name)) && p('name') && e('name_test'); // 测试创建应用name为name_test r($entry->createObject($e_code)) && p('code') && e('code_test'); // 测试创建应用code为code_test -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/getbycode.php b/test/model/entry/getbycode.php index 90cdd14aff..dd8513b642 100755 --- a/test/model/entry/getbycode.php +++ b/test/model/entry/getbycode.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($entry->getByCodeTest($entryCodeList[0])) && p('name') && e('这是应用名 r($entry->getByCodeTest($entryCodeList[0])) && p('account') && e('accountadmin'); // 查询code为code1的entry的account r($entry->getByCodeTest($entryCodeList[1])) && p('name') && e('0'); // 查询code为code2的entry的name r($entry->getByCodeTest($entryCodeList[1])) && p('account') && e('0'); // 查询code为code2的entry的account -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/getbyid.php b/test/model/entry/getbyid.php index 5e83b46f5a..3ffd83cc18 100755 --- a/test/model/entry/getbyid.php +++ b/test/model/entry/getbyid.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($entry->getByIdTest($entryIDList[0])) && p('name') && e('这是应用名称1') r($entry->getByIdTest($entryIDList[0])) && p('account') && e('accountadmin'); // 查询id为1的entry的account r($entry->getByIdTest($entryIDList[1])) && p('name') && e('0'); // 查询id为1000001的entry的name r($entry->getByIdTest($entryIDList[1])) && p('account') && e('0'); // 查询id为1000001的entry的account -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/getbykey.php b/test/model/entry/getbykey.php index 5017815160..d484eee883 100755 --- a/test/model/entry/getbykey.php +++ b/test/model/entry/getbykey.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($entry->getByKeyTest($entryKeyList[0])) && p('name') && e('这是应用名称1 r($entry->getByKeyTest($entryKeyList[0])) && p('account') && e('accountadmin'); // 查询key为792b9b972157d2d8531b43e04c0af021的entry的account r($entry->getByKeyTest($entryKeyList[1])) && p('name') && e('0'); // 查询key为空的entry的name r($entry->getByKeyTest($entryKeyList[1])) && p('account') && e('0'); // 查询key为空的entry的account -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/getlist.php b/test/model/entry/getlist.php index e7573edfce..c685116ec5 100755 --- a/test/model/entry/getlist.php +++ b/test/model/entry/getlist.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $list = $entry->getListTest(); r(count($list)) && p() && e('1'); //测试获取列表的个数,目前只有一个 r($list) && p('1:name') && e('这是应用名称1'); //测试获取列表某个应用的名称信息 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/getlogs.php b/test/model/entry/getlogs.php index 026c470f09..1452ccd82f 100755 --- a/test/model/entry/getlogs.php +++ b/test/model/entry/getlogs.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ $list_1 = $entry->getLogsTest($entryIDList[0]); $list_1000001 = $entry->getLogsTest($entryIDList[1]); r(count($list_1)) && p() && e('1'); //测试获取列表的个数,ID为1的日志数为1 r(count($list_1000001)) && p() && e('0'); //测试获取列表个数,ID为100001的日志数为0 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/savelog.php b/test/model/entry/savelog.php index 41b113fa99..86ce8f5faf 100755 --- a/test/model/entry/savelog.php +++ b/test/model/entry/savelog.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $e_url = 'http://qcmmi.com'; $entry = new entryTest(); r($entry->saveLogTest($e_id, $e_url)) && p('objectType') && e('entry'); //测试插入一条日志 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/update.php b/test/model/entry/update.php index c0d0628e2c..850cee97e0 100755 --- a/test/model/entry/update.php +++ b/test/model/entry/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($entry->updateObject($entryID, $e_upName)) && p('0:field,old,new') r($entry->updateObject($entryID, $e_upCode)) && p('0:field,old,new') && e('code,code1,code2'); //测试更新entry代号 r($entry->updateObject($entryID, $e_upNameAndCode)) && p('0:field,old,new;1:field,old,new') && e('name,这是应用名称2,这是应用名称1;code,code2,code1'); //测试更新entry名称和代号 r($entry->updateObject($entryID, $e_unName)) && p() && e('没有数据更新'); //测试不更新name -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/entry/updatecalltime.php b/test/model/entry/updatecalltime.php index 42b9cc1ecd..06b5359c03 100755 --- a/test/model/entry/updatecalltime.php +++ b/test/model/entry/updatecalltime.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ $entry = new entryTest(); r($entry->updateCalledTimeTest($code[0], $time)) && p('name') && e('这是应用名称1'); //测试更新entry代号存在的情况 r($entry->updateCalledTimeTest($code[1], $time)) && p() && e('0'); //测试更新entry代号不存在的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/activate.php b/test/model/execution/activate.php index 07d8264793..c026149452 100755 --- a/test/model/execution/activate.php +++ b/test/model/execution/activate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($execution->activateTest($executionIDList[1])) && p('0:field,old r($execution->activateTest($executionIDList[2])) && p('0:field,old,new') && e('status,suspended,doing'); // 看板执行激活 r($execution->activateTest($executionIDList[3],$readjustTime)) && p('1:field') && e('begin'); // 修改激活时间 r($execution->activateTest($executionIDList[4],$readjustTask)) && p('1:field') && e('begin'); // 修改顺延 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/addprojectmembers.php b/test/model/execution/addprojectmembers.php index a78359df0f..ae57ec3048 100755 --- a/test/model/execution/addprojectmembers.php +++ b/test/model/execution/addprojectmembers.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $cou r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[1])) && p() && e('2'); // 敏捷项目根据执行添加团队信息统计 r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[1])) && p() && e('1'); // 瀑布项目根据执行添加团队信息统计 r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[1])) && p() && e('1'); // 看板项目根据执行添加团队信息统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/batchupdate.php b/test/model/execution/batchupdate.php index e41070efee..b0782fd400 100755 --- a/test/model/execution/batchupdate.php +++ b/test/model/execution/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ $noName = array('statuses'=> $statuses, 'codes' => $code, 'PMs' => $pms, 'lifet $execution = new executionTest(); r($execution->batchUpdateObject($normal, $executionID)) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务 r($execution->batchUpdateObject($noName, $executionID)) && p() && e('『name』不能为空。'); // 测试name为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/changeproject.php b/test/model/execution/changeproject.php index 2bc93614d8..780d0e8e54 100755 --- a/test/model/execution/changeproject.php +++ b/test/model/execution/changeproject.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($execution->changeProjectTest($newProjectIDlist[1],$oldProjectIDlist[0],$execu r($execution->changeProjectTest($newProjectIDlist[0],$oldProjectIDlist[1],$executionIDList[1])) && p('0:path') && e(',11,131,'); // 测试修改瀑布执行关联项目 r($execution->changeProjectTest($newProjectIDlist[1],$oldProjectIDlist[2],$executionIDList[2])) && p('0:parent') && e('41'); // 测试修改看板执行关联项目 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/close.php b/test/model/execution/close.php index eca18c1042..cd43bbabf6 100755 --- a/test/model/execution/close.php +++ b/test/model/execution/close.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($execution->closeTest($executionIDList[0])) && p('0:field,old,new') r($execution->closeTest($executionIDList[1])) && p('0:field,old,new') && e('status,doing,closed'); // 瀑布执行关闭 r($execution->closeTest($executionIDList[2])) && p('0:field,old,new') && e('status,doing,closed'); // 看板执行关闭 r($execution->closeTest($executionIDList[1],$noRealEnd)) && p('realEnd:0') && e('『realEnd』不能为空。'); // 不输入实际完成时间校验 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/create.php b/test/model/execution/create.php index c8efcacebd..12e44ada93 100755 --- a/test/model/execution/create.php +++ b/test/model/execution/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -61,4 +62,4 @@ r($task->createObject($noCode, $projectIDList[1], $dayNum, $days)) r($task->createObject($equallyName, $projectIDList[1], $dayNum, $days)) && p('name:0') && e('『执行名称』已经有『新增私有敏捷执行』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试一样的执行名称 r($task->createObject($equallyCode, $projectIDList[1], $dayNum, $days)) && p('code:0') && e('『执行代号』已经有『新增私有敏捷执行code』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试一样的执行代号 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/importbug.php b/test/model/execution/importbug.php index 1834b2f5f7..59021368ea 100755 --- a/test/model/execution/importbug.php +++ b/test/model/execution/importbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -31,4 +32,4 @@ $execution = new executionTest(); r($execution->importBugTest($executionIDList[0], $count[0], $errorimport)) && p('message:0') && e('最初预计"必须为数字'); // 预计输入错误 r($execution->importBugTest($executionIDList[0], $count[1], $importBugs)) && p() && e('4'); // Bug转任务统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/importtask.php b/test/model/execution/importtask.php index b51a38117b..97d72a077c 100755 --- a/test/model/execution/importtask.php +++ b/test/model/execution/importtask.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($execution->importTaskTest($executionIDList[1], $count[0], $stageTasks)) && p r($execution->importTaskTest($executionIDList[0], $count[1], $sprintTasks)) && p() && e('5'); // 敏捷执行导入任务统计 r($execution->importTaskTest($executionIDList[1], $count[1], $stageTasks)) && p() && e('5'); // 瀑布执行导入任务统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/linkcases.php b/test/model/execution/linkcases.php index 64747cd1a7..a241abc112 100755 --- a/test/model/execution/linkcases.php +++ b/test/model/execution/linkcases.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($execution->linkCasesTest($executionIDList[0], $count[1], $products[0], $stori r($execution->linkCasesTest($executionIDList[1], $count[1], $products[1], $stories[1])) && p() && e('4'); // 瀑布执行关联用例统计 r($execution->linkCasesTest($executionIDList[2], $count[1], $products[2], $stories[2])) && p() && e('4'); // 看板执行关联用例统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/linkstory.php b/test/model/execution/linkstory.php index 23d4f5f5ca..c350b3abbd 100755 --- a/test/model/execution/linkstory.php +++ b/test/model/execution/linkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($execution->linkStoryTest($executionIDList[0], $count[1], $story)) && p() r($execution->linkStoryTest($executionIDList[1], $count[1], $story)) && p() && e('3'); // 瀑布执行关联需求统计 r($execution->linkStoryTest($executionIDList[2], $count[1], $story)) && p() && e('3'); // 看板执行关联需求统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/putoff.php b/test/model/execution/putoff.php index 37103219ee..e4c55ad5e8 100755 --- a/test/model/execution/putoff.php +++ b/test/model/execution/putoff.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ r($execution->putoffTest($executionIDList[0])) && p('0:field,old,new') && e('day r($execution->putoffTest($executionIDList[1])) && p('0:field,old,new') && e('status,doing,wait'); // 敏捷执行延期 r($execution->putoffTest($executionIDList[2])) && p('0:field,old,new') && e('status,doing,wait'); // 瀑布阶段延期 r($execution->putoffTest($executionIDList[3])) && p('0:field,old,new') && e('status,doing,wait'); // 看板执行延期 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/start.php b/test/model/execution/start.php index b994b384f7..22f92a08d1 100755 --- a/test/model/execution/start.php +++ b/test/model/execution/start.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($execution->startTest($executionIDList[0])) && p('1:field,old,new r($execution->startTest($executionIDList[1])) && p('1:field,old,new') && e('status,wait,doing'); // 瀑布阶段开始 r($execution->startTest($executionIDList[2])) && p('1:field,old,new') && e('status,wait,doing'); // 看板执行开始 r($execution->startTest($executionIDList[0],$noRealBegan)) && p() && e('此任务已被启动,不能重复启动!'); // 重复执行开始 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/suspend.php b/test/model/execution/suspend.php index 2d166bdf62..5fdc01e33c 100755 --- a/test/model/execution/suspend.php +++ b/test/model/execution/suspend.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($execution->suspendTest($executionIDList[3])) && p('0:field,old,new') && e('st r($execution->suspendTest($executionIDList[4])) && p('0:field,old,new') && e('status,wait,suspended'); // wait看板执行挂起 r($execution->suspendTest($executionIDList[5])) && p('0:field,old,new') && e('status,doing,suspended'); // doing看板执行挂起 r($execution->suspendTest($executionIDList[0])) && p() && e('0'); // 挂起后再次挂起 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/unlinkcases.php b/test/model/execution/unlinkcases.php index 8d8e31d03e..5a5eabf153 100755 --- a/test/model/execution/unlinkcases.php +++ b/test/model/execution/unlinkcases.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($execution->unlinkCasesTest($executionIDList[0], $products[0], $stories[0])) & r($execution->unlinkCasesTest($executionIDList[1], $products[1], $stories[1])) && p() && e('0'); // 瀑布执行解除关联用例 r($execution->unlinkCasesTest($executionIDList[2], $products[2], $stories[2])) && p() && e('0'); // 看板执行解除关联用例 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/unlinkmember.php b/test/model/execution/unlinkmember.php index 38e77290ac..2964434b5e 100755 --- a/test/model/execution/unlinkmember.php +++ b/test/model/execution/unlinkmember.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[1])) r($execution->unlinkMemberTest($executionIDList[1], $accountList[1], $count[0])) && p() && e('0'); // 瀑布执行解除团队成员 r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板执行解除团队成员 r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('1'); // 看板执行解除团队成员后统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/unlinkstory.php b/test/model/execution/unlinkstory.php index 15f69447eb..70de49b8ce 100755 --- a/test/model/execution/unlinkstory.php +++ b/test/model/execution/unlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($execution->unlinkStoryTest($executionIDList[0], $count[1], $stories[0], $stor r($execution->unlinkStoryTest($executionIDList[1], $count[1], $stories[1], $story)) && p() && e('2'); // 瀑布执行关联需求统计 r($execution->unlinkStoryTest($executionIDList[2], $count[1], $stories[2], $story)) && p() && e('2'); // 看板执行关联需求统计 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/update.php b/test/model/execution/update.php index 7ce1bae9ee..352cb1123e 100755 --- a/test/model/execution/update.php +++ b/test/model/execution/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -56,4 +57,4 @@ r($execution->updateObject($executionIDList[1], $noName)) && p('name:0') r($execution->updateObject($executionIDList[1], $noCode)) && p('code:0') && e('『迭代代号』不能为空。'); // 测试修改code为空 r($execution->updateObject($executionIDList[1], $noChange)) && p() && e('没有数据更新'); // 测试无修改 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/updatechilds.php b/test/model/execution/updatechilds.php index ea4177f234..40e8900653 100755 --- a/test/model/execution/updatechilds.php +++ b/test/model/execution/updatechilds.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($execution->updateChildsTest($executionIDList[0], $count[1], $sprintChilds)) & r($execution->updateChildsTest($executionIDList[1], $count[1], $stageChilds)) && p() && e('2'); // 修改敏捷执行的父执行 r($execution->updateChildsTest($executionIDList[2], $count[1], $kanbanChilds)) && p() && e('2'); // 修改敏捷执行的父执行 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/execution/updateproducts.php b/test/model/execution/updateproducts.php index 4d85d8f702..ba618310ca 100755 --- a/test/model/execution/updateproducts.php +++ b/test/model/execution/updateproducts.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($execution->updateProductsTest($executionIDList[0], $products)) && p('0:produc r($execution->updateProductsTest($executionIDList[1], $products)) && p('1:product') && e('82'); // 测试修改瀑布执行关联产品 r($execution->updateProductsTest($executionIDList[2], $products)) && p('2:product') && e('92'); // 测试修改看板执行关联产品 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/extension/checkdownloadpath.php b/test/model/extension/checkdownloadpath.php old mode 100644 new mode 100755 index 9a874301d9..8d091e1fa7 --- a/test/model/extension/checkdownloadpath.php +++ b/test/model/extension/checkdownloadpath.php @@ -9,10 +9,13 @@ title=测试 extensionModel->checkDownloadPath(); cid=1 pid=1 +查看获取到的结果数量 >> 2 +查看获取到的结果 >> ok + */ global $tester; $result = $tester->loadModel('extension')->checkDownloadPath(); r(count($result)) && p() && e('2'); // 查看获取到的结果数量 -r($result) && p('result') && e('ok'); // 查看获取到的结果 +r($result) && p('result') && e('ok'); // 查看获取到的结果 \ No newline at end of file diff --git a/test/model/extension/getinfofromdb.php b/test/model/extension/getinfofromdb.php old mode 100644 new mode 100755 index b2a361b5a1..8a4596ed29 --- a/test/model/extension/getinfofromdb.php +++ b/test/model/extension/getinfofromdb.php @@ -9,6 +9,11 @@ title=测试 extensionModel->getInfoFromDB(); cid=1 pid=1 +获取已安装的插件1的详细信息 >> 1,这是插件名称1,code1,extension,installed +获取已安装的插件2的详细信息 >> 2,这是插件名称2,code2,extension,deactivated +获取已安装的插件3的详细信息 >> 3,这是插件名称3,code3,extension,installed +获取已安装的插件4的详细信息 >> 4,这是插件名称4,code4,extension,deactivated + */ global $tester; @@ -22,4 +27,4 @@ $ext4 = $tester->extension->getInfoFromDB('code4'); r($ext1) && p('id,name,code,type,status') && e('1,这是插件名称1,code1,extension,installed'); // 获取已安装的插件1的详细信息 r($ext2) && p('id,name,code,type,status') && e('2,这是插件名称2,code2,extension,deactivated'); // 获取已安装的插件2的详细信息 r($ext3) && p('id,name,code,type,status') && e('3,这是插件名称3,code3,extension,installed'); // 获取已安装的插件3的详细信息 -r($ext4) && p('id,name,code,type,status') && e('4,这是插件名称4,code4,extension,deactivated'); // 获取已安装的插件4的详细信息 +r($ext4) && p('id,name,code,type,status') && e('4,这是插件名称4,code4,extension,deactivated'); // 获取已安装的插件4的详细信息 \ No newline at end of file diff --git a/test/model/extension/getlocalextensions.php b/test/model/extension/getlocalextensions.php old mode 100644 new mode 100755 index c34b046642..64c32bcf19 --- a/test/model/extension/getlocalextensions.php +++ b/test/model/extension/getlocalextensions.php @@ -9,6 +9,11 @@ title=测试 extensionModel->getLocalExtensions(); cid=1 pid=1 +获取已经安装的插件数量 >> 5 +获取已经销毁的插件数量 >> 5 +获取代号为code1的插件详细信息 >> 1,这是插件名称1,extension,installed +获取代号为code2的插件详细信息 >> 2,这是插件名称2,extension,deactivated + */ global $tester; @@ -19,4 +24,4 @@ $deactivatedExt = $tester->extension->getLocalExtensions('deactivated'); r(count($installedExt)) && p() && e('5'); // 获取已经安装的插件数量 r(count($deactivatedExt)) && p() && e('5'); // 获取已经销毁的插件数量 r($installedExt) && p('code1:id,name,type,status') && e('1,这是插件名称1,extension,installed'); // 获取代号为code1的插件详细信息 -r($deactivatedExt) && p('code2:id,name,type,status') && e('2,这是插件名称2,extension,deactivated'); // 获取代号为code2的插件详细信息 +r($deactivatedExt) && p('code2:id,name,type,status') && e('2,这是插件名称2,extension,deactivated'); // 获取代号为code2的插件详细信息 \ No newline at end of file diff --git a/test/model/extension/getmodulesbyapi.php b/test/model/extension/getmodulesbyapi.php old mode 100644 new mode 100755 index 860621dd9e..3dd0604a93 --- a/test/model/extension/getmodulesbyapi.php +++ b/test/model/extension/getmodulesbyapi.php @@ -9,6 +9,10 @@ title=测试 extensionModel->getModulesByAPI(); cid=1 pid=1 +判断返回的API中是否包含个人相关 >> 1 +判断返回的API中是否包含项目相关 >> 1 +判断返回的API中是否包含地盘相关 >> 0 + */ global $tester; @@ -21,4 +25,4 @@ $includeMy = strpos($api, '地盘相关') !== false; r($includeUser) && p() && e('1'); // 判断返回的API中是否包含个人相关 r($includeProject) && p() && e('1'); // 判断返回的API中是否包含项目相关 -r($includeMy) && p() && e('0'); // 判断返回的API中是否包含地盘相关 +r($includeMy) && p() && e('0'); // 判断返回的API中是否包含地盘相关 \ No newline at end of file diff --git a/test/model/file/updateobjectid.php b/test/model/file/updateobjectid.php index 513dd20d6a..49f509a31f 100755 --- a/test/model/file/updateobjectid.php +++ b/test/model/file/updateobjectid.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($file->updateObjectIDTest($uid, $objectID[1], $objectType[1], $albums2)) && p( r($file->updateObjectIDTest($uid, $objectID[2], $objectType[2], $albums3)) && p('4:id,objectID,objectType;5:id,objectID,objectType') && e('4,103,task;5,103,task'); // 测试更新 id 4 5 的objectID 为 103 objectType 为 task r($file->updateObjectIDTest($uid, $objectID[3], $objectType[3], $albums4)) && p('6:id,objectID,objectType;7:id,objectID,objectType;8:id,objectID,objectType') && e('6,104,traincourse;7,104,traincourse;8,104,traincourse'); // 测试更新 id 6 7 8 的objectID 为 104 objectType 为 traincourse r($file->updateObjectIDTest($uid, $objectID[4], $objectType[4], $albums5)) && p('9:id,objectID,objectType;10:id,objectID,objectType;11:id,objectID,objectType') && e('9,105,testcase;10,105,testcase;11,105,testcase'); // 测试更新 id 9 10 11 的objectID 为 105 objectType 为 testcase -system('./ztest init'); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/convertlog.php b/test/model/git/convertlog.php index 0ff4c58935..916cfcb1d3 100755 --- a/test/model/git/convertlog.php +++ b/test/model/git/convertlog.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,7 +12,6 @@ cid=1 pid=1 使用正确格式的数据 >> e7699d04f1586d337f34496da932dde55db92616 -使用空数据 >> 0 */ @@ -26,4 +26,4 @@ r($git->convertLog($log)) && p('revision') && e('e7699d04f1586d337f34496da932dde $log = array(); r($git->convertLog($log)) && p('revision') && e(0); // 使用空的数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/getrepologs.php b/test/model/git/getrepologs.php index 2cd796f534..bfcd23c489 100755 --- a/test/model/git/getrepologs.php +++ b/test/model/git/getrepologs.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,7 @@ title=测试gitModel->getRepoLogs(); cid=1 pid=1 -获取版本库的tags >> 1 -使用空数据 >> 0 -使用错误的版本库 >> 0 + */ @@ -30,4 +29,4 @@ $repo->client = ''; $repo->path = ''; r($git->getRepoLogs($repo)) && p() && e(0); // 使用错误的版本库 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/getrepos.php b/test/model/git/getrepos.php index dc568ac8d1..75e3e386b1 100755 --- a/test/model/git/getrepos.php +++ b/test/model/git/getrepos.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,7 @@ title=测试gitModel->getRepos(); cid=1 pid=1 + >> id 获取版本库 >> http://10.0.1.161:51080/api/v4/projects/42/repository/ */ @@ -19,4 +21,4 @@ $git = new gitTest(); $tester->dao->update(TABLE_REPO)->set('synced')->eq(1)->where('id')->eq(1)->exec(); r($git->getRepos()) && p() && e('http://10.0.1.161:51080/api/v4/projects/42/repository/'); // 获取版本库 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/getrepotags.php b/test/model/git/getrepotags.php index 79f46b5a2e..9ba9a55d13 100755 --- a/test/model/git/getrepotags.php +++ b/test/model/git/getrepotags.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,7 @@ title=测试gitModel->getRepoTags(); cid=1 pid=1 -获取版本库的tags >> 1 -使用空数据 >> 0 -使用错误的版本库 >> 0 +10.0.1.161:51080')->where('id')->eq(1)->exec(); >> id */ @@ -33,4 +32,4 @@ $repo->client = ''; $repo->path = ''; r($git->getRepoTags($repo)) && p() && e(0); // 使用错误的版本库 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/setrepo.php b/test/model/git/setrepo.php index 46af69a3c9..0a42a7489d 100755 --- a/test/model/git/setrepo.php +++ b/test/model/git/setrepo.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,8 +11,8 @@ title=测试gitModel->setRepo(); cid=1 pid=1 -设置错误版本号参数 >> ,, -设置正确版本号参数 >> 1,1,1 +设置错误版本库参数 >> ,, +设置正确版本库参数 >> 1,1,1 */ @@ -24,4 +25,4 @@ $repo = $tester->dao->select('*')->from(TABLE_REPO)->limit(1)->fetch(); if(strtolower($repo->SCM) == 'gitlab') $repo = $tester->loadModel('repo')->processGitlab($repo); r($git->setRepo($repo)) && p("result,client,repoRoot") && e("1,1,1"); // 设置正确版本库参数 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/setrepos.php b/test/model/git/setrepos.php index 33df336ce5..193026ce56 100755 --- a/test/model/git/setrepos.php +++ b/test/model/git/setrepos.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,7 @@ title=测试gitModel->setRepos(); cid=1 pid=1 -设置版本库 >> 1 + >> id */ @@ -18,4 +19,4 @@ $git = new gitTest(); $tester->dao->update(TABLE_REPO)->set('synced')->eq(1)->where('id')->eq(1)->exec(); r($git->setRepos()) && p('id') && e(1); // 设置版本库 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/git/updatecommit.php b/test/model/git/updatecommit.php index 213b8fb322..e260c1955a 100755 --- a/test/model/git/updatecommit.php +++ b/test/model/git/updatecommit.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,8 +11,7 @@ title=测试gitModel->updatecommit(); cid=1 pid=1 -测试正常的版本库 >> 1 -测试空的版本库 >> 0 + */ @@ -24,4 +24,4 @@ r($git->updateCommit($repo)) && p() && e(1); // 测试正常的版本库 $repo = new stdclass(); r($git->updateCommit($repo)) && p() && e(0); // 测试空的版本库 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/gitlab/apicreatebranch.php b/test/model/gitlab/apicreatebranch.php index e5613f6c67..d454623699 100755 --- a/test/model/gitlab/apicreatebranch.php +++ b/test/model/gitlab/apicreatebranch.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::apiCreateBranch(); cid=1 pid=1 -使用空的gitlabID、projectID、分支对象创建GitLab分支 >> return false -使用空的gitlabID、projectID,正确的分支对象创建GitLab分支 >> return null -使用正确的gitlabID、分支信息,错误的projectID创建分支 >> 404 Project Not Found -使用正确的gitlabID,projectID,分支对象创建GitLab分支 >> 1 -使用重复的分支信息创建分支 >> Branch already exists +使用空的gitlabID,projectID,分支对象创建GitLab分支 >> return false +使用空的gitlabID、projectID,正确的分支对象创建GitLab分支 >> return null +使用正确的gitlabID、分支信息,错误的projectID创建分支 >> 404 Project Not Found +通过gitlabID,projectID,分支对象正确创建GitLab分支 >> 1 +使用重复的分支信息创建分支 >> Branch already exists */ @@ -40,4 +40,4 @@ $result = $gitlab->apiCreateBranch($gitlabID, $projectID, $branch); if(!empty($result->name) and $result->name == $branch->branch) $result = true; if(!empty($result->message) and $result->message == 'Branch already exists') $result = true; r($result) && p() && e('1'); //通过gitlabID,projectID,分支对象正确创建GitLab分支 -r($gitlab->apiCreateBranch($gitlabID, $projectID, $branch)) && p('message') && e('Branch already exists'); //使用重复的分支信息创建分支 +r($gitlab->apiCreateBranch($gitlabID, $projectID, $branch)) && p('message') && e('Branch already exists'); //使用重复的分支信息创建分支 \ No newline at end of file diff --git a/test/model/gitlab/apicreatebranchpriv.php b/test/model/gitlab/apicreatebranchpriv.php index b2f7e479ac..70f4297137 100755 --- a/test/model/gitlab/apicreatebranchpriv.php +++ b/test/model/gitlab/apicreatebranchpriv.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::apiCreateBranchPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护分支对象创建GitLab保护分支 >> return false -使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支 >> return false -使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支 >> return false -使用正确的gitlabID,projectID,保护分支对象创建GitLab保护分支 >> master -使用重复的保护分支信息创建保护分支 >> Protected branch 'master' already exists +使用空的gitlabID,projectID,保护分支对象创建GitLab保护分支 >> return false +使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支 >> return false +使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支 >> return false +通过gitlabID,projectID,保护分支对象正确创建GitLab保护分支 >> master +使用重复的保护分支信息创建保护分支 >> Protected branch 'master' already exists */ @@ -42,5 +42,4 @@ r($result) && p() && e('return false'); //使用正确的gitlabID、保护分支 $projectID = 966; $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch->name); r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('name') && e('master'); //通过gitlabID,projectID,保护分支对象正确创建GitLab保护分支 -r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('message') && e("Protected branch 'master' already exists"); //使用重复的保护分支信息创建保护分支 - +r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('message') && e("Protected branch 'master' already exists"); //使用重复的保护分支信息创建保护分支 \ No newline at end of file diff --git a/test/model/gitlab/apicreatetagpriv.php b/test/model/gitlab/apicreatetagpriv.php index ea17f81615..7db6eafa3e 100755 --- a/test/model/gitlab/apicreatetagpriv.php +++ b/test/model/gitlab/apicreatetagpriv.php @@ -8,12 +8,12 @@ title=测试 gitlabModel::apiCreateTagPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护标签对象创建GitLab保护标签 >> return false -使用正确的gitlabID,空的projectID、保护标签对象创建GitLab保护标签 >> return false +使用空的gitlabID,projectID,保护标签对象创建GitLab保护标签 >> return false +使用正确的gitlabID,空的projectID、保护标签对象创建GitLab保护标签 >> return false 使用正确的gitlabID,空的保护标签信息,错误的projectID创建保护标签 >> return false -使用正确的gitlabID、保护标签信息,错误的projectID创建保护标签 >> 404 Project Not Found -使用正确的gitlabID、projectID、保护标签信息创建保护标签 >> test_tag1 -使用重复的保护标签信息创建保护标签 >> 名称已经被使用 +使用正确的gitlabID、保护标签信息,错误的projectID创建保护标签 >> 404 Project Not Found +使用正确的gitlabID、projectID、保护标签信息创建保护标签 >> test_tag1 +使用重复的保护标签信息创建保护标签 >> 名称已经被使用 */ @@ -44,4 +44,4 @@ r($gitlab->apiCreateTagPriv($gitlabID, $projectID, $tag)) && p('message') && e(' $projectID = 1555; $gitlab->apiDeleteTagPriv($gitlabID, $projectID, $tag->name); r($gitlab->apiCreateTagPriv($gitlabID, $projectID, $tag)) && p('name') && e('test_tag1'); //使用正确的gitlabID、projectID、保护标签信息创建保护标签 -r($gitlab->apiCreateTagPriv($gitlabID, $projectID, $tag)) && p('message:0') && e("名称已经被使用"); //使用重复的保护标签信息创建保护标签 +r($gitlab->apiCreateTagPriv($gitlabID, $projectID, $tag)) && p('message:0') && e("名称已经被使用"); //使用重复的保护标签信息创建保护标签 \ No newline at end of file diff --git a/test/model/gitlab/apideletebranchpriv.php b/test/model/gitlab/apideletebranchpriv.php old mode 100644 new mode 100755 index b7d0761381..adf781fc16 --- a/test/model/gitlab/apideletebranchpriv.php +++ b/test/model/gitlab/apideletebranchpriv.php @@ -8,10 +8,10 @@ title=测试 gitlabModel::apiDeleteBranchPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护分支删除保护分支 >> return false +使用空的gitlabID,projectID,分支名称删除保护分支 >> return false 使用正确的gitlabID、保护分支信息,错误的projectID删除保护分支 >> 404 Project Not Found -使用正确的gitlabID,projectID,保护分支删除保护分支 >> return true -使用错误的保护分支信息删除保护分支 >> 404 Not found +通过gitlabID,projectID,分支名称正确删除保护分支 >> return true +使用错误的保护分支信息删除保护分支 >> 404 Not found */ @@ -37,4 +37,4 @@ r($result) && p() && e('return true'); //通过gitlabID,projectID,分支名称 $branch = 'masters'; $result = $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch); -r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息删除保护分支 +r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息删除保护分支 \ No newline at end of file diff --git a/test/model/gitlab/apideletetag.php b/test/model/gitlab/apideletetag.php old mode 100644 new mode 100755 index 3e473d6486..6b7c97b58d --- a/test/model/gitlab/apideletetag.php +++ b/test/model/gitlab/apideletetag.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::apiDeleteTag(); cid=1 pid=1 -使用空的gitlabID、projectID、标签名称删除标签 >> return false -使用正确的gitlabID、保护分支信息,错误的projectID删除标签 >> 404 Project Not Found -使用正确的gitlabID,projectID,保护分支删除保护分支 >> 404 Tag Not Found -使用错误的保护分支信息删除保护分支 >> Protected tags cannot be deleted -成功删除标签 >> return true +使用空的gitlabID,projectID,分支名称删除保护分支 >> return false +使用正确的gitlabID、错误的projectID删除标签 >> 404 Project Not Found +使用正确的gitlabID、projectID,不存在的标签删除 >> 404 Tag Not Found +删除受保护的标签 >> Protected tags cannot be deleted +成功删除标签 >> return true */ @@ -46,4 +46,4 @@ $_POST['ref'] = 'master'; $gitlab->createTag($gitlabID, $projectID); $result = $gitlab->apiDeleteTag($gitlabID, $projectID, $tagName); if(!$result or substr($result->message, 0, 2) == '20') $result = 'return true'; -r($result) && p('message') && e('return true'); //成功删除标签 +r($result) && p('message') && e('return true'); //成功删除标签 \ No newline at end of file diff --git a/test/model/gitlab/apideletetagpriv.php b/test/model/gitlab/apideletetagpriv.php old mode 100644 new mode 100755 index 423bdc0dbc..9a80a3c09d --- a/test/model/gitlab/apideletetagpriv.php +++ b/test/model/gitlab/apideletetagpriv.php @@ -8,10 +8,10 @@ title=测试 gitlabModel::apiDeleteTagPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护标签删除保护标签 >> return false +使用空的gitlabID,projectID,标签名称删除保护标签 >> return false 使用正确的gitlabID、保护标签信息,错误的projectID删除保护标签 >> 404 Project Not Found -使用错误的保护标签信息删除保护标签 >> 404 Not found -使用正确的gitlabID,projectID,保护标签删除保护标签 >> return true +使用错误的保护标签信息删除保护标签 >> 404 Not found +通过gitlabID,projectID,标签名称正确删除保护标签 >> return true */ @@ -39,4 +39,4 @@ $projectID = 1555; $tag = 'test_tag1'; $result = $gitlab->apiDeleteTagPriv($gitlabID, $projectID, $tag); if(!$result or substr($result->message, 0, 2) == '20') $result = 'return true'; -r($result) && p() && e('return true'); //通过gitlabID,projectID,标签名称正确删除保护标签 +r($result) && p() && e('return true'); //通过gitlabID,projectID,标签名称正确删除保护标签 \ No newline at end of file diff --git a/test/model/gitlab/apigetbranches.php b/test/model/gitlab/apigetbranches.php index 01e1cf7cf7..fa7c5991dc 100755 --- a/test/model/gitlab/apigetbranches.php +++ b/test/model/gitlab/apigetbranches.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::apiGetBranches(); cid=1 pid=1 -通过gitlabID,projectID,获取GitLab分支列表 >> 1 -通过gitlabID,projectID,获取GitLab分支数量 >> 1 -当前项目没有分支时,获取GitLab分支列表 >> 0 +通过gitlabID,projectID,获取GitLab分支列表 >> 1 +通过gitlabID,projectID,获取GitLab分支数量 >> 1 +当前项目没有分支时,获取GitLab分支列表 >> 0 当gitlabID存在,projectID不存在时,获取GitLab分支列表 >> return empty -当gitlabID,projectID都为0时,获取GitLab分支列表 >> return empty +当gitlabID,projectID都为0时,获取GitLab分支列表 >> return empty */ @@ -38,4 +38,4 @@ $gitlabID = 0; $projectID = 0; $result = $gitlab->apiGetBranches($gitlabID, $projectID); if(empty($result)) $result = 'return empty'; -r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取GitLab分支列表 +r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取GitLab分支列表 \ No newline at end of file diff --git a/test/model/gitlab/apigetbranchprivs.php b/test/model/gitlab/apigetbranchprivs.php index 5397b0ee9f..e8a512d9ad 100755 --- a/test/model/gitlab/apigetbranchprivs.php +++ b/test/model/gitlab/apigetbranchprivs.php @@ -8,10 +8,10 @@ title=测试 gitlabModel::apiGetBranchPrivs(); cid=1 pid=1 -获取指定项目下受保护分支列表 >> master -获取指定项目下受保护分支数量 >> 3 -获取无保护分支的项目下受保护分支数量 >> 0 -通过不存在projectID,获取受保护分支列表 >> 404 Project Not Found +获取指定项目下受保护分支列表 >> master +获取指定项目下受保护分支数量 >> 3 +获取无保护分支的项目下受保护分支数量 >> 0 +通过不存在projectID,获取受保护分支列表 >> 404 Project Not Found 当gitlabID,projectID都为0时,获取受保护分支列表 >> return empty */ @@ -36,4 +36,4 @@ $gitlabID = 0; $projectID = 0; $result = $gitlab->apiGetBranchPrivs($gitlabID, $projectID); if(empty($result)) $result = 'return empty'; -r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取受保护分支列表 +r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取受保护分支列表 \ No newline at end of file diff --git a/test/model/gitlab/apigetcurrentuser.php b/test/model/gitlab/apigetcurrentuser.php old mode 100644 new mode 100755 index 2a1b985121..acf6f247ad --- a/test/model/gitlab/apigetcurrentuser.php +++ b/test/model/gitlab/apigetcurrentuser.php @@ -8,6 +8,12 @@ title=测试 gitlabModel::apiGetCurrentUser(); cid=1 pid=1 +使用空的数据获取用户信息 >> return false +使用错误的host获取用户信息 >> return null +使用正确的host,错误的token获取用户信息 >> 401 Unauthorized +通过host,token获取用户信息 >> 1 +通过host,权限不足的token获取用户信息 >> insufficient_scope + */ $gitlab = $tester->loadModel('gitlab'); @@ -34,4 +40,4 @@ r($result) && p('id') && e('1'); //通过host,token获取用户信息 $token = 'wVFHE6NZA-cJy-3U2y2J'; $result = $gitlab->apiGetCurrentUser($host, $token); -r($result) && p('error') && e('insufficient_scope'); //通过host,权限不足的token获取用户信息 +r($result) && p('error') && e('insufficient_scope'); //通过host,权限不足的token获取用户信息 \ No newline at end of file diff --git a/test/model/gitlab/apigetgroupmembers.php b/test/model/gitlab/apigetgroupmembers.php old mode 100644 new mode 100755 index 09ef90e200..971b247349 --- a/test/model/gitlab/apigetgroupmembers.php +++ b/test/model/gitlab/apigetgroupmembers.php @@ -8,6 +8,12 @@ title=测试 gitlabModel::apiGetGroupMembers(); cid=1 pid=1 +使用空的数据查询群组用户 >> return null +使用空的groupID查询群组用户 >> return null +使用错误的groupID查询群组用户 >> return null +通过gitlabID,groupID查询群组用户 >> return true +通过gitlabID,groupID,userID查询群组用户 >> return true + */ $gitlab = $tester->loadModel('gitlab'); @@ -38,4 +44,4 @@ r($result) && p() && e('return true'); //通过gitlabID,groupID查询群组用 $userID = 1; $result = $gitlab->apiGetGroupMembers($gitlabID, $groupID, $userID); if(is_array($result) && count($result) == 1) $result = 'return true'; -r($result) && p() && e('return true'); //通过gitlabID,groupID,userID查询群组用户 +r($result) && p() && e('return true'); //通过gitlabID,groupID,userID查询群组用户 \ No newline at end of file diff --git a/test/model/gitlab/apigetgroups.php b/test/model/gitlab/apigetgroups.php old mode 100644 new mode 100755 index bac0cf63c9..393191677f --- a/test/model/gitlab/apigetgroups.php +++ b/test/model/gitlab/apigetgroups.php @@ -8,6 +8,12 @@ title=测试 gitlabModel::apiGetGroups(); cid=1 pid=1 +使用空的数据查询群组 >> return null +使用正确的gitlabID查询群组 >> return true +使用错误的orderBy查询群组 >> return true +通过gitlabID,orderBy查询群组 >> return true +通过错误的minRole查询群组 >> return true + */ $gitlab = $tester->loadModel('gitlab'); @@ -39,4 +45,4 @@ r($result) && p() && e('return true'); //通过gitlabID,orderBy查询群组 $minRole = 'abc'; $result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole); if(is_array($result)) $result = 'return true'; -r($result) && p() && e('return true'); //通过错误的minRole查询群组 +r($result) && p() && e('return true'); //通过错误的minRole查询群组 \ No newline at end of file diff --git a/test/model/gitlab/apigetsinglebranchpriv.php b/test/model/gitlab/apigetsinglebranchpriv.php old mode 100644 new mode 100755 index 6ea3c8f5e1..3a8aaa82d5 --- a/test/model/gitlab/apigetsinglebranchpriv.php +++ b/test/model/gitlab/apigetsinglebranchpriv.php @@ -8,10 +8,10 @@ title=测试 gitlabModel::apiGetSingleBranchPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护分支获取保护分支 >> return false +使用空的gitlabID,projectID,分支名称获取保护分支 >> return false 使用正确的gitlabID、保护分支信息,错误的projectID获取保护分支 >> 404 Project Not Found -使用正确的gitlabID,projectID,保护分支获取保护分支 >> master -使用错误的保护分支信息获取保护分支 >> 404 Not found +通过gitlabID,projectID,分支名称正确获取保护分支 >> master +使用错误的保护分支信息获取保护分支 >> 404 Not found */ @@ -36,4 +36,4 @@ r($result) && p('name') && e('master'); //通过gitlabID,projectID,分支名称 $branch = 'masters'; $result = $gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch); -r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息获取保护分支 +r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息获取保护分支 \ No newline at end of file diff --git a/test/model/gitlab/apigettagprivs.php b/test/model/gitlab/apigettagprivs.php old mode 100644 new mode 100755 index eaef7ba9d0..56df16428b --- a/test/model/gitlab/apigettagprivs.php +++ b/test/model/gitlab/apigettagprivs.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::apiGetTagPrivs(); cid=1 pid=1 -通过gitlabID,projectID,获取GitLab标签保护列表 >> 1 -通过gitlabID,projectID,获取GitLab标签保护数量 >> 1 -当前项目没有标签保护时,获取GitLab标签保护列表 >> 0 -当gitlabID存在,projectID不存在时,获取GitLab标签保护列表 >> return empty -当gitlabID,projectID都为0时,获取GitLab标签保护列表 >> return empty +通过gitlabID,projectID,获取GitLab标签保护列表 >> 1 +通过gitlabID,projectID,获取GitLab标签保护数量 >> 1 +当前项目没有标签保护时,获取GitLab标签保护列表 >> 0 +通过gitlabID,projectID,获取GitLab标签保护列表 >> return empty +当gitlabID,projectID都为0时,获取GitLab标签保护列表 >> return empty */ @@ -38,4 +38,4 @@ $gitlabID = 0; $projectID = 0; $result = $gitlab->apiGetTagPrivs($gitlabID, $projectID); if(empty($result)) $result = 'return empty'; -r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取GitLab标签保护列表 +r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取GitLab标签保护列表 \ No newline at end of file diff --git a/test/model/gitlab/apigettags.php b/test/model/gitlab/apigettags.php old mode 100644 new mode 100755 index 8afe4552ea..747fe6ee18 --- a/test/model/gitlab/apigettags.php +++ b/test/model/gitlab/apigettags.php @@ -8,14 +8,14 @@ title=测试 gitlabModel::apiGetTags(); cid=1 pid=1 -通过gitlabID,projectID,获取GitLab标签列表 >> 1 -通过gitlabID,projectID,获取GitLab标签数量 >> 1 -当前项目没有标签时,获取GitLab标签列表 >> 0 -当gitlabID存在,projectID不存在时,获取GitLab标签列表 >> return empty -当gitlabID,projectID都为0时,获取GitLab标签列表 >> return empty -通过gitlabID,projectID,按标签名升序获取GitLab标签列表 >> with_cicredentials +通过gitlabID,projectID,获取GitLab标签列表 >> 1 +通过gitlabID,projectID,获取GitLab标签数量 >> 1 +当前项目没有标签时,获取GitLab标签列表 >> 0 +通过gitlabID,projectID,获取GitLab标签列表 >> return empty +当gitlabID,projectID都为0时,获取GitLab标签列表 >> return empty +通过gitlabID,projectID,按标签名升序获取GitLab标签列表 >> with_cicredentials 通过gitlabID,projectID,搜索字符'zentaopms_15.2_20210720'获取GitLab标签列表 >> zentaopms_15.2_20210720 -通过gitlabID,projectID,每页20条记录,分页获取第二页GitLab标签列表 >> zentaopms_2.0_stable_20110503 +通过gitlabID,projectID,每页20条记录,分页获取第二页GitLab标签列表 >> zentaopms_2.0_stable_20110503 */ @@ -56,4 +56,4 @@ r($result) && p('0:name') && e('zentaopms_15.2_20210720'); //通过gitlabID,proj $tester->app->loadClass('pager', $static = true); $pager = new pager(0, 20, 2); $result = $gitlab->apiGetTags($gitlabID, $projectID, $orderBy, '', $pager); -r($result) && p('0:name') && e('zentaopms_2.0_stable_20110503'); //通过gitlabID,projectID,每页20条记录,分页获取第二页GitLab标签列表 +r($result) && p('0:name') && e('zentaopms_2.0_stable_20110503'); //通过gitlabID,projectID,每页20条记录,分页获取第二页GitLab标签列表 \ No newline at end of file diff --git a/test/model/gitlab/checkaccesslevel.php b/test/model/gitlab/checkaccesslevel.php old mode 100644 new mode 100755 index c9eb79f37c..d5878034cc --- a/test/model/gitlab/checkaccesslevel.php +++ b/test/model/gitlab/checkaccesslevel.php @@ -8,10 +8,10 @@ title=测试 gitlabModel::checkAccessLevel(); cid=1 pid=1 -使用空的权限信息查询 >> 40 -使用只有维护者权限信息查询 >> 40 +使用空的权限信息查询 >> 40 +使用只有维护者权限信息查询 >> 40 使用包含维护者和开发者权限信息查询 >> 30 -使用包含禁止权限信息查询 >> 0 +使用包含禁止权限信息查询 >> 0 使用包含禁止权限信息的二维数组查询 >> 0 */ @@ -48,4 +48,4 @@ $accessLevelArray = array( 'access_level_description' => 'No one' ) ); -r($gitlab->checkAccessLevel($accessLevelArray)) && p() && e('0'); //使用包含禁止权限信息的二维数组查询 +r($gitlab->checkAccessLevel($accessLevelArray)) && p() && e('0'); //使用包含禁止权限信息的二维数组查询 \ No newline at end of file diff --git a/test/model/gitlab/checktokenaccess.php b/test/model/gitlab/checktokenaccess.php old mode 100644 new mode 100755 index 0a65a35396..2382aa49c4 --- a/test/model/gitlab/checktokenaccess.php +++ b/test/model/gitlab/checktokenaccess.php @@ -8,6 +8,12 @@ title=测试 gitlabModel::checkTokenAccess(); cid=1 pid=1 +使用空的数据验证token权限 >> return false +使用错误的host验证token权限 >> return false +使用正确的host,错误的token验证token权限 >> return null +通过host,token验证token权限 >> success +通过host,权限不足的token验证token权限 >> no access + */ $gitlab = $tester->loadModel('gitlab'); @@ -37,4 +43,4 @@ r($result) && p() && e('success'); //通过host,token验证token权限 $token = 'wVFHE6NZA-cJy-3U2y2J'; $result = $gitlab->checkTokenAccess($host, $token); if(!isset($result->id)) $result = 'no access'; -r($result) && p() && e('no access'); //通过host,权限不足的token验证token权限 +r($result) && p() && e('no access'); //通过host,权限不足的token验证token权限 \ No newline at end of file diff --git a/test/model/gitlab/checkuseraccess.php b/test/model/gitlab/checkuseraccess.php old mode 100644 new mode 100755 index 51a6ec9c73..23664fbfa3 --- a/test/model/gitlab/checkuseraccess.php +++ b/test/model/gitlab/checkuseraccess.php @@ -8,6 +8,15 @@ title=测试 gitlabModel::checkUserAccess(); cid=1 pid=1 +使用超级管理员判断权限 >> 1 +切换普通用户,使用错误的项目ID判断权限 >> 0 +切换普通用户,使用当前用户无身份的项目ID判断权限 >> 0 +切换普通用户,使用当前用户是拥有者的项目ID判断权限 >> 1 +切换普通用户,使用错误的项目信息判断权限是否有维护者权限 >> 0 +切换普通用户,使用错误的项目信息判断权限是否有维护者权限 >> 1 +切换普通用户,使用当前用户是开发者的项目ID判断权限是否有维护者权限 >> 0 +切换普通用户,使用当前用户是拥有者的项目ID判断权限是否有维护者权限 >> 1 + */ $gitlab = $tester->loadModel('gitlab'); @@ -36,4 +45,4 @@ r($gitlab->checkUserAccess($gitlabID, $projectID, $project)) && p() && e('1'); / $projectID = 9; r($gitlab->checkUserAccess($gitlabID, $projectID, null, array(), 'maintainer')) && p() && e('0'); //切换普通用户,使用当前用户是开发者的项目ID判断权限是否有维护者权限 -r($gitlab->checkUserAccess($gitlabID, $projectID, $project, array(), 'maintainer')) && p() && e('1'); //切换普通用户,使用当前用户是拥有者的项目ID判断权限是否有维护者权限 +r($gitlab->checkUserAccess($gitlabID, $projectID, $project, array(), 'maintainer')) && p() && e('1'); //切换普通用户,使用当前用户是拥有者的项目ID判断权限是否有维护者权限 \ No newline at end of file diff --git a/test/model/gitlab/createbranch.php b/test/model/gitlab/createbranch.php index e12aabab11..af20170cf4 100755 --- a/test/model/gitlab/createbranch.php +++ b/test/model/gitlab/createbranch.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::createBranch(); cid=1 pid=1 -使用空的gitlabID、projectID、分支创建GitLab分支 >> return false -使用空的gitlabID、projectID,正确的分支创建GitLab分支 >> return false +使用空的gitlabID,projectID,分支对象创建GitLab分支 >> return false +使用空的gitlabID、projectID,正确的分支对象创建GitLab分支 >> return false 使用正确的gitlabID、分支信息,错误的projectID创建分支 >> return false -使用正确的gitlabID,projectID,分支创建GitLab分支 >> return true -使用重复的分支信息创建分支 >> return false +通过gitlabID,projectID,分支对象正确创建GitLab分支 >> return true +使用重复的分支信息创建分支 >> return false */ @@ -52,4 +52,4 @@ r($result) && p() && e('return true'); //通过gitlabID,projectID,分支对象 $result = $gitlab->createBranch($gitlabID, $projectID); if($result === false) $result = 'return false'; -r($result) && p() && e('return false'); //使用重复的分支信息创建分支 +r($result) && p() && e('return false'); //使用重复的分支信息创建分支 \ No newline at end of file diff --git a/test/model/gitlab/createbranchpriv.php b/test/model/gitlab/createbranchpriv.php old mode 100644 new mode 100755 index 8fd44825f1..a6f28fd446 --- a/test/model/gitlab/createbranchpriv.php +++ b/test/model/gitlab/createbranchpriv.php @@ -8,12 +8,12 @@ title=测试 gitlabModel::createBranchPriv(); cid=1 pid=1 -使用空的gitlabID、projectID、保护分支创建GitLab保护分支 >> return false -使用空的gitlabID、projectID,正确的保护分支创建GitLab保护分支 >> return false +使用空的gitlabID,projectID,保护分支对象创建GitLab保护分支 >> return false +使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支 >> return false 使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支 >> return false -使用正确的gitlabID,projectID,保护分支创建GitLab保护分支 >> return true -使用重复的保护分支信息创建保护分支 >> return false -使用保护分支信息更新保护分支 >> return true +通过gitlabID,projectID,保护分支对象正确创建GitLab保护分支 >> return true +使用重复的保护分支信息创建保护分支 >> return false +使用保护分支信息更新保护分支 >> return true */ @@ -54,4 +54,4 @@ dao::$errors = array(); $_POST['merge_access_level'] = '0'; $result = $gitlab->createBranchPriv($gitlabID, $projectID, $branch = 'master'); if($result === true) $result = 'return true'; -r($result) && p() && e('return true'); //使用保护分支信息更新保护分支 +r($result) && p() && e('return true'); //使用保护分支信息更新保护分支 \ No newline at end of file diff --git a/test/model/gitlab/createtag.php b/test/model/gitlab/createtag.php index f61022862c..0e554dfe0d 100755 --- a/test/model/gitlab/createtag.php +++ b/test/model/gitlab/createtag.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::createTag(); cid=1 pid=1 -使用空的gitlabID、projectID、标签创建GitLab标签 >> return false -使用空的gitlabID、projectID,正确的标签创建GitLab标签 >> return false +使用空的gitlabID,projectID,标签对象创建GitLab标签 >> return false +使用空的gitlabID、projectID,正确的标签对象创建GitLab标签 >> return false 使用正确的gitlabID、标签信息,错误的projectID创建标签 >> return false -使用正确的gitlabID,projectID,标签创建GitLab标签 >> return true -使用重复的标签信息创建标签 >> return false +通过gitlabID,projectID,标签对象正确创建GitLab标签 >> return true +使用重复的标签信息创建标签 >> return false */ @@ -51,4 +51,4 @@ r($result) && p() && e('return true'); //通过gitlabID,projectID,标签对象 $result = $gitlab->createTag($gitlabID, $projectID); if($result === false) $result = 'return false'; -r($result) && p() && e('return false'); //使用重复的标签信息创建标签 +r($result) && p() && e('return false'); //使用重复的标签信息创建标签 \ No newline at end of file diff --git a/test/model/gitlab/createtagpriv.php b/test/model/gitlab/createtagpriv.php index 4db30a37e8..a0ec847fdc 100755 --- a/test/model/gitlab/createtagpriv.php +++ b/test/model/gitlab/createtagpriv.php @@ -8,11 +8,11 @@ title=测试 gitlabModel::createTagPriv(); cid=1 pid=1 -使用空的gitlabID,projectID,保护标签对象创建GitLab保护标签 >> 标签不能为空 +使用空的gitlabID,projectID,保护标签对象创建GitLab保护标签 >> 标签不能为空 使用正确的保护标签对象,空的gitlabID、projectID创建GitLab保护标签 >> return false -使用正确的gitlabID、保护标签信息,错误的projectID创建保护标签 >> 404 Project Not Found -使用正确的gitlabID、projectID和保护标签信息创建保护标签 >> return true -使用正确的gitlabID、projectID、保护标签信息,编辑保护标签 >> return true +使用正确的gitlabID、保护标签信息,错误的projectID创建保护标签 >> 404 Project Not Found +使用正确的gitlabID、projectID和保护标签信息创建保护标签 >> return true +使用正确的gitlabID、projectID、保护标签信息,编辑保护标签 >> return true */ @@ -45,4 +45,4 @@ r($result) && p() && e('return true'); //使用正确的gitlabID、projectID和 $projectID = 1555; $result = $gitlab->createTagPriv($gitlabID, $projectID, $_POST['name']); if(dao::getError() == false) $result = 'return true'; -r($result) && p() && e('return true'); //使用正确的gitlabID、projectID、保护标签信息,编辑保护标签 +r($result) && p() && e('return true'); //使用正确的gitlabID、projectID、保护标签信息,编辑保护标签 \ No newline at end of file diff --git a/test/model/gitlab/getgitlablistbyaccount.php b/test/model/gitlab/getgitlablistbyaccount.php old mode 100644 new mode 100755 index 7f7c7bc051..4dcbf2d1d7 --- a/test/model/gitlab/getgitlablistbyaccount.php +++ b/test/model/gitlab/getgitlablistbyaccount.php @@ -8,10 +8,14 @@ title=测试 gitlabModel::getGitLabListByAccount(); cid=1 pid=1 +默认admin用户查询绑定的gitlab服务器 >> 0 +使用已绑定一个gitlab服务器的用户查询 >> 1 +使用未绑定gitlab服务器的用户查询 >> 0 + */ $gitlab = $tester->loadModel('gitlab'); r(count($gitlab->getGitLabListByAccount())) && p() && e('0'); //默认admin用户查询绑定的gitlab服务器 r(count($gitlab->getGitLabListByAccount('user3'))) && p() && e('1'); //使用已绑定一个gitlab服务器的用户查询 -r(count($gitlab->getGitLabListByAccount('test1'))) && p() && e('0'); //使用未绑定gitlab服务器的用户查询 +r(count($gitlab->getGitLabListByAccount('test1'))) && p() && e('0'); //使用未绑定gitlab服务器的用户查询 \ No newline at end of file diff --git a/test/model/gitlab/getversion.php b/test/model/gitlab/getversion.php old mode 100644 new mode 100755 index 789d1ddf02..d9beddb2a0 --- a/test/model/gitlab/getversion.php +++ b/test/model/gitlab/getversion.php @@ -8,8 +8,8 @@ title=测试 gitlabModel::getVersion(); cid=1 pid=1 -通过host,token检验api权限 >> success -通过正确的host,错误的token获取api权限 >> return false +通过host,token检验api权限 >> success +通过正确的host,错误的token获取api权限 >> return false 通过错误或低版本的的host,token获取api权限 >> return false */ @@ -29,4 +29,4 @@ r($result) && p() && e('return false'); //通过正确的host,错误的token $result = $gitlab->getVersion($gitlabServer->url . '1', $gitlabServer->token); if(!isset($result->version)) $result = 'return false'; -r($result) && p() && e('return false'); //通过错误或低版本的的host,token获取api权限 +r($result) && p() && e('return false'); //通过错误或低版本的的host,token获取api权限 \ No newline at end of file diff --git a/test/model/group/checkmenumodule.php b/test/model/group/checkmenumodule.php old mode 100644 new mode 100755 index f5db30e17a..e8ba71aa3d --- a/test/model/group/checkmenumodule.php +++ b/test/model/group/checkmenumodule.php @@ -10,9 +10,7 @@ title=测试 groupModel->checkMenuModule(); cid=1 pid=1 -测试获取 '','index' 的返回结果 >> 1 -测试获取 'my','tree' 的返回结果 >> 0 -测试获取 'none','tree' 的返回结果 >> 0 + */ @@ -20,4 +18,4 @@ $group = new groupTest(); r($group->checkMenuModuleTest('','index')) && p('') && e(1); // 测试获取 '','index' 的返回结果 r($group->checkMenuModuleTest('my','tree')) && p('') && e(''); // 测试获取 'my','tree' 的返回结果 -r($group->checkMenuModuleTest('none','tree')) && p('') && e(''); // 测试获取 'none','tree' 的返回结果 +r($group->checkMenuModuleTest('none','tree')) && p('') && e(''); // 测试获取 'none','tree' 的返回结果 \ No newline at end of file diff --git a/test/model/group/copy.php b/test/model/group/copy.php old mode 100644 new mode 100755 index 756998f97a..0bf4548044 --- a/test/model/group/copy.php +++ b/test/model/group/copy.php @@ -10,8 +10,8 @@ title=测试 groupModel->copy(); cid=1 pid=1 -复制id为2的分组 >> 这是一个复制的分组 -复制名字已存在的分组 >> 『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 +这是一个复制的分组 >> 这是一个复制的分组 +『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 >> 『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 */ @@ -22,4 +22,4 @@ $existData = array('name' => '我是一个分组'); $group = new groupTest(); r($group->copyTest($groupID, $data)) && p('name') && e('这是一个复制的分组'); // 这是一个复制的分组 -r($group->copyTest($groupID, $existData)) && p('name:0') && e('『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 +r($group->copyTest($groupID, $existData)) && p('name:0') && e('『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 『分组名称』已经有『我是一个分组』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 \ No newline at end of file diff --git a/test/model/group/copypriv.php b/test/model/group/copypriv.php old mode 100644 new mode 100755 index d98fb151ba..c4662f1d0e --- a/test/model/group/copypriv.php +++ b/test/model/group/copypriv.php @@ -18,4 +18,4 @@ $fromGroup = 6; $toGroup = 7; $group = new groupTest(); -r($group->copyPrivTest($fromGroup, $toGroup)) && p() && e('1'); // 复制分组6权限到分组7 +r($group->copyPrivTest($fromGroup, $toGroup)) && p() && e('1'); // 复制分组6权限到分组7 \ No newline at end of file diff --git a/test/model/group/copyuser.php b/test/model/group/copyuser.php old mode 100644 new mode 100755 index 8e5e8171b3..6cc7dff9f5 --- a/test/model/group/copyuser.php +++ b/test/model/group/copyuser.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $toGroup = 7; $group = new groupTest(); r($group->copyUserTest($fromGroup, $toGroup)) && p() && e('1'); // 复制分组6用户到分组7 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/group/create.php b/test/model/group/create.php old mode 100644 new mode 100755 index eb41fd1ec3..bcedc330d1 --- a/test/model/group/create.php +++ b/test/model/group/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ $group = new groupTest(); r($group->createObject($t_name)) && p('name') && e('我是一个分组'); // 测试正常创建分组的名称 r($group->createObject($t_limited)) && p('role') && e('limited'); // 测试创建受限用户组分组 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/group/delete.php b/test/model/group/delete.php old mode 100644 new mode 100755 index 2e14d9c5fd..6252bc79ab --- a/test/model/group/delete.php +++ b/test/model/group/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,7 +12,7 @@ cid=1 pid=1 删除id为10的组 >> 1 -删除id为0的组 >> 1 +删除id为0的组 >> 1 */ @@ -20,4 +21,4 @@ $groupID = 10; $group = new groupTest(); r($group->deleteTest($groupID)) && p() && e('1'); // 删除id为10的组 r($group->deleteTest(0)) && p() && e('1'); // 删除id为0的组 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/group/getaccessprogramgroup.php b/test/model/group/getaccessprogramgroup.php old mode 100644 new mode 100755 index c1bcefab31..f13ecc5905 --- a/test/model/group/getaccessprogramgroup.php +++ b/test/model/group/getaccessprogramgroup.php @@ -17,4 +17,4 @@ pid=1 $group = new groupTest(); $AccessProgramGroup = $group->getAccessProgramGroupTest(); -r(count($AccessProgramGroup)) && p('') && e('14'); //测试获取group中用户个数 +r(count($AccessProgramGroup)) && p('') && e('14'); //测试获取group中用户个数 \ No newline at end of file diff --git a/test/model/group/getbyaccount.php b/test/model/group/getbyaccount.php old mode 100644 new mode 100755 index f154e98c5f..c9df6deff5 --- a/test/model/group/getbyaccount.php +++ b/test/model/group/getbyaccount.php @@ -11,10 +11,10 @@ cid=1 pid=1 测试获取test2 的信息 >> 3,测试,qa -测试获取dev2 的信息 >> 2,研发,dev -测试获取po48 的信息 >> 2,研发,dev -测试获取td2 的信息 >> 2,研发,dev -测试获取pd2 的信息 >> 3,测试,qa +测试获取dev2 的信息 >> 2,研发,dev +测试获取po48 的信息 >> 2,研发,dev +测试获取td2 的信息 >> 2,研发,dev +测试获取pd2 的信息 >> 3,测试,qa */ @@ -23,4 +23,4 @@ r($group->getByAccountTest('test2')) && p('3:id,name,role') && e('3,测试,qa'); r($group->getByAccountTest('dev2')) && p('2:id,name,role') && e('2,研发,dev'); //测试获取dev2 的信息 r($group->getByAccountTest('po48')) && p('2:id,name,role') && e('2,研发,dev'); //测试获取po48 的信息 r($group->getByAccountTest('td2')) && p('2:id,name,role') && e('2,研发,dev'); //测试获取td2 的信息 -r($group->getByAccountTest('pd2')) && p('3:id,name,role') && e('3,测试,qa'); //测试获取pd2 的信息 +r($group->getByAccountTest('pd2')) && p('3:id,name,role') && e('3,测试,qa'); //测试获取pd2 的信息 \ No newline at end of file diff --git a/test/model/group/getbyaccounts.php b/test/model/group/getbyaccounts.php old mode 100644 new mode 100755 index eccdafefe5..3e81d6a61e --- a/test/model/group/getbyaccounts.php +++ b/test/model/group/getbyaccounts.php @@ -40,4 +40,4 @@ r($groups1['td1']) && p('0:account') && e('td1'); //测试获取用户 r($groups2['pm1']) && p('0:account') && e('pm1'); //测试获取用户 pm1 的权限分组信息 r($groups2['po48']) && p('0:account') && e('po48'); //测试获取用户 po48 的权限分组信息 r($groups3['dev100']) && p('0:account') && e('dev100'); //测试获取用户 dev100 的权限分组信息 -r($groups3['test2']) && p('0:account') && e('test2'); //测试获取用户 test2 的权限分组信息 +r($groups3['test2']) && p('0:account') && e('test2'); //测试获取用户 test2 的权限分组信息 \ No newline at end of file diff --git a/test/model/group/getbyid.php b/test/model/group/getbyid.php old mode 100644 new mode 100755 index e0fc3d5ed1..2a5efd1698 --- a/test/model/group/getbyid.php +++ b/test/model/group/getbyid.php @@ -15,6 +15,7 @@ pid=1 测试获取ID为 3 的权限分组信息 >> 测试,qa,测试人员 测试获取ID为 4 的权限分组信息 >> 项目经理,pm,项目经理 测试获取ID为 5 的权限分组信息 >> 产品经理,po,产品经理 + */ $groupIDList = array(1, 2, 3, 4, 5); @@ -24,4 +25,4 @@ r($group->getByIDTest($groupIDList[0])) && p('name,role,desc') && e('管理员,a r($group->getByIDTest($groupIDList[1])) && p('name,role,desc') && e('研发,dev,研发人员'); //测试获取ID为 2 的权限分组信息 r($group->getByIDTest($groupIDList[2])) && p('name,role,desc') && e('测试,qa,测试人员'); //测试获取ID为 3 的权限分组信息 r($group->getByIDTest($groupIDList[3])) && p('name,role,desc') && e('项目经理,pm,项目经理'); //测试获取ID为 4 的权限分组信息 -r($group->getByIDTest($groupIDList[4])) && p('name,role,desc') && e('产品经理,po,产品经理'); //测试获取ID为 5 的权限分组信息 +r($group->getByIDTest($groupIDList[4])) && p('name,role,desc') && e('产品经理,po,产品经理'); //测试获取ID为 5 的权限分组信息 \ No newline at end of file diff --git a/test/model/group/getgroupaccounts.php b/test/model/group/getgroupaccounts.php old mode 100644 new mode 100755 index bbfb43d8c6..bc6716424e --- a/test/model/group/getgroupaccounts.php +++ b/test/model/group/getgroupaccounts.php @@ -10,9 +10,9 @@ title=测试 groupModel->getGroupAccounts(); cid=1 pid=1 -测试获取 group 的 account td79 >> td79 -测试获取 group 的 account pm1 >> pm1 -测试获取 group 的 account po75 >> po75 +测试获取 group 的 account td79 >> td79 +测试获取 group 的 account pm1 >> pm1 +测试获取 group 的 account po75 >> po75 测试获取 group 的 account top88 >> top88 */ @@ -23,4 +23,4 @@ $groupIdList = array(1,9,2,12); r($group->getGroupAccountsTest($groupIdList)) && p('td79') && e('td79'); //测试获取 group 的 account td79 r($group->getGroupAccountsTest($groupIdList)) && p('pm1') && e('pm1'); //测试获取 group 的 account pm1 r($group->getGroupAccountsTest($groupIdList)) && p('po75') && e('po75'); //测试获取 group 的 account po75 -r($group->getGroupAccountsTest($groupIdList)) && p('top88') && e('top88'); //测试获取 group 的 account top88 +r($group->getGroupAccountsTest($groupIdList)) && p('top88') && e('top88'); //测试获取 group 的 account top88 \ No newline at end of file diff --git a/test/model/group/getlist.php b/test/model/group/getlist.php old mode 100644 new mode 100755 index 4376f98299..2a0dfa6cce --- a/test/model/group/getlist.php +++ b/test/model/group/getlist.php @@ -20,4 +20,4 @@ $group = new groupTest(); r($group->getListTest()) && p('9:name,role,desc') && e('其他,others,其他'); // 测试获取 groupList 的信息 r($group->getListTest()) && p('10:name,role,desc') && e('guest,guest,For guest'); // 测试获取 groupList 的信息 -r($group->getListTest()) && p('12:name,role,desc') && e('项目管理员,projectAdmin,项目管理员可以维护项目的权限'); // 测试获取 groupList 的信息 +r($group->getListTest()) && p('12:name,role,desc') && e('项目管理员,projectAdmin,项目管理员可以维护项目的权限'); // 测试获取 groupList 的信息 \ No newline at end of file diff --git a/test/model/group/getmenumodules.php b/test/model/group/getmenumodules.php old mode 100644 new mode 100755 index a8ad974231..f238b33b98 --- a/test/model/group/getmenumodules.php +++ b/test/model/group/getmenumodules.php @@ -10,10 +10,10 @@ title=测试 groupModel->getMenuModules(); cid=1 pid=1 -// 测试查询 product 菜单的模块 >> product,branch,story -// 测试查询 my 菜单的模块 >> my,todo -// 测试查询 qa 菜单的模块 >> qa,bug,caselib -// 测试查询 project 菜单的模块 >> design,projectbuild,projectstory +测试查询 product 菜单的模块 >> product,branch,story +测试查询 my 菜单的模块 >> my,todo +测试查询 qa 菜单的模块 >> qa,bug,caselib +测试查询 project 菜单的模块 >> design,projectbuild,projectstory */ @@ -22,4 +22,4 @@ $group = new groupTest(); r($group->getMenuModulesTest('product')) && p('0,1,2') && e('product,branch,story'); // 测试查询 product 菜单的模块 r($group->getMenuModulesTest('my')) && p('0,1') && e('my,todo'); // 测试查询 my 菜单的模块 r($group->getMenuModulesTest('qa')) && p('0,1,6') && e('qa,bug,caselib'); // 测试查询 qa 菜单的模块 -r($group->getMenuModulesTest('project')) && p('0,3,4') && e('design,projectbuild,projectstory'); // 测试查询 project 菜单的模块 +r($group->getMenuModulesTest('project')) && p('0,3,4') && e('design,projectbuild,projectstory'); // 测试查询 project 菜单的模块 \ No newline at end of file diff --git a/test/model/group/getpairs.php b/test/model/group/getpairs.php old mode 100644 new mode 100755 index 6f48ee93d3..3e4c6e377d --- a/test/model/group/getpairs.php +++ b/test/model/group/getpairs.php @@ -26,4 +26,4 @@ r($group->getPairsTest(194)) && p('3') && e('测试'); // 测试查询产品 r($group->getPairsTest(284)) && p('4') && e('项目经理'); // 测试查询产品 284 的权限分组 4 的信息 r($group->getPairsTest(346)) && p('5') && e('产品经理'); // 测试查询产品 346 的权限分组 5 的信息 r($group->getPairsTest(493)) && p('6') && e('研发主管'); // 测试查询产品 493 的权限分组 6 的信息 -r($group->getPairsTest(519)) && p('7') && e('产品主管'); // 测试查询产品 519 的权限分组 7 的信息 +r($group->getPairsTest(519)) && p('7') && e('产品主管'); // 测试查询产品 519 的权限分组 7 的信息 \ No newline at end of file diff --git a/test/model/group/getprivs.php b/test/model/group/getprivs.php old mode 100644 new mode 100755 index 9771e58431..446ac8fb50 --- a/test/model/group/getprivs.php +++ b/test/model/group/getprivs.php @@ -10,11 +10,9 @@ title=测试 groupModel->getPrivs(); cid=1 pid=1 -测试查询不存在的分组是否具有 action 模块 editComment 的权限 >> 0 测试查询分组 10 是否具有 action 模块 editComment 的权限 >> editComment 测试查询分组 10 是否具有 user 模块 bug 的权限 >> bug 测试查询分组 10 是否具有 trainplan 模块 view 的权限 >> view -测试查询分组 10 是否具有 trainplan 模块 create 的权限 >> 测试查询分组 2 是否具有 trainplan 模块 create 的权限 >> create 测试查询分组 2 是否具有 todo 模块 activate 的权限 >> activate @@ -28,4 +26,4 @@ r($group->getPrivsTest(10)) && p('user:bug') && e('bug'); // r($group->getPrivsTest(10)) && p('trainplan:view') && e('view'); //测试查询分组 10 是否具有 trainplan 模块 view 的权限 r($group->getPrivsTest(10)) && p('trainplan:create') && e(''); //测试查询分组 10 是否具有 trainplan 模块 create 的权限 r($group->getPrivsTest(2)) && p('trainplan:create') && e('create'); //测试查询分组 2 是否具有 trainplan 模块 create 的权限 -r($group->getPrivsTest(2)) && p('todo:activate') && e('activate'); //测试查询分组 2 是否具有 todo 模块 activate 的权限 +r($group->getPrivsTest(2)) && p('todo:activate') && e('activate'); //测试查询分组 2 是否具有 todo 模块 activate 的权限 \ No newline at end of file diff --git a/test/model/group/getuserpairs.php b/test/model/group/getuserpairs.php old mode 100644 new mode 100755 index 31edec106d..a5e9ef948d --- a/test/model/group/getuserpairs.php +++ b/test/model/group/getuserpairs.php @@ -16,7 +16,6 @@ pid=1 测试查询权限分组 6 的用户id和name >> 产品主管68 测试查询权限分组 6 的用户id和name >> 产品主管69 测试查询权限分组 5 的用户id和name >> 产品主管59 -测试查询权限分组 5 的用户id和name >> */ $groupList = array(3,6,5); @@ -29,4 +28,4 @@ r($group->getUserPairsTest($groupList[0])) && p('dev1') && e('开发1'); / r($group->getUserPairsTest($groupList[1])) && p('td68') && e('产品主管68'); // 测试查询权限分组 6 的用户id和name r($group->getUserPairsTest($groupList[1])) && p('td69') && e('产品主管69'); // 测试查询权限分组 6 的用户id和name r($group->getUserPairsTest($groupList[2])) && p('td59') && e('产品主管59'); // 测试查询权限分组 5 的用户id和name -r($group->getUserPairsTest($groupList[2])) && p('td80') && e(''); // 测试查询权限分组 5 的用户id和name +r($group->getUserPairsTest($groupList[2])) && p('td80') && e(''); // 测试查询权限分组 5 的用户id和name \ No newline at end of file diff --git a/test/model/group/getuserprograms.php b/test/model/group/getuserprograms.php old mode 100644 new mode 100755 index f04998223a..04617b8092 --- a/test/model/group/getuserprograms.php +++ b/test/model/group/getuserprograms.php @@ -10,11 +10,7 @@ title=测试 groupModel->getUserPrograms(); cid=1 pid=1 -检查权限分组 1 的用户项目信息 >> 74 -检查权限分组 2 的用户项目信息 >> 29 -检查权限分组 3 的用户项目信息 >> 13 -检查权限分组 4 的用户项目信息 >> 43 -检查权限分组 5 的用户项目信息 >> 57 + */ @@ -28,4 +24,4 @@ r($group->getUserProgramsTest($groupList[0])) && p($userIDList[0]) && e(74); // r($group->getUserProgramsTest($groupList[1])) && p($userIDList[1]) && e(29); //检查权限分组 2 的用户项目信息 r($group->getUserProgramsTest($groupList[2])) && p($userIDList[2]) && e(13); //检查权限分组 3 的用户项目信息 r($group->getUserProgramsTest($groupList[3])) && p($userIDList[3]) && e(43); //检查权限分组 4 的用户项目信息 -r($group->getUserProgramsTest($groupList[4])) && p($userIDList[4]) && e(57); //检查权限分组 5 的用户项目信息 +r($group->getUserProgramsTest($groupList[4])) && p($userIDList[4]) && e(57); //检查权限分组 5 的用户项目信息 \ No newline at end of file diff --git a/test/model/group/update.php b/test/model/group/update.php old mode 100644 new mode 100755 index d9fee1a51a..17a674fdb7 --- a/test/model/group/update.php +++ b/test/model/group/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,9 @@ title=测试 groupModel->update(); cid=1 pid=1 +测试更新分组id为2的分组 >> 我是一个分组 +测试更新分组2为受限用户分组 >> 这是一个分组 + */ $t_name = array('name' => '我是一个分组', 'desc' => ''); $t_desc = array('name' => '我是一个分组', 'desc' => '这是一个分组'); @@ -20,4 +24,4 @@ a($group->updateTest(2, $t_name)); r($group->updateTest(2, $t_name)) && p('name') && e('我是一个分组'); //测试更新分组id为2的分组 r($group->updateTest(2, $t_desc)) && p('desc') && e('这是一个分组'); //测试更新分组2为受限用户分组 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/group/updateprivbygroup.php b/test/model/group/updateprivbygroup.php old mode 100644 new mode 100755 index b0b646cb87..655915ad9d --- a/test/model/group/updateprivbygroup.php +++ b/test/model/group/updateprivbygroup.php @@ -10,6 +10,8 @@ title=测试 groupModel->updatePrivByGroup(); cid=1 pid=1 + + */ $group = new groupTest(); diff --git a/test/model/group/updateprivbymodule.php b/test/model/group/updateprivbymodule.php old mode 100644 new mode 100755 index 2512b90d6e..995aad4fe9 --- a/test/model/group/updateprivbymodule.php +++ b/test/model/group/updateprivbymodule.php @@ -10,6 +10,8 @@ title=测试 groupModel->updatePrivByModule(); cid=1 pid=1 + + */ $group = new groupTest(); diff --git a/test/model/group/updateprojectadmin.php b/test/model/group/updateprojectadmin.php old mode 100644 new mode 100755 index 79f8fe75e6..447b503885 --- a/test/model/group/updateprojectadmin.php +++ b/test/model/group/updateprojectadmin.php @@ -10,6 +10,8 @@ title=测试 groupModel->updateProjectAdmin(); cid=1 pid=1 + + */ $group = new groupTest(); diff --git a/test/model/group/updateuser.php b/test/model/group/updateuser.php old mode 100644 new mode 100755 index 2c65255a1f..cb3b5d6a14 --- a/test/model/group/updateuser.php +++ b/test/model/group/updateuser.php @@ -10,6 +10,8 @@ title=测试 groupModel->updateUser(); cid=1 pid=1 + + */ $group = new groupTest(); diff --git a/test/model/group/updateview.php b/test/model/group/updateview.php index 7e53c6d698..e2dbbb412e 100755 --- a/test/model/group/updateview.php +++ b/test/model/group/updateview.php @@ -9,6 +9,10 @@ title=测试 groupModel->updateView(); cid=1 pid=1 +针对ID为1的权限分组,设置全选权限,查看返回的数据元素数量 >> 2 +针对ID为1的权限分组,设置任务创建权限,查看返回的数据元素数量 >> 3 +针对ID为1的权限分组,设置任务创建权限,查看是否有创建方法 >> create + */ global $tester; @@ -26,4 +30,4 @@ r(count($group1->acl)) && p() && e('2'); // 针对ID为1的权 r(count($group2->acl)) && p() && e('3'); // 针对ID为1的权限分组,设置任务创建权限,查看返回的数据元素数量 r($group2->acl) && p('task:create') && e('create'); // 针对ID为1的权限分组,设置任务创建权限,查看是否有创建方法 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/holiday/create.php b/test/model/holiday/create.php index 39ad938808..15a3fc5eb5 100755 --- a/test/model/holiday/create.php +++ b/test/model/holiday/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,13 @@ title=测试 holidayModel->create(); cid=1 pid=1 +测试创建holiday >> 101,测试创建holiday,holiday +测试创建working >> 102,测试创建working,working +测试不传入必填项开始日期 >> 『开始日期』不能为空。 +测试不传入必填项结束日期 >> 『结束日期』不能为空。 +测试不传入必填项名称 >> 『名称』不能为空。 +测试传入小于开始日期的结束日期 >> 『结束日期』应当不小于『2022-01-10』。 + */ $holiday = new holidayTest(); @@ -28,4 +36,4 @@ r($holiday->createTest($createNoEnd)) && p('end:0') && e('『结束 r($holiday->createTest($createNoName)) && p('name:0') && e('『名称』不能为空。'); //测试不传入必填项名称 r($holiday->createTest($createErrorDate)) && p('end:0') && e('『结束日期』应当不小于『2022-01-10』。'); //测试传入小于开始日期的结束日期 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/holiday/getactualworkingdays.php b/test/model/holiday/getactualworkingdays.php index 755c053a9a..625b59e83e 100755 --- a/test/model/holiday/getactualworkingdays.php +++ b/test/model/holiday/getactualworkingdays.php @@ -10,6 +10,14 @@ title=测试 holidayModel->getActualWorkingDays(); cid=1 pid=1 +查询2022-04-01到2022-04-10的实际工作日 >> 8 +查询2022-04-06到2022-04-12的实际工作日 >> 7 +查询2022-05-10到2022-05-10的实际工作日 >> 9 +查询2022-05-10到2022-05-10的实际工作日 >> 1 +查询2022-05-13到2022-05-13的实际工作日 >> 1 +查询2022-05-14到2022-05-14的实际工作日 >> 0 +测试传入0000-00-00的情况 >> 0 + */ $holiday = new holidayTest(); @@ -20,4 +28,4 @@ r($holiday->getActualWorkingDaysTest('2022-05-10', '2022-05-20')) && p() && e('9 r($holiday->getActualWorkingDaysTest('2022-04-06', '2022-04-06')) && p() && e('1'); //查询2022-05-10到2022-05-10的实际工作日 r($holiday->getActualWorkingDaysTest('2022-05-13', '2022-05-13')) && p() && e('1'); //查询2022-05-13到2022-05-13的实际工作日 r($holiday->getActualWorkingDaysTest('2022-05-14', '2022-05-14')) && p() && e('0'); //查询2022-05-14到2022-05-14的实际工作日 -r($holiday->getActualWorkingDaysTest('0000-00-00', '0000-00-00')) && p() && e('0'); //测试传入0000-00-00的情况 +r($holiday->getActualWorkingDaysTest('0000-00-00', '0000-00-00')) && p() && e('0'); //测试传入0000-00-00的情况 \ No newline at end of file diff --git a/test/model/holiday/getbyid.php b/test/model/holiday/getbyid.php index 3ede973c12..01a00c13c5 100755 --- a/test/model/holiday/getbyid.php +++ b/test/model/holiday/getbyid.php @@ -10,6 +10,11 @@ title=测试 holidayModel->getById(); cid=1 pid=1 +查询id为1的holiday >> 这是一个节假日1,holiday,这个是节假日的描述1 +查询id为5的holiday >> 这是一个节假日5,holiday,这个是节假日的描述5 +查询id为10的holiday >> 这是一个节假日10,working,这个是节假日的描述10 +查询不存在的holiday >> Object not found + */ $holidayIDList = array('1', '5', '10', '1001'); @@ -18,4 +23,4 @@ $holiday = new holidayTest(); r($holiday->getByIdTest($holidayIDList[0])) && p('name,type,desc') && e('这是一个节假日1,holiday,这个是节假日的描述1'); //查询id为1的holiday r($holiday->getByIdTest($holidayIDList[1])) && p('name,type,desc') && e('这是一个节假日5,holiday,这个是节假日的描述5'); //查询id为5的holiday r($holiday->getByIdTest($holidayIDList[2])) && p('name,type,desc') && e('这是一个节假日10,working,这个是节假日的描述10'); //查询id为10的holiday -r($holiday->getByIdTest($holidayIDList[3])) && p() && e('Object not found'); //查询不存在的holiday +r($holiday->getByIdTest($holidayIDList[3])) && p() && e('Object not found'); //查询不存在的holiday \ No newline at end of file diff --git a/test/model/holiday/getdaysbetween.php b/test/model/holiday/getdaysbetween.php index ceda79bf95..3919b3536f 100755 --- a/test/model/holiday/getdaysbetween.php +++ b/test/model/holiday/getdaysbetween.php @@ -10,6 +10,12 @@ title=测试 holidayModel->getDaysBetween(); cid=1 pid=1 +返回2022-04-01到2022-04-21之间的天数 >> 21 +返回2022-05-23到2022-05-30之间的天数 >> 8 +测试传入一间隔一整年的两天 >> 366 +返回2022-05-07到2022-05-08之间的天数 >> 2 +测试传入同一天的情况 >> 1 + */ $holiday = new holidayTest(); @@ -18,4 +24,4 @@ r($holiday->getDaysBetweenTest('2022-04-01', '2022-04-21')) && p() && e('21'); r($holiday->getDaysBetweenTest('2022-05-23', '2022-05-30')) && p() && e('8'); //返回2022-05-23到2022-05-30之间的天数 r($holiday->getDaysBetweenTest('2021-01-01', '2022-01-01')) && p() && e('366'); //测试传入一间隔一整年的两天 r($holiday->getDaysBetweenTest('2022-05-07', '2022-05-08')) && p() && e('2'); //返回2022-05-07到2022-05-08之间的天数 -r($holiday->getDaysBetweenTest('2022-05-07', '2022-05-07')) && p() && e('1'); //测试传入同一天的情况 +r($holiday->getDaysBetweenTest('2022-05-07', '2022-05-07')) && p() && e('1'); //测试传入同一天的情况 \ No newline at end of file diff --git a/test/model/holiday/getyearpairs.php b/test/model/holiday/getyearpairs.php index b0cbc20495..206134b2e0 100755 --- a/test/model/holiday/getyearpairs.php +++ b/test/model/holiday/getyearpairs.php @@ -10,8 +10,10 @@ title=测试 holidayModel->getYearPairs(); cid=1 pid=1 +测试getYearPairsTest方法 >> 1 + */ $holiday = new holidayTest(); -r($holiday->getYearPairsTest()) && p() && e('1'); //测试getYearPairsTest方法 +r($holiday->getYearPairsTest()) && p() && e('1'); //测试getYearPairsTest方法 \ No newline at end of file diff --git a/test/model/holiday/isholiday.php b/test/model/holiday/isholiday.php index 43245ca9eb..4af572ec78 100755 --- a/test/model/holiday/isholiday.php +++ b/test/model/holiday/isholiday.php @@ -10,6 +10,11 @@ title=测试 holidayModel->isHoliday(); cid=1 pid=1 +测试节假日2022年4月10日 >> It is a holiday +测试节假日2022年4月16日 >> It is a holiday +测试补班2022年5月7日 >> It is not a holiday +测试补班2022年5月13日 >> It is not a holiday + */ $holidays = array('2022-04-10', '2022-04-16'); $workingDays = array('2022-05-07', '2022-05-13'); @@ -19,4 +24,4 @@ $holiday = new holidayTest(); r($holiday->isHolidayTest($holidays[0])) && p() && e('It is a holiday'); // 测试节假日2022年4月10日 r($holiday->isHolidayTest($holidays[1])) && p() && e('It is a holiday'); // 测试节假日2022年4月16日 r($holiday->isHolidayTest($workingDays[0])) && p() && e('It is not a holiday'); // 测试补班2022年5月7日 -r($holiday->isHolidayTest($workingDays[1])) && p() && e('It is not a holiday'); // 测试补班2022年5月13日 +r($holiday->isHolidayTest($workingDays[1])) && p() && e('It is not a holiday'); // 测试补班2022年5月13日 \ No newline at end of file diff --git a/test/model/holiday/update.php b/test/model/holiday/update.php index 6279b05d14..cb43836a5f 100755 --- a/test/model/holiday/update.php +++ b/test/model/holiday/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,14 @@ title=测试 holidayModel->create(); cid=1 pid=1 +测试修改类型 >> true +测试修改名称 >> true +测试修改描述 >> true +测试将必填项名称置空 >> 『名称』不能为空。 +测试将必填项开始日期置空 >> 『开始日期』应当为合法的日期。 +测试将必填项结束日期置空 >> 『结束日期』应当为合法的日期。 +测试输入大于开始日期的结束日期 >> 『结束日期』应当不小于 + */ $holidayIDList = array('1', '2'); @@ -32,4 +41,4 @@ r($holiday->updateTest($holidayIDList[0], $noBegin)) && p('begin:0') && e(' r($holiday->updateTest($holidayIDList[0], $noEnd)) && p('end:0') && e('『结束日期』应当为合法的日期。'); //测试将必填项结束日期置空 r($holiday->updateTest($holidayIDList[0], $endltBegin)) && p('end:0') && e('『结束日期』应当不小于'); //测试输入大于开始日期的结束日期 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/holiday/updateprogramplanduration.php b/test/model/holiday/updateprogramplanduration.php index bbc2d1eba7..3d2431f005 100755 --- a/test/model/holiday/updateprogramplanduration.php +++ b/test/model/holiday/updateprogramplanduration.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,5 +38,4 @@ r($holiday->updateProgramPlanDurationTest(1, $holidayIDList[1])) && p() && e(' r($holiday->updateProgramPlanDurationTest(11, $holidayIDList[0])) && p() && e('59'); //测试插入id为1的节假日时迭代11项目的planDuration r($holiday->updateProgramPlanDurationTest(11, $holidayIDList[1])) && p() && e('59'); //测试插入id为3的节假日时迭代11项目的planDuration -system("./ztest init"); -system("../../ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/holiday/updateprojectrealduration.php b/test/model/holiday/updateprojectrealduration.php index e3da96a16e..a41b6be3b6 100755 --- a/test/model/holiday/updateprojectrealduration.php +++ b/test/model/holiday/updateprojectrealduration.php @@ -2,7 +2,9 @@ switchDB(); include dirname(dirname(dirname(__FILE__))) . '/class/project.class.php'; +$db->switchDB(); su('admin'); /** @@ -48,4 +50,4 @@ r($holiday->updateProjectRealDurationTest($newProjectID, $holidayIDList[1])) && r($holiday->updateProjectRealDurationTest($newProjectID, $holidayIDList[2])) && p() && e('29'); //测试新插入holiday99时项目的realDuration字段 r($holiday->updateProjectRealDurationTest($newProjectID, $holidayIDList[3])) && p() && e('29'); //测试新插入holiday100时项目的realDuration字段 -system("../../ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/create.php b/test/model/jenkins/create.php old mode 100644 new mode 100755 index 627d27b13c..cebc2d7076 --- a/test/model/jenkins/create.php +++ b/test/model/jenkins/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试jenkinsModel->create(); cid=1 pid=1 -Jenkins名称为空 >> name -服务器地址为空 >> url -正确Jenkins数据 >> Jenkins,http://10.0.1.161:58080,1196c85ba525a268570df9da627e3a7b2d +Jenkins名称为空 >> name +服务器地址为空 >> url +正确Jenkins数据 >> Jenkins,http://10.0.1.161:58080,1196c85ba525a268570df9da627e3a7b2d */ @@ -34,4 +35,4 @@ r($jenkins->create()) && p() && e('url'); // 服务器地址为空 $_POST['url'] = 'http://10.0.1.161:58080'; r($jenkins->create()) && p('name,url,token') && e('Jenkins,http://10.0.1.161:58080,1196c85ba525a268570df9da627e3a7b2d'); // 正确Jenkins数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/getbyid.php b/test/model/jenkins/getbyid.php index f04d0bcdaf..9974cc04c7 100755 --- a/test/model/jenkins/getbyid.php +++ b/test/model/jenkins/getbyid.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,7 @@ title=测试jenkinsModel->gitById(); cid=1 pid=1 -使用存在的ID >> 3 -使用空的ID >> 0 -使用不存在的ID >> 0 +使用存在的ID >> 3 */ @@ -27,4 +26,4 @@ r($jenkins->getById($jenkinsID)) && p() && e(0); // 使用空的ID $jenkinsID = 111; r($jenkins->getById($jenkinsID)) && p() && e(0); // 使用不存在的ID -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/getlist.php b/test/model/jenkins/getlist.php index e799dd54ae..b9b62ec3d9 100755 --- a/test/model/jenkins/getlist.php +++ b/test/model/jenkins/getlist.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,7 @@ title=测试jenkinsModel->gitList(); cid=1 pid=1 -获取Jenkins列表 >> 3 +获取Jenkins列表 >> 3 */ @@ -19,4 +20,4 @@ $jenkins = new jenkinsTest(); $orderBy = 'id_desc'; r($jenkins->getList($orderBy)) && p('id') && e('3'); // 获取Jenkins列表 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/getpairs.php b/test/model/jenkins/getpairs.php index f6b86224d7..57b2efe1d3 100755 --- a/test/model/jenkins/getpairs.php +++ b/test/model/jenkins/getpairs.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,7 @@ title=测试jenkinsModel->gitPairs(); cid=1 pid=1 -获取Jenkins >> 3 +获取Jenkins >> 3 */ @@ -18,4 +19,4 @@ $jenkins = new jenkinsTest(); r($jenkins->getPairs()) && p() && e('3'); // 获取Jenkins -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/gettasks.php b/test/model/jenkins/gettasks.php index d2cb8aef85..adba88611a 100755 --- a/test/model/jenkins/gettasks.php +++ b/test/model/jenkins/gettasks.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,8 +11,8 @@ title=测试jenkinsModel->gitTasks(); cid=1 pid=1 -使用存在的Jenkins >> zentao-test -使用空的Jenkins >> 0 +使用存在的Jenkins >> zentao-test +使用空的Jenkins >> 0 使用不存在的Jenkins >> 0 */ @@ -27,4 +28,4 @@ r($jenkins->getTasks($id)) && p() && e('0'); // 使用空的Jenkins $id = 111; r($jenkins->getTasks($id)) && p() && e('0'); // 使用不存在的Jenkins -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/jenkins/update.php b/test/model/jenkins/update.php old mode 100644 new mode 100755 index e3b39dea82..f8d0445b29 --- a/test/model/jenkins/update.php +++ b/test/model/jenkins/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试jenkinsModel->update(); cid=1 pid=1 -Jenkins名称为空 >> name -服务器地址为空 >> url -正确Jenkins数据 >> Changed Jenkins +Jenkins名称为空 >> name +服务器地址为空 >> url +正确Jenkins数据 >> Changed Jenkins */ @@ -36,4 +37,4 @@ r($jenkins->update($jenkinsID)) && p() && e('url'); // 服务器地址为空 $_POST['url'] = 'http://10.0.1.161:58080'; r($jenkins->update($jenkinsID)) && p('name') && e('Changed Jenkins'); // 正确Jenkins数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/create.php b/test/model/job/create.php index 9258f6d373..2d77fe7d70 100755 --- a/test/model/job/create.php +++ b/test/model/job/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($job->createObject($job_triggerType_blank)) && p('triggerType:0') && e('『触 r($job->createObject($job_name)) && p('name') && e('这是一个job007'); // 测试创建job name为《这是一个job007》的情况 r($job->createObject($job_engine)) && p('engine') && e('gitlab'); // 测试创建job engine为gitlab的情况 r($job->createObject($job_triggerType)) && p('triggerType') && e('tag'); // 测试创建job triggerType为tag的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/exec.php b/test/model/job/exec.php index fff8ad9842..1c1b495287 100755 --- a/test/model/job/exec.php +++ b/test/model/job/exec.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -17,4 +18,4 @@ pid=1 $jobID = 1; $job = new jobTest(); r($job->execTest($jobID)) && p('id')&& e('1'); // 测试执行job id为1的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getbyid.php b/test/model/job/getbyid.php index 5a682810a1..66a2dd2eea 100755 --- a/test/model/job/getbyid.php +++ b/test/model/job/getbyid.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ r($job->getByIdTest($jobIDList[0])) && p('engine') && e('jenkins'); // 查询id r($job->getByIdTest($jobIDList[0])) && p('frame') && e('sonarqube'); // 查询id为1的job的frame r($job->getByIdTest($jobIDList[1])) && p('engine') && e(NULL); // 查询id为1000001的job的name r($job->getByIdTest($jobIDList[1])) && p('frame') && e(NULL); // 查询id为1000001的job的account -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getjobbysonarqubeproject.php b/test/model/job/getjobbysonarqubeproject.php index 2f3facafaa..23aaa9cf32 100755 --- a/test/model/job/getjobbysonarqubeproject.php +++ b/test/model/job/getjobbysonarqubeproject.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $projectKeys = array('zentaopms'); $job = new jobTest(); r($job->getJobBySonarqubeProjectTest($sonarqubeID, $projectKeys)) && p('zentaopms') && e('1'); // 根据sonarqube project查询job -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getlasttagbyrepo.php b/test/model/job/getlasttagbyrepo.php index 7aed4ed56a..3846b8c1b6 100755 --- a/test/model/job/getlasttagbyrepo.php +++ b/test/model/job/getlasttagbyrepo.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -17,4 +18,4 @@ pid=1 $jobID = 1; $job = new jobTest(); r($job->getLastTagByRepoTest($jobID)) && p() && e('tag_test1'); // 查询id为1的job的last tag -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getlist.php b/test/model/job/getlist.php index 221953729a..bd9cb705ba 100755 --- a/test/model/job/getlist.php +++ b/test/model/job/getlist.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $list = $job->getListTest(); r(count($list)) && p() && e('2'); //测试获取列表的个数,目前只有两个 r($list) && p('1:name') && e('这是一个Job1'); //测试获取列表某个job的名称信息 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getlistbyrepoid.php b/test/model/job/getlistbyrepoid.php index 8dbb0edd89..123c9ed3e2 100755 --- a/test/model/job/getlistbyrepoid.php +++ b/test/model/job/getlistbyrepoid.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $repoIdList = array('1', '100001'); r($job->getListByRepoIDTest($repoIdList[0])) && p('1:name') && e('这是一个Job1'); // 获取repo为1的name r($job->getListByRepoIDTest($repoIdList[1])) && p('100001:name') && e('0'); // 获取repo为100001的name -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getlistbytriggertype.php b/test/model/job/getlistbytriggertype.php index f4122503e2..586895ba14 100755 --- a/test/model/job/getlistbytriggertype.php +++ b/test/model/job/getlistbytriggertype.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -21,4 +22,4 @@ $repoIdList = array('1', '2', '100001'); r($job->getListByTriggerTypeTest($triggerType[0], $repoIdList)) && p('1:name') && e('这是一个Job1'); // 获取trigger type为tag的repo为1的name r($job->getListByTriggerTypeTest($triggerType[1], $repoIdList)) && p('2:name') && e('这是一个Job2'); // 获取trigger type为commit的repo为2的name -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getparis.php b/test/model/job/getparis.php index 70b3a3436b..6e41e69951 100755 --- a/test/model/job/getparis.php +++ b/test/model/job/getparis.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $repoID = '1'; $engine = 'jenkins'; r($job->getPairsTest($repoID, $engine)) && p('1') && e('这是一个Job1'); // 获取repo为1且engine为jenkins的name -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/getsonarqubebyrepo.php b/test/model/job/getsonarqubebyrepo.php index d04a50a16a..ae7a38c583 100755 --- a/test/model/job/getsonarqubebyrepo.php +++ b/test/model/job/getsonarqubebyrepo.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -18,4 +19,4 @@ $repoIDList = array('1', '2'); $job = new jobTest(); r($job->getSonarqubeByRepoTest($repoIDList)) && p('1:name') && e('这是一个Job1'); // 根据repo查询sonarqube -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/gettriggerconfig.php b/test/model/job/gettriggerconfig.php index 4f4c2dbf3f..32b71f35c7 100755 --- a/test/model/job/gettriggerconfig.php +++ b/test/model/job/gettriggerconfig.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $jobIdList = array('1', '100001'); r($job->getTriggerConfigTest($jobIdList[0])) && p() && e('目录改动(/module/caselib)'); // 获取job为1的trigger config r($job->getTriggerConfigTest($jobIdList[1])) && p() && e('0'); // 获取job为100001的trigger config -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/gettriggergroup.php b/test/model/job/gettriggergroup.php index 4693b34ac9..b03497e8b2 100755 --- a/test/model/job/gettriggergroup.php +++ b/test/model/job/gettriggergroup.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -21,4 +22,4 @@ $repoIdList = array('1', '2'); r($job->getTriggerGroupTest($triggerTypeList['0'], $repoIdList)) && p('1:name') && e('这是一个Job1'); // 获取trigger type为tag且repo id为1的name r($job->getTriggerGroupTest($triggerTypeList['1'], $repoIdList)) && p('2:name') && e('这是一个Job2'); // 获取trigger type为commit且repo id为2的name -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/job/update.php b/test/model/job/update.php index 69a6746e14..ef9ca1b7f9 100755 --- a/test/model/job/update.php +++ b/test/model/job/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ $job = new jobTest(); r($job->updateObject($jobID, $job_upName)) && p() && e('Job更新成功'); //测试更新job名称 r($job->updateObject($jobID, $job_upEngine)) && p() && e('SonarQube工具/框架仅在构建引擎为JenKins的情况下使用'); //测试更新job引擎异常 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/activatecard.php b/test/model/kanban/activatecard.php index 2e7c1c40c0..fadeff4e6d 100755 --- a/test/model/kanban/activatecard.php +++ b/test/model/kanban/activatecard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -38,4 +39,4 @@ r($kanban->activateCardTest($cardIDList[2], $progressList[1])) && p('id,name,sta r($kanban->activateCardTest($cardIDList[3], $progressList[0])) && p('id,name,status,progress') && e('4,卡片4,doing,0'); // 测试激活卡片4,进度0 r($kanban->activateCardTest($cardIDList[4], $progressList[1])) && p('id,name,status,progress') && e('5,卡片5,doing,50'); // 测试激活卡片5,进度0 r($kanban->activateCardTest($cardIDList[5], $progressList[0])) && p('id,name,status,progress') && e('0'); // 测试激活不存在的卡片,进度0 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/addkanbancell.php b/test/model/kanban/addkanbancell.php index 261f9a3f3d..b2e4966dee 100755 --- a/test/model/kanban/addkanbancell.php +++ b/test/model/kanban/addkanbancell.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -53,4 +54,4 @@ r($kanban->addKanbanCellTest($kanbanIDList[1], $laneIDList[3], $columnIDList[3], r($kanban->addKanbanCellTest($kanbanIDList[1], $laneIDList[3], $columnIDList[3], $typeList[3], $cardID)) && p('type,cards') && e('task,,3,0,'); // 更新类型为task的kanbancell 有cardID r($kanban->addKanbanCellTest($kanbanIDList[1], $laneIDList[3], $columnIDList[0], $typeList[3])) && p('type,cards') && e('task,'); // 插入类型为task的kanbancell r($kanban->addKanbanCellTest($kanbanIDList[1], $laneIDList[3], $columnIDList[0], $typeList[3], $cardID)) && p('type,cards') && e('task,,3,'); // 插入类型为task的kanbancell 有cardID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/archivecard.php b/test/model/kanban/archivecard.php index 0d0c8cab78..c3aedec855 100755 --- a/test/model/kanban/archivecard.php +++ b/test/model/kanban/archivecard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($kanban->archiveCardTest($cardIDList[1])) && p('0:field,old,new') && e('archiv r($kanban->archiveCardTest($cardIDList[2])) && p('0:field,old,new') && e('archived,0,1'); // 测试归档卡片3 r($kanban->archiveCardTest($cardIDList[3])) && p('0:field,old,new') && e('archived,0,1'); // 测试归档卡片4 r($kanban->archiveCardTest($cardIDList[4])) && p('0:field,old,new') && e('archived,0,1'); // 测试归档卡片5 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/archivecolumn.php b/test/model/kanban/archivecolumn.php index 3cd7059dfc..44d33ccebc 100755 --- a/test/model/kanban/archivecolumn.php +++ b/test/model/kanban/archivecolumn.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($kanban->archiveColumnTest($columnIDList[2])) && p('id,archived') && e('3,1'); r($kanban->archiveColumnTest($columnIDList[3])) && p('id,archived') && e('4,1'); // 测试归档列4 r($kanban->archiveColumnTest($columnIDList[4])) && p('id,archived') && e('5,1'); // 测试归档列5 r($kanban->archiveColumnTest($columnIDList[5])) && p() && e('0'); // 测试归档不存在的列 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/batchcreatecard.php b/test/model/kanban/batchcreatecard.php index b3a97b686b..1944b44aad 100755 --- a/test/model/kanban/batchcreatecard.php +++ b/test/model/kanban/batchcreatecard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($kanban->batchCreateCardTest(array('name' => $no_name))) && p('kanban,col r($kanban->batchCreateCardTest(array('estimate' => $estimate))) && p() && e('预计不能为负数!'); // 批量创建卡片 预计为负数 r($kanban->batchCreateCardTest(array(), true)) && p() && e('"截止日期"不能小于"预计开始"!'); // 批量创建看板 截止日期小于开始日期 r($kanban->batchCreateCardTest()) && p('kanban,column,lane,type,cards') && e('1,1,1,common,,1010,1009,1008,1007,1004,1003,1002,1001,1,2,801,'); // 批量创建看板 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/create.php b/test/model/kanban/create.php index 9d814a4a59..bc8b3f7811 100755 --- a/test/model/kanban/create.php +++ b/test/model/kanban/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -75,4 +76,4 @@ r($kanban->createTest($kanban3)) && p('name,space,type,owner,whitelist') && e(' r($kanban->createTest($kanban4)) && p('name:0') && e('『看板名称』不能为空。'); // 创建没有名字的公共空间 r($kanban->createTest($kanban5)) && p('space:0') && e('『所属空间』不能为空。'); // 创建没有空间公共空间 r($kanban->createTest($kanban6)) && p('name:0') && e('『看板名称』已经有『测试创建公共看板』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 创建重名公共空间 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createcard.php b/test/model/kanban/createcard.php index 1b299b5648..169d69516f 100755 --- a/test/model/kanban/createcard.php +++ b/test/model/kanban/createcard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -62,4 +63,4 @@ r($kanban->createCardTest($card2)) && p('name,pri,estimate,desc') && e('测试 r($kanban->createCardTest($card3)) && p('estimate') && e('预计不能为负数!'); // 测试创建预计小于0的卡片 r($kanban->createCardTest($card4)) && p('end') && e('"截止日期"不能小于"预计开始"!'); // 测试创建结束小于开始日期的卡片 r($kanban->createCardTest($card5)) && p('name:0') && e('『卡片名称』不能为空。'); // 测试创建没有名字的卡片 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createcolumn.php b/test/model/kanban/createcolumn.php index b372470b7e..20e556a2f6 100755 --- a/test/model/kanban/createcolumn.php +++ b/test/model/kanban/createcolumn.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -95,4 +96,4 @@ r($kanban->createColumnTest($column5)) && p('name:0') && r($kanban->createColumnTest($column6)) && p('limit') && e('在制品数量必须是正整数。'); // 创建没有填写在制品限制的看板列 r($kanban->createColumnTest($column7)) && p('limit') && e('在制品数量必须是正整数。'); // 创建在制品数量为0的看板列 r($kanban->createColumnTest($column8)) && p('limit:0') && e('父列的在制品数量不能小于子列在制品数量之和'); // 创建在制品数量超出限制的子看板列 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createdefaultcolumns.php b/test/model/kanban/createdefaultcolumns.php index c2d722efec..3114842375 100755 --- a/test/model/kanban/createdefaultcolumns.php +++ b/test/model/kanban/createdefaultcolumns.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($kanban->createDefaultColumnsTest($regionIDList[2], $groupIDList[2])) && p() & r($kanban->createDefaultColumnsTest($regionIDList[3], $groupIDList[3])) && p() && e('8'); // 创建region 4 group 4的默认泳道列 r($kanban->createDefaultColumnsTest($regionIDList[4], $groupIDList[4])) && p() && e('8'); // 创建region 5 group 5的默认泳道列 r($kanban->createDefaultColumnsTest($regionIDList[0], $groupIDList[0])) && p() && e('12'); // 重复创建region 1 group 1的默认泳道列 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createdefaultlane.php b/test/model/kanban/createdefaultlane.php index 4fd997b86c..1819d294a4 100755 --- a/test/model/kanban/createdefaultlane.php +++ b/test/model/kanban/createdefaultlane.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($kanban->createDefaultLaneTest($regionIDList[1], $groupIDList[1])) && p('name, r($kanban->createDefaultLaneTest($regionIDList[2], $groupIDList[2])) && p('name,group,region,type') && e('默认泳道,3,3,common'); // 创建region 3 group 3的默认泳道 r($kanban->createDefaultLaneTest($regionIDList[3], $groupIDList[3])) && p('name,group,region,type') && e('默认泳道,4,4,common'); // 创建region 4 group 4的默认泳道 r($kanban->createDefaultLaneTest($regionIDList[4], $groupIDList[4])) && p('name,group,region,type') && e('默认泳道,5,5,common'); // 创建region 5 group 5的默认泳道 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createdefaultregion.php b/test/model/kanban/createdefaultregion.php index 5d7f9cdd18..28ddbc77d3 100755 --- a/test/model/kanban/createdefaultregion.php +++ b/test/model/kanban/createdefaultregion.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -45,4 +46,4 @@ r($kanban->createDefaultRegionTest($kanban2)) && p('space,kanban,name') && e('10 r($kanban->createDefaultRegionTest($kanban3)) && p('space,kanban,name') && e('10003,10003,默认区域'); // 创建看板10003的默认区域 r($kanban->createDefaultRegionTest($kanban4)) && p('space,kanban,name') && e('10004,10004,默认区域'); // 创建看板10004的默认区域 r($kanban->createDefaultRegionTest($kanban5)) && p('name:0') && e('『区域名称』已经有『默认区域』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 重复创建看板1的默认区域 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createexecutioncolumns.php b/test/model/kanban/createexecutioncolumns.php index c475d049f2..3294479457 100755 --- a/test/model/kanban/createexecutioncolumns.php +++ b/test/model/kanban/createexecutioncolumns.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -49,4 +50,4 @@ r($kanban->createExecutionColumnsTest($laneIDList[3], $typeList[2], $executionID r($kanban->createExecutionColumnsTest($laneIDList[4], $typeList[0], $executionIDList[4])) && p() && e('11'); // 创建泳道 100005 执行105 需求的看板列 r($kanban->createExecutionColumnsTest($laneIDList[4], $typeList[1], $executionIDList[4])) && p() && e('7'); // 创建泳道 100005 执行105 任务的看板列 r($kanban->createExecutionColumnsTest($laneIDList[4], $typeList[2], $executionIDList[4])) && p() && e('9'); // 创建泳道 100005 执行105 bug 的看板列 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createexecutionlane.php b/test/model/kanban/createexecutionlane.php index aa9fe6feb3..099fbf1663 100755 --- a/test/model/kanban/createexecutionlane.php +++ b/test/model/kanban/createexecutionlane.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -45,4 +46,4 @@ r($kanban->createExecutionLaneTest($executionIDList[2], $typeIDList[3], $groupBy r($kanban->createExecutionLaneTest($executionIDList[2], $typeIDList[3], $groupByIDList[5])) && p() && e('10'); // 创建执行103 bug 按指派给分组的泳道 r($kanban->createExecutionLaneTest($executionIDList[3])) && p() && e('3'); // 创建执行104的泳道 r($kanban->createExecutionLaneTest($executionIDList[4])) && p() && e('3'); // 创建执行105的泳道 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/creategroup.php b/test/model/kanban/creategroup.php index 34bd0af144..ecf2acd03b 100755 --- a/test/model/kanban/creategroup.php +++ b/test/model/kanban/creategroup.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($kanban->createGroupTest($kanbanIDList[1], $regionIDList[1])) && p('kanaban,re r($kanban->createGroupTest($kanbanIDList[2], $regionIDList[2])) && p('kanaban,region,orde') && e(',3,'); // 测试创建看板3 区域3的看板组 r($kanban->createGroupTest($kanbanIDList[3], $regionIDList[3])) && p('kanaban,region,orde') && e(',4,'); // 测试创建看板4 区域4的看板组 r($kanban->createGroupTest($kanbanIDList[4], $regionIDList[4])) && p('kanaban,region,orde') && e(',5,'); // 测试创建看板5 区域5的看板组 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createlane.php b/test/model/kanban/createlane.php index 3ca0b6ff57..75eea56eab 100755 --- a/test/model/kanban/createlane.php +++ b/test/model/kanban/createlane.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -50,4 +51,4 @@ r($kanban->createLaneTest($lane2, $kanbanID, $regionID)) && p('name,region,group r($kanban->createLaneTest($lane3, $kanbanID, $regionID)) && p('name:0') && e('『泳道名称』不能为空。'); //测试创建不填写名称的泳道 r($kanban->createLaneTest($lane4, $kanbanID, $regionID)) && p('name,region,group') && e('默认泳道,1,1'); //测试创建复用泳道1信息的泳道 r($kanban->createLaneTest($lane5, $kanbanID, $regionID)) && p('name,region,group') && e('默认泳道,2,2'); //测试创建复用泳道2信息的泳道 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createrdcolumn.php b/test/model/kanban/createrdcolumn.php index a277078951..edd0e299ce 100755 --- a/test/model/kanban/createrdcolumn.php +++ b/test/model/kanban/createrdcolumn.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($kanban->createRDColumnTest($regionIDList[0], $groupIDList[2], $laneIDList[2], r($kanban->createRDColumnTest($regionIDList[1], $groupIDList[3], $laneIDList[3], $laneTypeList[0], $executionIDList[1])) && p() && e('22'); // 测试创建执行162 区域102 泳道组104 泳道104 story执行看板的泳道列 r($kanban->createRDColumnTest($regionIDList[1], $groupIDList[4], $laneIDList[4], $laneTypeList[1], $executionIDList[1])) && p() && e('18'); // 测试创建执行162 区域102 泳道组105 泳道105 bug执行看板的泳道列 r($kanban->createRDColumnTest($regionIDList[1], $groupIDList[5], $laneIDList[5], $laneTypeList[2], $executionIDList[1])) && p() && e('14'); // 测试创建执行162 区域102 泳道组106 泳道106 task执行看板的泳道列 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createrdkanban.php b/test/model/kanban/createrdkanban.php index 8b4861c08d..d6621b3c34 100755 --- a/test/model/kanban/createrdkanban.php +++ b/test/model/kanban/createrdkanban.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ r($kanban->createRDKanbanTest($execution2)) && p() && e('1,3,0'); // 测试创 r($kanban->createRDKanbanTest($execution3)) && p() && e('1,3,0'); // 测试创建执行10003的执行看板 r($kanban->createRDKanbanTest($execution4)) && p() && e('1,3,0'); // 测试创建执行10004的执行看板 r($kanban->createRDKanbanTest($execution5)) && p() && e('1,3,0'); // 测试创建执行10005的执行看板 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createrdlane.php b/test/model/kanban/createrdlane.php index 1ea9a7f65a..f4e9cd55d4 100755 --- a/test/model/kanban/createrdlane.php +++ b/test/model/kanban/createrdlane.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($kanban->createRDLaneTest($executionIDList[1], $regionIDList[1])) && p() && e( r($kanban->createRDLaneTest($executionIDList[2], $regionIDList[2])) && p() && e('6'); // 测试创建执行103的执行看板的泳道 r($kanban->createRDLaneTest($executionIDList[3], $regionIDList[3])) && p() && e('6'); // 测试创建执行104的执行看板的泳道 r($kanban->createRDLaneTest($executionIDList[4], $regionIDList[4])) && p() && e('6'); // 测试创建执行105的执行看板的泳道 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createrdregion.php b/test/model/kanban/createrdregion.php index 128bac350c..413fe67e47 100755 --- a/test/model/kanban/createrdregion.php +++ b/test/model/kanban/createrdregion.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ r($kanban->createRDRegionTest($execution2)) && p('name,kanban') && e('默认区 r($kanban->createRDRegionTest($execution3)) && p('name,kanban') && e('默认区域,100003'); // 测试创建执行10003的执行看板区域 r($kanban->createRDRegionTest($execution4)) && p('name,kanban') && e('默认区域,100004'); // 测试创建执行10004的执行看板区域 r($kanban->createRDRegionTest($execution5)) && p('name,kanban') && e('默认区域,100005'); // 测试创建执行10005的执行看板区域 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/createregion.php b/test/model/kanban/createregion.php index e9b6e36610..10b52a918f 100755 --- a/test/model/kanban/createregion.php +++ b/test/model/kanban/createregion.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -54,4 +55,4 @@ r($kanban->createRegionTest($kanban1, $region3)) && p('name,space r($kanban->createRegionTest($kanban1, $region4, $copyRegionID)) && p('name,space,kanban') && e('新增的区域4,1,0'); // 创建复制样式区域4 r($kanban->createRegionTest($kanban1, $region5)) && p('name:0') && e('『区域名称』不能为空。'); // 创建没有名称的区域 r($kanban->createRegionTest($kanban1, $region1)) && p('name:0') && e('『区域名称』已经有『新增的区域1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 创建重名自定义区域1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/getexecutionkanban.php b/test/model/kanban/getexecutionkanban.php index 4ee1b53470..099756b40b 100755 --- a/test/model/kanban/getexecutionkanban.php +++ b/test/model/kanban/getexecutionkanban.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -51,4 +52,4 @@ r($kanban->getExecutionKanbanTest($executionIDList[3], $browseTypeList[2], $grou r($kanban->getExecutionKanbanTest($executionIDList[4])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息 r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[5])) && p() && e('columns:9, lanes:5, cards:4'); // 测试获取execution103 bug module的执行看板信息 r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[6])) && p() && e('columns:9, lanes:4, cards:4'); // 测试获取execution103 bug severity的执行看板信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/getimportedcards.php b/test/model/kanban/getimportedcards.php index a655198b19..0e89246641 100755 --- a/test/model/kanban/getimportedcards.php +++ b/test/model/kanban/getimportedcards.php @@ -26,8 +26,10 @@ pid=1 查看看板23的普通卡片和productplan片 >> ,177,178,179,180,181,182,183,184 查看看板25的普通卡片和build卡片 >> ,193,194,195,196,197,198,199,200,993,994,995,996,997,998,999,1000 查看看板25的普通卡片和productplan片 >> ,193,194,195,196,197,198,199,200 + >> id 查看看板1已归档的普通卡片和productplan卡片 >> ,6,7,8,801,802,803,804,805,806,807,808 查看区域ID=1中看板1已归档的普通卡片和productplan卡片 >> ,6,7,8,801,802,803,804,805,806,807,808 +查看区域ID=1中看板1已归档的普通卡片和productplan卡片 >> id */ @@ -57,4 +59,4 @@ global $tester; $tester->dao->update(TABLE_KANBANCARD)->set('archived')->eq(1)->where('id')->gt('5')->exec(); r($kanban->getImportedCardsTest($kanbanIDList[0], $fromType[0], $archived)) && p() && e(',6,7,8,801,802,803,804,805,806,807,808'); // 查看看板1已归档的普通卡片和productplan卡片 r($kanban->getImportedCardsTest($kanbanIDList[0], $fromType[0], $archived, 1)) && p() && e(',6,7,8,801,802,803,804,805,806,807,808'); // 查看区域ID=1中看板1已归档的普通卡片和productplan卡片 -$tester->dao->update(TABLE_KANBANCARD)->set('archived')->eq(0)->where('id')->gt('5')->exec(); +$tester->dao->update(TABLE_KANBANCARD)->set('archived')->eq(0)->where('id')->gt('5')->exec(); \ No newline at end of file diff --git a/test/model/kanban/getkanban4group.php b/test/model/kanban/getkanban4group.php index b818a5b333..9c3650a893 100755 --- a/test/model/kanban/getkanban4group.php +++ b/test/model/kanban/getkanban4group.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -47,4 +48,4 @@ r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupBy r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[6])) && p() && e('lanes:4'); //获取执行103 类型bug 分组severity的看板信息 r($kanban->getKanban4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行104 类型story 分组pri的看板信息 r($kanban->getKanban4GroupTest($executionIDList[4], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行105 类型story 分组pri的看板信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/getlanes4group.php b/test/model/kanban/getlanes4group.php index 741a9c9f81..6ce7188380 100755 --- a/test/model/kanban/getlanes4group.php +++ b/test/model/kanban/getlanes4group.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -58,4 +59,4 @@ r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByL r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[2])) && p() && e(',所属模块: 无,模块13,模块37,模块40,模块43'); // 获取执行102 task module的泳道 r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[4])) && p() && e(',指派给: 无'); // 获取执行102 task assignedTo的泳道 r($kanban->getLanes4GroupTest($executionIDList[4], $browseTypeList[1], $groupByList[5])) && p() && e(',相关研发需求: 无,用户需求17'); // 获取执行102 task story的泳道 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/gettoandcclist.php b/test/model/kanban/gettoandcclist.php index f987bfa4c1..59437e12d0 100755 --- a/test/model/kanban/gettoandcclist.php +++ b/test/model/kanban/gettoandcclist.php @@ -16,4 +16,4 @@ pid=1 $kanban = new kanbanTest(); $card = $kanban->getCardByIDTest('1'); -r($kanban->getToAndCcListTest($card)) && p('0;1') && e('admin;admin'); // 获取id=1的卡片发信人员 +r($kanban->getToAndCcListTest($card)) && p('0;1') && e('admin;admin'); // 获取id=1的卡片发信人员 \ No newline at end of file diff --git a/test/model/kanban/import.php b/test/model/kanban/import.php index 15af15f97f..69880c55e0 100755 --- a/test/model/kanban/import.php +++ b/test/model/kanban/import.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -60,4 +61,4 @@ r($kanban->importTest($kanbanIDList[4], $import[0], $importObjectList1)) && p('o r($kanban->importTest($kanbanIDList[4], $import[0], $importObjectList2)) && p('object') && e('plans,cards'); // 开启看板5的导入功能 可选项plans cards r($kanban->importTest($kanbanIDList[4], $import[1], $importObjectList1)) && p('object') && e('0'); // 关闭看板5的导入功能 可选项全部 r($kanban->importTest($kanbanIDList[4], $import[1], $importObjectList2)) && p('object') && e('0'); // 关闭看板5的导入功能 可选项plans cards -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/importcard.php b/test/model/kanban/importcard.php index 06b171b8ab..0134405194 100755 --- a/test/model/kanban/importcard.php +++ b/test/model/kanban/importcard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($kanban->importCardTest($kanbanIDList[1], $regionIDList[1], $groupIDList[1], $ r($kanban->importCardTest($kanbanIDList[2], $regionIDList[2], $groupIDList[2], $columnIDList[2], $cards3, $targetLaneIDList[2])) && p('cards') && e(',82,83,84,17,18,817,');// 测试导入卡片72 73 74到column 9 r($kanban->importCardTest($kanbanIDList[3], $regionIDList[3], $groupIDList[3], $columnIDList[3], $cards4, $targetLaneIDList[3])) && p('cards') && e(',85,86,87,25,26,825,');// 测试导入卡片75 77 77到column 13 r($kanban->importCardTest($kanbanIDList[4], $regionIDList[4], $groupIDList[4], $columnIDList[4], $cards5, $targetLaneIDList[4])) && p('cards') && e(',95,96,97,33,34,833,');// 测试导入卡片72 73 74到column 17 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/importobject.php b/test/model/kanban/importobject.php index e04504e3c7..cc1c34102c 100755 --- a/test/model/kanban/importobject.php +++ b/test/model/kanban/importobject.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ r($kanban->importObjectTest($kanbanIDList[0], $regionIDList[0], $groupIDList[0], r($kanban->importObjectTest($kanbanIDList[1], $regionIDList[1], $groupIDList[1], $columnIDList[1], $objectType[1], $param2)) && p('cards') && e(',1004,1005,1006,9,10,809,'); // 测试导入卡片75 77 77到column 5 r($kanban->importObjectTest($kanbanIDList[2], $regionIDList[2], $groupIDList[2], $columnIDList[2], $objectType[2], $param3)) && p('cards') && e(',1007,1008,1009,17,18,817,');// 测试导入卡片72 73 74到column 9 r($kanban->importObjectTest($kanbanIDList[3], $regionIDList[3], $groupIDList[3], $columnIDList[3], $objectType[3], $param4)) && p('cards') && e(',1010,1011,1012,25,26,825,');// 测试导入卡片75 77 77到column 13 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/movecard.php b/test/model/kanban/movecard.php index 018dfe3be2..309a8880ed 100755 --- a/test/model/kanban/movecard.php +++ b/test/model/kanban/movecard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($kanban->moveCardTest($cardIDList[2], $columnIDList[1], $columnIDList[2], $lan r($kanban->moveCardTest($cardIDList[3], $columnIDList[1], $columnIDList[2], $laneID, $laneID, $kanbanID)) && p('cards') && e(',5,6,805,3,4,'); // 将卡片4从泳道1 列2转移到泳道1 列3 r($kanban->moveCardTest($cardIDList[4], $columnIDList[2], $columnIDList[0], $laneID, $laneID, $kanbanID)) && p('cards') && e(',801,5,'); // 将卡片5从泳道1 列3转移到泳道1 列1 r($kanban->moveCardTest($cardIDList[5], $columnIDList[2], $columnIDList[0], $laneID, $laneID, $kanbanID)) && p('cards') && e(',801,5,6,'); // 将卡片6从泳道1 列3转移到泳道1 列1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/processcards.php b/test/model/kanban/processcards.php index e7fe706b81..6aea182829 100755 --- a/test/model/kanban/processcards.php +++ b/test/model/kanban/processcards.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($kanban->processCardsTest($columnIDList[0])) && p() && e('204:,407,408,807,405 r($kanban->processCardsTest($columnIDList[1])) && p() && e('203:,405,406,805,407,408,807,405,406,805,'); // 计算删除列204后的卡片 r($kanban->processCardsTest($columnIDList[2])) && p() && e('208:,415,416,815,413,414,813,'); // 计算删除列207后的卡片 r($kanban->processCardsTest($columnIDList[3])) && p() && e('207:,413,414,813,415,416,815,413,414,813,'); // 计算删除列208后的卡片 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/refreshcards.php b/test/model/kanban/refreshcards.php index fd6bc5c7d4..44974fd365 100755 --- a/test/model/kanban/refreshcards.php +++ b/test/model/kanban/refreshcards.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($kanban->refreshCardsTest($laneIDList[1])) && p() && e('412; 413; 414; 415; 41 r($kanban->refreshCardsTest($laneIDList[2])) && p() && e('421:781,61,; 422; 423:782,; 424:783,; 425; 426; 427:'); // 刷新泳道103的卡片 r($kanban->refreshCardsTest($laneIDList[3])) && p() && e('428; 429; 430; 431; 432; 433; 434:246,; 435; 436:248,; 437; 438:'); // 刷新泳道104的卡片 r($kanban->refreshCardsTest($laneIDList[4])) && p() && e('439; 440; 441; 442; 443; 444; 445; 446; 447:184,185,186,'); // 刷新泳道105的卡片 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/removekanbancell.php b/test/model/kanban/removekanbancell.php index 4a11f107f9..8109e99a5c 100755 --- a/test/model/kanban/removekanbancell.php +++ b/test/model/kanban/removekanbancell.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($kanban->removeKanbanCellTest($typeList[2], $cardIDList[4], $kanbanList)) && p r($kanban->removeKanbanCellTest($typeList[2], $cardIDList[5], $kanbanList)) && p() && e('412:183,; 413; 414; 415; 416; 417; 418; 419; 420; 439:184,185,186,; 440; 441; 442; 443; 444; 445; 446; 447:'); // 移除bug 看板161的卡片182 r($kanban->removeKanbanCellTest($typeList[3], $cardIDList[6], $kanbanList)) && p() && e('421; 422; 423; 424; 425; 426; 427; 448:62,; 449; 450; 451; 452; 453; 454:'); // 移除task 看板161的卡片61 r($kanban->removeKanbanCellTest($typeList[3], $cardIDList[7], $kanbanList)) && p() && e('421; 422; 423; 424; 425; 426; 427; 448; 449; 450; 451; 452; 453; 454:'); // 移除task 看板161的卡片62 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/setcolumnwidth.php b/test/model/kanban/setcolumnwidth.php index 4501336ce7..65e7c29031 100755 --- a/test/model/kanban/setcolumnwidth.php +++ b/test/model/kanban/setcolumnwidth.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($kanban->setColumnWidthTest($kanbanIDList[2], $fluidBoard)) && r($kanban->setColumnWidthTest($kanbanIDList[3], $fluidBoard, $fromExecution)) && p('name,fluidBoard') && e('迭代1,1'); // 测试修改看板4的fluidBoard值 r($kanban->setColumnWidthTest($kanbanIDList[4], $fluidBoard, $fromExecution)) && p('name,fluidBoard') && e('迭代2,1'); // 测试修改看板5的fluidBoard值 r($kanban->setColumnWidthTest($kanbanIDList[5], $fluidBoard)) && p('name,fluidBoard') && e('0'); // 测试修改不存在的看板的fluidBoard值 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/setlane.php b/test/model/kanban/setlane.php index a36788d2b2..cc6873b518 100755 --- a/test/model/kanban/setlane.php +++ b/test/model/kanban/setlane.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($kanban->setLaneTest($idList[3], $nameList[3], $colorList[1])) && p('name,colo r($kanban->setLaneTest($idList[4], $nameList[4], $colorList[0])) && p('name,color') && e('修改泳道5,#333'); // 测试设置泳道5 r($kanban->setLaneTest($idList[4], $nameList[5], $colorList[0])) && p('name:0') && e('『泳道名称』不能为空。'); // 测试设置不填写名字 r($kanban->setLaneTest($idList[4], $nameList[6], $colorList[0])) && p('name:0') && e('『泳道名称』不能为空。'); // 测试设置填写空格 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/setlaneheight.php b/test/model/kanban/setlaneheight.php index 41ed9df1c3..93b2ef681f 100755 --- a/test/model/kanban/setlaneheight.php +++ b/test/model/kanban/setlaneheight.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($kanban->setLaneHeightTest($laneIDList[1], $heightTypeList[1], $displayCardsLi r($kanban->setLaneHeightTest($laneIDList[2], $heightTypeList[1], $displayCardsList[2], 'execution')) && p('name,displayCards') && e('迭代2,4'); // 测试设置看板1的泳道高度 r($kanban->setLaneHeightTest($laneIDList[3], $heightTypeList[1], $displayCardsList[3])) && p('displayCards') && e('卡片数量必须是大于2的正整数。'); // 测试设置看板1的泳道高度 r($kanban->setLaneHeightTest($laneIDList[4], $heightTypeList[1], $displayCardsList[4])) && p('displayCards') && e('卡片数量必须是大于2的正整数。'); // 测试设置看板1的泳道高度 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/setwip.php b/test/model/kanban/setwip.php index c7ffd6ac7d..0eb7d5ab80 100755 --- a/test/model/kanban/setwip.php +++ b/test/model/kanban/setwip.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -44,4 +45,4 @@ r($kanban->setWIPTest($columnIDList[5], $limitList[3], $WIPCountList[2])) && p(' r($kanban->setWIPTest($columnIDList[5], $limitList[4], $WIPCountList[3])) && p('name,limit') && e('测试,220'); // 测试设置看板列406的在制品限制 r($kanban->setWIPTest($columnIDList[7], $limitList[4], $WIPCountList[3])) && p('limit') && e('子列在制品数量之和不能大于父列的在制品数量'); // 测试设置看板列408的在制品限制 子列大于父列 r($kanban->setWIPTest($columnIDList[0], $limitList[1], $WIPCountList[0])) && p('limit') && e('在制品数量必须是正整数。'); // 测试设置看板列401的在制品限制 非正整数 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/splitcolumn.php b/test/model/kanban/splitcolumn.php index 41c9efbefa..9260c9a2ff 100755 --- a/test/model/kanban/splitcolumn.php +++ b/test/model/kanban/splitcolumn.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -47,4 +48,4 @@ r($kanban->splitColumnTest($columnIDList[1], $splits2)) && p() && e('2'); r($kanban->splitColumnTest($columnIDList[2], $splits3)) && p() && e('2'); // 测试拆分列3 r($kanban->splitColumnTest($columnIDList[3], $splits4)) && p('limit') && e('在制品数量必须是正整数。'); // 测试拆分列4 r($kanban->splitColumnTest($columnIDList[3], $splits5)) && p('name') && e('『看板列名称』不能为空。'); // 测试拆分列4 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/update.php b/test/model/kanban/update.php index b242911110..db8f7db976 100755 --- a/test/model/kanban/update.php +++ b/test/model/kanban/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -41,4 +42,4 @@ r($kanban->updateTest($kanbanIDList[0], array('name' => $names[0]))) && p() r($kanban->updateTest($kanbanIDList[0], array('name' => $names[1]))) && p('name:0') && e('『看板名称』不能为空。'); // 测试修改看板名称为空 r($kanban->updateTest($kanbanIDList[0], array('name' => $names[2]))) && p('name:0') && e('『看板名称』不能为空。'); // 测试修改看板名称为空格 r($kanban->updateTest($kanbanIDList[0], array('space' => $space[1]))) && p('space:0') && e('『所属空间』不能为空。'); // 测试修改看板空间为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/updatecard.php b/test/model/kanban/updatecard.php index bbb7b6afef..4b57a27c98 100755 --- a/test/model/kanban/updatecard.php +++ b/test/model/kanban/updatecard.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -56,4 +57,4 @@ r($kanban->updateCardTest($cardIDList[0], $param6)) && p() r($kanban->updateCardTest($cardIDList[0], $param7)) && p() && e('预计不能为负数!'); // 测试修改卡片预计小于0 r($kanban->updateCardTest($cardIDList[0], $param8)) && p() && e('请输入正确的进度'); // 测试修改卡片进度小于0 r($kanban->updateCardTest($cardIDList[0], $param9)) && p() && e('请输入正确的进度'); // 测试修改卡片进度大于100 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/kanban/updatespace.php b/test/model/kanban/updatespace.php index d62e5eb97c..b6ae2f4e87 100755 --- a/test/model/kanban/updatespace.php +++ b/test/model/kanban/updatespace.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -47,4 +48,4 @@ r($kanban->updateSpaceTest($spaceIDList[3], $typeList[0], $param4)) && p() r($kanban->updateSpaceTest($spaceIDList[4], $typeList[1], $param5)) && p('name:0') && e('『空间名称』不能为空。'); // 测试修改空间5 不填写名称 r($kanban->updateSpaceTest($spaceIDList[4], $typeList[1], $param6)) && p('name:0') && e('『空间名称』不能为空。'); // 测试修改空间5 名称为空格 r($kanban->updateSpaceTest($spaceIDList[4], $typeList[1], $param7)) && p('owner:0') && e('『负责人』不能为空。'); // 测试修改空间5 不填写负责人 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/mail/addqueue.php b/test/model/mail/addqueue.php old mode 100644 new mode 100755 index f374cf31cd..d3863400b7 --- a/test/model/mail/addqueue.php +++ b/test/model/mail/addqueue.php @@ -10,6 +10,11 @@ title=测试 mailModel->addQueue(); cid=1 pid=1 +提交数据为空时 >> 没有数据提交 +获取添加的邮件主题 >> 测试提交队列 +获取收件人列表不包含自己 >> user3 +获取收件人列表包含自己 >> user3,admin + */ $mail = new mailTest(); @@ -22,4 +27,4 @@ $result4 = $mail->addQueueTest('user3,admin', '测试提交队列', '测试发 r($result1) && p() && e('没有数据提交'); //提交数据为空时 r($result2) && p('subject') && e('测试提交队列'); //获取添加的邮件主题 r($result3) && p('toList') && e('user3'); //获取收件人列表不包含自己 -r($result4) && p('toList') && e('user3,admin'); //获取收件人列表包含自己 +r($result4) && p('toList') && e('user3,admin'); //获取收件人列表包含自己 \ No newline at end of file diff --git a/test/model/mail/autodetect.php b/test/model/mail/autodetect.php old mode 100644 new mode 100755 index df019977f5..747f1b8e9c --- a/test/model/mail/autodetect.php +++ b/test/model/mail/autodetect.php @@ -10,6 +10,12 @@ title=测试 mailModel->autoDetect(); cid=1 pid=1 +检测qq邮箱信息 >> smtp.qq.com +检测163邮箱信息 >> smtp.163.com +检测搜狐邮箱信息 >> smtp.sohu.com +检测搜狐vip邮箱信息 >> smtp.vip.sohu.com +检测不存在的邮箱服务商信息 >> 没有检测到相关信息 + */ $mail = new mailTest(); @@ -20,4 +26,4 @@ r($mail->autoDetectTest($data[0])) && p('host') && e('smtp.qq.com'); // r($mail->autoDetectTest($data[1])) && p('host') && e('smtp.163.com'); //检测163邮箱信息 r($mail->autoDetectTest($data[2])) && p('host') && e('smtp.sohu.com'); //检测搜狐邮箱信息 r($mail->autoDetectTest($data[3])) && p('host') && e('smtp.vip.sohu.com'); //检测搜狐vip邮箱信息 -r($mail->autoDetectTest($data[4])) && p() && e('没有检测到相关信息'); //检测不存在的邮箱服务商信息 +r($mail->autoDetectTest($data[4])) && p() && e('没有检测到相关信息'); //检测不存在的邮箱服务商信息 \ No newline at end of file diff --git a/test/model/mail/getconfigbydetectingsmtp.php b/test/model/mail/getconfigbydetectingsmtp.php old mode 100644 new mode 100755 index 9240d80afa..0f4344d4cc --- a/test/model/mail/getconfigbydetectingsmtp.php +++ b/test/model/mail/getconfigbydetectingsmtp.php @@ -10,6 +10,11 @@ title=测试 mailModel->getConfigByDetectingSMTP(); cid=1 pid=1 +根据域名获取smtp >> smtp.qq.com +根据域名获取secure >> ssl +当端口号不为465时获取secure >> 0 +当域名不存在时 >> 0 + */ $mail = new mailTest(); @@ -22,4 +27,4 @@ $result4 = $mail->getConfigByDetectingSMTPTest('testqq.com','122@qq.com',22); r($result1) && p('host') && e('smtp.qq.com'); //根据域名获取smtp r($result2) && p('secure') && e('ssl'); //根据域名获取secure r($result3) && p('secure') && e('0'); //当端口号不为465时获取secure -r($result4) && p() && e('0'); //当域名不存在时 +r($result4) && p() && e('0'); //当域名不存在时 \ No newline at end of file diff --git a/test/model/mail/getconfigbymxrr.php b/test/model/mail/getconfigbymxrr.php old mode 100644 new mode 100755 index 4954701b39..96f2520387 --- a/test/model/mail/getconfigbymxrr.php +++ b/test/model/mail/getconfigbymxrr.php @@ -10,6 +10,9 @@ title=测试 mailModel->getConfigByMXRR(); cid=1 pid=1 +获取qq相关信息 >> smtp.qq.com +获取sohu相关信息 >> smtp.sohu.com + */ $mail = new mailTest(); @@ -18,4 +21,4 @@ $result1 = $mail->getConfigByMXRRTest('qq.com','test'); $result2 = $mail->getConfigByMXRRTest('sohu.com','test'); r($result1) && p('host') && e('smtp.qq.com'); //获取qq相关信息 -r($result2) && p('host') && e('smtp.sohu.com'); //获取sohu相关信息 +r($result2) && p('host') && e('smtp.sohu.com'); //获取sohu相关信息 \ No newline at end of file diff --git a/test/model/mail/getconfigfromprovider.php b/test/model/mail/getconfigfromprovider.php old mode 100644 new mode 100755 index bf51755547..a0201a0723 --- a/test/model/mail/getconfigfromprovider.php +++ b/test/model/mail/getconfigfromprovider.php @@ -10,6 +10,9 @@ title=测试 mailModel->getConfigFromProvider(); cid=1 pid=1 +获取qq相关信息 >> smtp.qq.com +获取sohu相关信息 >> smtp.sohu.com + */ $mail = new mailTest(); @@ -18,4 +21,4 @@ $result1 = $mail->getConfigFromProviderTest('qq.com','123'); $result2 = $mail->getConfigFromProviderTest('sohu.com','123'); r($result1) && p('host') && e('smtp.qq.com'); //获取qq相关信息 -r($result2) && p('host') && e('smtp.sohu.com'); //获取sohu相关信息 +r($result2) && p('host') && e('smtp.sohu.com'); //获取sohu相关信息 \ No newline at end of file diff --git a/test/model/mail/getqueue.php b/test/model/mail/getqueue.php old mode 100644 new mode 100755 index e8dde37f52..a00e59aca9 --- a/test/model/mail/getqueue.php +++ b/test/model/mail/getqueue.php @@ -10,6 +10,11 @@ title=测试 mailModel->getQueue(); cid=1 pid=1 +按照收件人分组获取邮件列表个数 >> 7 +按照收件人分组获取发送失败的邮件数量 >> 7 +按照收件人分组获取待发送的邮件数量 >> 7 +按照收件人分组获取第一条待发送的邮件内容 >> 测试发信内容 + */ $mail = new mailTest(); @@ -22,4 +27,4 @@ $result4 = $mail->getQueueTest('wait'); r($result1) && p() && e('7'); //按照收件人分组获取邮件列表个数 r($result2) && p() && e('7'); //按照收件人分组获取发送失败的邮件数量 r($result3) && p() && e('7'); //按照收件人分组获取待发送的邮件数量 -r($result4) && p('0:data') && e('测试发信内容'); //按照收件人分组获取第一条待发送的邮件内容 +r($result4) && p('0:data') && e('测试发信内容'); //按照收件人分组获取第一条待发送的邮件内容 \ No newline at end of file diff --git a/test/model/mail/getqueuebyid.php b/test/model/mail/getqueuebyid.php old mode 100644 new mode 100755 index cf6ef9ac90..ecbd59ccb3 --- a/test/model/mail/getqueuebyid.php +++ b/test/model/mail/getqueuebyid.php @@ -10,6 +10,10 @@ title=测试 mailModel->getQueueById(); cid=1 pid=1 +获取id为1的邮件主题 >> 主题1 +获取id为10的收件人 >> top10 +获取id不存在的邮件信息 >> 0 + */ $mail = new mailTest(); @@ -18,4 +22,4 @@ $queueID = array(1,10,0); r($mail->getQueueByIdTest($queueID[0])) && p('subject') && e('主题1'); //获取id为1的邮件主题 r($mail->getQueueByIdTest($queueID[1])) && p('toList') && e('top10'); //获取id为10的收件人 -r($mail->getQueueByIdTest($queueID[2])) && p() && e('0'); //获取id不存在的邮件信息 +r($mail->getQueueByIdTest($queueID[2])) && p() && e('0'); //获取id不存在的邮件信息 \ No newline at end of file diff --git a/test/model/mail/getsubject.php b/test/model/mail/getsubject.php old mode 100644 new mode 100755 index b6279cdba7..db66014c5d --- a/test/model/mail/getsubject.php +++ b/test/model/mail/getsubject.php @@ -10,6 +10,12 @@ title=测试 mailModel->getSubject(); cid=1 pid=1 +获取关闭测试单时邮件主题 >> admin关闭了测试单 #1:测试单1 +获取创建文档时的邮件主题 >> admin创建了文档 #1:文档标题901 +获取操作需求时的邮件主题 >> STORY #1 test - 正常产品1 +获取操作任务时的邮件主题 >> TASK #1 test - 迭代1 +获取操作BUG时的邮件主题 >> BUG #1 test - 正常产品1 + */ $mail = new mailTest(); @@ -24,4 +30,4 @@ r($result1) && p() && e('admin关闭了测试单 #1:测试单1'); //获取关 r($result2) && p() && e('admin创建了文档 #1:文档标题901'); //获取创建文档时的邮件主题 r($result3) && p() && e('STORY #1 test - 正常产品1'); //获取操作需求时的邮件主题 r($result4) && p() && e('TASK #1 test - 迭代1'); //获取操作任务时的邮件主题 -r($result5) && p() && e('BUG #1 test - 正常产品1'); //获取操作BUG时的邮件主题 +r($result5) && p() && e('BUG #1 test - 正常产品1'); //获取操作BUG时的邮件主题 \ No newline at end of file diff --git a/test/model/mail/mailexist.php b/test/model/mail/mailexist.php old mode 100644 new mode 100755 index 58b0075cd8..6d206d4dfb --- a/test/model/mail/mailexist.php +++ b/test/model/mail/mailexist.php @@ -10,8 +10,10 @@ title=测试 mailModel->mailExist(); cid=1 pid=1 +检查系统是否至少存在邮件 >> 10001000@qq.com + */ $mail = new mailTest(); -r($mail->mailExistTest()) && p('email') && e('10001000@qq.com'); //检查系统是否至少存在邮件 +r($mail->mailExistTest()) && p('email') && e('10001000@qq.com'); //检查系统是否至少存在邮件 \ No newline at end of file diff --git a/test/model/mail/mergemails.php b/test/model/mail/mergemails.php old mode 100644 new mode 100755 index d48ae69688..d3fbc7b70e --- a/test/model/mail/mergemails.php +++ b/test/model/mail/mergemails.php @@ -10,9 +10,12 @@ title=测试 mailModel->mergeMails(); cid=1 pid=1 +获取邮件合并后的id >> 6,1 +获取邮件合并后的主题 >> 主题6|主题1 + */ $mail = new mailTest(); r($mail->mergeMailsTest('admin')) && p('id') && e('6,1'); //获取邮件合并后的id -r($mail->mergeMailsTest('admin')) && p('subject') && e('主题6|主题1'); //获取邮件合并后的主题 +r($mail->mergeMailsTest('admin')) && p('subject') && e('主题6|主题1'); //获取邮件合并后的主题 \ No newline at end of file diff --git a/test/model/mail/send.php b/test/model/mail/send.php old mode 100644 new mode 100755 index 679584cc87..0ababe1d2b --- a/test/model/mail/send.php +++ b/test/model/mail/send.php @@ -10,6 +10,8 @@ title=测试 mailModel->send(); cid=1 pid=1 + >> 0 + */ $mail = new mailTest(); @@ -38,4 +40,4 @@ if(!isset($tester->config->mail->turnon)) $tester->loadModel('setting')->setItem $result1 = $mail->sendTest('admin','test','test','',true); -r($result1) && p() && e('0'); +r($result1) && p() && e('0'); \ No newline at end of file diff --git a/test/model/mail/sendmail.php b/test/model/mail/sendmail.php old mode 100644 new mode 100755 index fcc4fca854..352cb86c65 --- a/test/model/mail/sendmail.php +++ b/test/model/mail/sendmail.php @@ -10,8 +10,10 @@ title=测试 mailModel->sendmail(); cid=1 pid=1 +测试为dev4用户发送邮件通知 >> 0 + */ $mail = new mailTest(); -r($mail->sendmailTest(48,48)) && p() && e('0'); //测试为dev4用户发送邮件通知 +r($mail->sendmailTest(48,48)) && p() && e('0'); //测试为dev4用户发送邮件通知 \ No newline at end of file diff --git a/test/model/mail/setbody.php b/test/model/mail/setbody.php old mode 100644 new mode 100755 index 6a7e73e688..5cec9d1b4b --- a/test/model/mail/setbody.php +++ b/test/model/mail/setbody.php @@ -10,8 +10,10 @@ title=测试 mailModel->setCC(); cid=1 pid=1 +测试设置内容 >> test body + */ $mail = new mailTest(); -r($mail->setBodyTest('test body')) && p('Body') && e('test body'); //测试设置内容 +r($mail->setBodyTest('test body')) && p('Body') && e('test body'); //测试设置内容 \ No newline at end of file diff --git a/test/model/mail/setmta.php b/test/model/mail/setmta.php old mode 100644 new mode 100755 index 3fe819cb15..1975f8d0eb --- a/test/model/mail/setmta.php +++ b/test/model/mail/setmta.php @@ -10,9 +10,12 @@ title=测试 mailModel->setCC(); cid=1 pid=1 +获取MTA主机 >> localhost +获取MTAdebug设置 >> 0 + */ $mail = new mailTest(); r($mail->setMTATest()) && p('Host') && e('localhost'); //获取MTA主机 -r($mail->setMTATest()) && p('SMTPDebug') && e('0'); //获取MTAdebug设置 +r($mail->setMTATest()) && p('SMTPDebug') && e('0'); //获取MTAdebug设置 \ No newline at end of file diff --git a/test/model/mail/setsubject.php b/test/model/mail/setsubject.php old mode 100644 new mode 100755 index 41be42134c..571352c893 --- a/test/model/mail/setsubject.php +++ b/test/model/mail/setsubject.php @@ -10,8 +10,10 @@ title=测试 mailModel->setCC(); cid=1 pid=1 +测试设置主题 >> test subject + */ $mail = new mailTest(); -r($mail->setSubjectTest('test subject')) && p('Subject') && e('test subject'); //测试设置主题 +r($mail->setSubjectTest('test subject')) && p('Subject') && e('test subject'); //测试设置主题 \ No newline at end of file diff --git a/test/model/message/getmessages.php b/test/model/message/getmessages.php old mode 100644 new mode 100755 index e4ffad050a..aa750a9542 --- a/test/model/message/getmessages.php +++ b/test/model/message/getmessages.php @@ -10,9 +10,12 @@ title=测试 messageModel->getMessages(); cid=1 pid=1 +拿取status为wait的数据信息 >> 1 +拿取status为wait的数据信息 >> 114 + */ $message = new messageTest(); r($message->getMessagesTest('wait')) && p('1:id') && e('1'); //拿取status为wait的数据信息 -r($message->getMessagesTest('wait')) && p('2:action') && e('114'); //拿取status为wait的数据信息 +r($message->getMessagesTest('wait')) && p('2:action') && e('114'); //拿取status为wait的数据信息 \ No newline at end of file diff --git a/test/model/message/getnoticetodos.php b/test/model/message/getnoticetodos.php old mode 100644 new mode 100755 index f370eb6a03..cb9daefc85 --- a/test/model/message/getnoticetodos.php +++ b/test/model/message/getnoticetodos.php @@ -10,8 +10,10 @@ title=测试 messageModel->getNoticeTodos(); cid=1 pid=1 +查询notice为空的todo的信息 >> 0 + */ $message = new messageTest(); -r($message->getNoticeTodosTest()) && p('0') && e('0'); //查询notice为空的todo的信息 +r($message->getNoticeTodosTest()) && p('0') && e('0'); //查询notice为空的todo的信息 \ No newline at end of file diff --git a/test/model/message/getobjectactions.php b/test/model/message/getobjectactions.php old mode 100644 new mode 100755 index e471a0ee77..79b235468d --- a/test/model/message/getobjectactions.php +++ b/test/model/message/getobjectactions.php @@ -10,6 +10,18 @@ title=测试 messageModel->getObjectActions(); cid=1 pid=1 +查询objectType为product的action是opened的lab标签 >> 创建 +查询objectType为story的action是frombug的lab标签 >> 转研发需求 +查询objectType为productplan的action是edited的lab标签 >> 编辑 +查询objectType为project的action是delayed的lab标签 >> 延期 +查询objectType为task的action是assigned的lab标签 >> 指派 +查询objectType为bug的action是closed的lab标签 >> 关闭 +查询objectType为case的action是opended的lab标签 >> 创建 +查询objectType为testtask的action是starteded的lab标签 >> 开始 +查询objectType为todo的action是edited的lab标签 >> 编辑 +查询objectType为doc的action是created的lab标签 >> 创建 +查询objectType为mr的action是compilefail的lab标签 >> 构建失败 + */ $message = new messageTest(); @@ -24,4 +36,4 @@ r($message->getObjectActionsTest()) && p('case:opened') && e('创建'); r($message->getObjectActionsTest()) && p('testtask:started') && e('开始'); //查询objectType为testtask的action是starteded的lab标签 r($message->getObjectActionsTest()) && p('todo:edited') && e('编辑'); //查询objectType为todo的action是edited的lab标签 r($message->getObjectActionsTest()) && p('doc:created') && e('创建'); //查询objectType为doc的action是created的lab标签 -r($message->getObjectActionsTest()) && p('mr:compilefail') && e('构建失败'); //查询objectType为mr的action是compilefail的lab标签 +r($message->getObjectActionsTest()) && p('mr:compilefail') && e('构建失败'); //查询objectType为mr的action是compilefail的lab标签 \ No newline at end of file diff --git a/test/model/message/getobjecttypes.php b/test/model/message/getobjecttypes.php old mode 100644 new mode 100755 index 5be9346e04..1f095331ed --- a/test/model/message/getobjecttypes.php +++ b/test/model/message/getobjecttypes.php @@ -10,6 +10,18 @@ title=测试 messageModel->getObjectTypes(); cid=1 pid=1 +查询objectType为product的objectTypes >> 产品 +查询objectType为story的objectTypes >> 研发需求 +查询objectType为productplan的objectTypes >> 计划 +查询objectType为project的objectTypes >> 项目 +查询objectType为task的objectTypes >> 任务 +查询objectType为bug的objectTypes >> Bug +查询objectType为case的objectTypes >> 用例 +查询objectType为testcase的objectTypes >> 测试单 +查询objectType为todo的objectTypes >> 待办 +查询objectType为doc的objectTypes >> 文档 +查询objectType为mr的objectTypes >> 合并请求 + */ $message = new messageTest(); @@ -24,4 +36,4 @@ r($message->getObjectTypesTest()) && p('case') && e('用例'); //查 r($message->getObjectTypesTest()) && p('testtask') && e('测试单'); //查询objectType为testcase的objectTypes r($message->getObjectTypesTest()) && p('todo') && e('待办'); //查询objectType为todo的objectTypes r($message->getObjectTypesTest()) && p('doc') && e('文档'); //查询objectType为doc的objectTypes -r($message->getObjectTypesTest()) && p('mr') && e('合并请求'); //查询objectType为mr的objectTypes +r($message->getObjectTypesTest()) && p('mr') && e('合并请求'); //查询objectType为mr的objectTypes \ No newline at end of file diff --git a/test/model/message/gettolist.php b/test/model/message/gettolist.php old mode 100644 new mode 100755 index f6c9d997fc..60bdc487c7 --- a/test/model/message/gettolist.php +++ b/test/model/message/gettolist.php @@ -10,6 +10,13 @@ title=测试 messageModel->getToList(); cid=1 pid=1 +通过一条todo数据展示 >> admin +通过一条testtask数据展示 >> user3 +通过一条meeting数据展示 >> admin,admin, +通过一条mr数据展示 >> admin,admin +通过一条release数据展示 >> po1 +通过一条task数据展示 >> po82 + */ $message = new messageTest(); @@ -19,4 +26,4 @@ r($message->getToListTest('testtask')) && p() && e('user3'); //通过一 r($message->getToListTest('meeting')) && p() && e('admin,admin,'); //通过一条meeting数据展示$toList r($message->getToListTest('mr')) && p() && e('admin,admin'); //通过一条mr数据展示$toList r($message->getToListTest('release')) && p() && e('po1'); //通过一条release数据展示$toList -r($message->getToListTest('task')) && p() && e('po82'); //通过一条task数据展示$toList +r($message->getToListTest('task')) && p() && e('po82'); //通过一条task数据展示$toList \ No newline at end of file diff --git a/test/model/message/savenotice.php b/test/model/message/savenotice.php old mode 100644 new mode 100755 index 619bbb10b1..84e8d8766a --- a/test/model/message/savenotice.php +++ b/test/model/message/savenotice.php @@ -10,6 +10,11 @@ title=测试 messageModel->saveNotice(); cid=1 pid=1 +通过拿取todo表的第一条数据并且将actor赋值admin获取返回值 >> 0 +通过拿取task表的第一条数据并且将actor赋值admin获取返回值 >> 0 +通过拿取todo表的第一条数据并且不给actor赋值获取返回值 >> 0 +通过拿取todo表的第一条数据并且给actor赋值user1获取返回值 >> 0 + */ $message = new messageTest(); @@ -17,4 +22,4 @@ $message = new messageTest(); r($message->saveNoticeTest('todo', '1', 'product', '1', 'admin')) && p() && e('0'); //通过拿取todo表的第一条数据并且将actor赋值admin获取返回值 r($message->saveNoticeTest('task', '1', 'product', '1', 'admin')) && p() && e('0'); //通过拿取task表的第一条数据并且将actor赋值admin获取返回值 r($message->saveNoticeTest('todo', '1', 'product', '1', '')) && p() && e('0'); //通过拿取todo表的第一条数据并且不给actor赋值获取返回值 -r($message->saveNoticeTest('todo', '1', 'product', '1', 'user1')) && p() && e('0'); //通过拿取todo表的第一条数据并且给actor赋值user1获取返回值 +r($message->saveNoticeTest('todo', '1', 'product', '1', 'user1')) && p() && e('0'); //通过拿取todo表的第一条数据并且给actor赋值user1获取返回值 \ No newline at end of file diff --git a/test/model/message/send.php b/test/model/message/send.php old mode 100644 new mode 100755 index 90b6c0672e..91a4539ef7 --- a/test/model/message/send.php +++ b/test/model/message/send.php @@ -10,9 +10,12 @@ title=测试 messageModel->send(); cid=1 pid=1 +通过拿取todo表的第一条数据并且将actor赋值admin获取返回值 >> 0 +通过拿取todo表的第0条数据并且将actor赋值admin获取返回值 >> 0 + */ $message = new messageTest(); r($message->sendTest('todo', '1', 'product', '1', 'admin')) && p() && e('0'); //通过拿取todo表的第一条数据并且将actor赋值admin获取返回值 -r($message->sendTest('todo', '0', 'product', '1', 'admin')) && p() && e('0'); //通过拿取todo表的第0条数据并且将actor赋值admin获取返回值 +r($message->sendTest('todo', '0', 'product', '1', 'admin')) && p() && e('0'); //通过拿取todo表的第0条数据并且将actor赋值admin获取返回值 \ No newline at end of file diff --git a/test/model/mr/apicreate.php b/test/model/mr/apicreate.php old mode 100644 new mode 100755 index baddd0e7f7..0715567408 --- a/test/model/mr/apicreate.php +++ b/test/model/mr/apicreate.php @@ -8,10 +8,10 @@ title=测试 mrModel::apiCreate(); cid=0 pid=0 -使用空的RepoUrl数据创建 >> fail +使用空的RepoUrl数据创建 >> fail 使用正确的RepoUrl,错误的分支数据创建mr请求 >> fail -使用源分支和目标分支一样的数据创建mr请求 >> success -使用正确的数据创建mr请求 >> success +使用源分支和目标分支一样的数据创建mr请求 >> success +使用正确的数据创建mr请求 >> success */ @@ -58,4 +58,4 @@ if(dao::isError()) $result = preg_match('/[存在另外一个同样的合并请求在源项目分支中,存在重复并且未关闭的合并请求]: ID([0-9]+)/', $errors[0], $matches); //检查错误原因是否是已存在一样的mr请求 } if($result) $result = 'success'; -r($result) && p() && e('success'); //使用正确的数据创建mr请求 +r($result) && p() && e('success'); //使用正确的数据创建mr请求 \ No newline at end of file diff --git a/test/model/mr/apigetsameopened.php b/test/model/mr/apigetsameopened.php old mode 100644 new mode 100755 index b34f368a41..7648c25c7e --- a/test/model/mr/apigetsameopened.php +++ b/test/model/mr/apigetsameopened.php @@ -8,17 +8,17 @@ title=测试 mrModel::apiGetSameOpened(); cid=0 pid=0 -使用正确的gitlabID,sourceProject,sourceBranch,targetProject,targetBranch >> success -使用空的gitlabID >> null -使用空的sourceProject >> null -使用空的sourceBranch >> null -使用空的targetProject >> null -使用空的targetBranch >> null -使用错误的gitlabID >> null -使用错误的sourceProject >> null -使用错误的sourceBranch >> null -使用错误的targetProject >> null -使用错误的targetBranch >> null +使用正确的gitlabID, sourceProject,sourceBranch,targetProject,targetBranch >> success +使用空的gitlabID >> null +使用空的sourceProject >> null +使用空的sourceBranch >> null +使用空的targetProject >> null +使用空的targetBranch >> null +使用错误的gitlabID >> null +使用错误的sourceProject >> null +使用错误的sourceBranch >> null +使用错误的targetProject >> null +使用错误的targetBranch >> null */ $mrModel = $tester->loadModel('mr'); @@ -131,4 +131,4 @@ $targetProject = '42'; $targetBranch = 'main'; $result = $mrModel->apiGetSameOpened($gitlabID, $sourceProject, $sourceBranch, $targetProject, $targetBranch); if($result === null) $result = 'null'; -r($result) && p() && e('null'); //使用错误的targetBranch +r($result) && p() && e('null'); //使用错误的targetBranch \ No newline at end of file diff --git a/test/model/mr/checksameopened.php b/test/model/mr/checksameopened.php old mode 100644 new mode 100755 index 5c80dde8e6..36654457ab --- a/test/model/mr/checksameopened.php +++ b/test/model/mr/checksameopened.php @@ -8,17 +8,17 @@ title=测试 mrModel::checkSameOpened(); cid=0 pid=0 -使用正确的gitlabID,sourceProject,sourceBranch,targetProject,targetBranch >> fail -使用空的gitlabID >> success -使用空的sourceProject >> success -使用空的sourceBranch >> success -使用空的targetProject >> success -使用空的targetBranch >> success -使用错误的gitlabID >> success -使用错误的sourceProject >> success -使用错误的sourceBranch >> success -使用错误的targetProject >> success -使用错误的targetBranch >> success +使用正确的gitlabID, sourceProject,sourceBranch,targetProject,targetBranch >> fail +使用空的gitlabID >> success +使用空的sourceProject >> success +使用空的sourceBranch >> success +使用空的targetProject >> success +使用空的targetBranch >> success +使用错误的gitlabID >> success +使用错误的sourceProject >> success +使用错误的sourceBranch >> success +使用错误的targetProject >> success +使用错误的targetBranch >> success */ $mrModel = $tester->loadModel('mr'); @@ -109,4 +109,4 @@ $sourceBranch = 'branch-08'; $targetProject = '42'; $targetBranch = 'main'; $result = $mrModel->checkSameOpened($gitlabID, $sourceProject, $sourceBranch, $targetProject, $targetBranch); -r($result) && p('result') && e('success'); //使用错误的targetBranch +r($result) && p('result') && e('success'); //使用错误的targetBranch \ No newline at end of file diff --git a/test/model/mr/convertapierror.php b/test/model/mr/convertapierror.php old mode 100644 new mode 100755 index d2034d01b5..e46bf9dfbf --- a/test/model/mr/convertapierror.php +++ b/test/model/mr/convertapierror.php @@ -9,7 +9,7 @@ cid=0 pid=0 使用正确的message >> success -使用空的message >> success +使用空的message >> success */ $mrModel = $tester->loadModel('mr'); @@ -23,4 +23,4 @@ r($result) && p('') && e('success'); //使用正确的message $message = ''; $result = $mrModel->convertApiError($message); if(empty($result)) $result = 'success'; -r($result) && p('') && e('success'); //使用空的message +r($result) && p('') && e('success'); //使用空的message \ No newline at end of file diff --git a/test/model/mr/create.php b/test/model/mr/create.php old mode 100644 new mode 100755 diff --git a/test/model/mr/getallgitlabprojects.php b/test/model/mr/getallgitlabprojects.php old mode 100644 new mode 100755 diff --git a/test/model/mr/getdiffs.php b/test/model/mr/getdiffs.php old mode 100644 new mode 100755 index dadb786506..9c4d942eac --- a/test/model/mr/getdiffs.php +++ b/test/model/mr/getdiffs.php @@ -8,7 +8,7 @@ title=测试 mrModel::getDiffs(); cid=1 pid=1 -使用空的MR >> return null +使用空的MR >> return null 使用正确的MR >> return normal */ @@ -27,4 +27,4 @@ if(!empty($result)) $first = reset($result); if(isset($first->fileName) and is_array($first->contents)) $result = 'return normal'; } -r($result) && p() && e('return normal'); //使用正确的MR +r($result) && p() && e('return normal'); //使用正确的MR \ No newline at end of file diff --git a/test/model/mr/getlastreviewinfo.php b/test/model/mr/getlastreviewinfo.php old mode 100644 new mode 100755 index f09591e8a8..a949333265 --- a/test/model/mr/getlastreviewinfo.php +++ b/test/model/mr/getlastreviewinfo.php @@ -8,7 +8,7 @@ title=测试 mrModel::getLastReviewInfo(); cid=1 pid=1 -使用空的repoID >> return null +使用空的repoID >> return null 使用正确的repoID >> return normal */ @@ -23,4 +23,4 @@ r($result) && p() && e('return null'); //使用空的repoID $repo = $tester->dao->select('*')->from(TABLE_REPO)->orderBy('id_desc')->limit(1)->fetch(); $result = $mrModel->getLastReviewInfo($repo->id); if(isset($result->bug) and isset($result->task)) $result = 'return normal'; -r($result) && p() && e('return normal'); //使用正确的repoID +r($result) && p() && e('return normal'); //使用正确的repoID \ No newline at end of file diff --git a/test/model/mr/getlist.php b/test/model/mr/getlist.php old mode 100644 new mode 100755 diff --git a/test/model/mr/getreview.php b/test/model/mr/getreview.php old mode 100644 new mode 100755 index adb4f46df4..32219013fb --- a/test/model/mr/getreview.php +++ b/test/model/mr/getreview.php @@ -8,8 +8,8 @@ title=测试 mrModel::getReview(); cid=1 pid=1 -使用空的repoID, MRID, revision >> return null -使用正确的repoID, MRID >> return normal +使用空的repoID, MRID, revision >> return null +使用正确的repoID, MRID >> return normal 使用正确的repoID, MRID, 错误的revision >> return null */ @@ -38,4 +38,4 @@ r($result) && p() && e('return normal'); //使用正确的repoID, MRID $revision = '123qwe'; $result = $mrModel->getReview($repoID, $MRID, $revision); if(empty($result)) $result = 'return null'; -r($result) && p() && e('return null'); //使用正确的repoID, MRID, 错误的revision +r($result) && p() && e('return null'); //使用正确的repoID, MRID, 错误的revision \ No newline at end of file diff --git a/test/model/mr/savebug.php b/test/model/mr/savebug.php old mode 100644 new mode 100755 index db9118a8ec..7413bc7804 --- a/test/model/mr/savebug.php +++ b/test/model/mr/savebug.php @@ -8,8 +8,8 @@ title=测试 mrModel::saveBug(); cid=1 pid=1 -使用空的repoID, MRID >> return false -使用正确的repoID, MRID。空的title。 >> return false +使用空的repoID, MRID >> return false +使用正确的repoID, MRID。空的title。 >> return false 使用正确的repoID, MRID。POST数据正确。 >> Test Bug Review */ @@ -41,4 +41,4 @@ r($result) && p() && e('return false'); //使用正确的repoID, MRID。空的ti $_POST['title'] = 'Test Bug Review'; $result = $mrModel->saveBug($MR->repoID, $MR->id, $v1, $v2); -r($result) && p('title') && e('Test Bug Review'); //使用正确的repoID, MRID。POST数据正确。 +r($result) && p('title') && e('Test Bug Review'); //使用正确的repoID, MRID。POST数据正确。 \ No newline at end of file diff --git a/test/model/mr/savetask.php b/test/model/mr/savetask.php old mode 100644 new mode 100755 index 5889dd4902..2dd41f9ac9 --- a/test/model/mr/savetask.php +++ b/test/model/mr/savetask.php @@ -42,4 +42,4 @@ r($result) && p() && e('return false'); //使用正确的repoID, MRID。空的ti $_POST['title'] = 'Test Task Review'; $result = $mrModel->saveTask($MR->repoID, $MR->id, $v1, $v2); -r($result) && p('title') && e('Test Task Review'); //使用正确的repoID, MRID。POST数据正确。 +r($result) && p('title') && e('Test Task Review'); //使用正确的repoID, MRID。POST数据正确。 \ No newline at end of file diff --git a/test/model/mr/update.php b/test/model/mr/update.php old mode 100644 new mode 100755 index e4b9829a2a..9f01d7501b --- a/test/model/mr/update.php +++ b/test/model/mr/update.php @@ -8,7 +8,7 @@ title=测试 mrModel::update(); cid=0 pid=0 -POST数据正确修改MR描述 >> success +POST数据正确修改MR描述 >> success 使用title为空的数据mr请求 >> 『名称』不能为空。 */ @@ -29,4 +29,4 @@ r($result) && p() && e('success'); //POST数据正确修改MR描述 $_POST['title'] = ''; $result = $mrModel->update($MRID); -r($result) && p('message[title]:0') && e('『名称』不能为空。'); //使用title为空的数据mr请求 +r($result) && p('message[title]:0') && e('『名称』不能为空。'); //使用title为空的数据mr请求 \ No newline at end of file diff --git a/test/model/my/getassignedbyme.php b/test/model/my/getassignedbyme.php index 02de7a0c09..c20cc6d56c 100755 --- a/test/model/my/getassignedbyme.php +++ b/test/model/my/getassignedbyme.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($my->getAssignedByMeTest($task[0], $task[1], $task[2], $task[3], $task[4], r($my->getAssignedByMeTest($bug[0], $bug[1], $bug[2], $bug[3], $bug[4], $bug[5])) && p() && e('1'); // 当插入一条action为admin指派了bug的动态时,查询结果为1条数据 r($my->getAssignedByMeTest($story[0], $story[1], $story[2], $story[3], $story[4], $story[5])) && p() && e('1'); // 当插入一条action为admin指派了需求的动态时,查询结果为1条数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/pipeline/create.php b/test/model/pipeline/create.php old mode 100644 new mode 100755 index 9f8c1900ab..2ee74268d5 --- a/test/model/pipeline/create.php +++ b/test/model/pipeline/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,11 @@ title=测试 pipelineModel->create(); cid=1 pid=1 +获取添加的type >> Jenkins +获取添加的account >> JenkinsAccount +添加错误的url信息 >> 『服务地址』应当为合法的URL。 +添加名称为空时 >> 『名称』不能为空 + */ $pipeline = new pipelineTest(); @@ -36,4 +42,4 @@ r($result2) && p('account') && e('JenkinsAccount'); //获取添 r($result3) && p('url:0') && e('『服务地址』应当为合法的URL。'); //添加错误的url信息 r($result4) && p('name:0') && e('『名称』不能为空'); //添加名称为空时 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/pipeline/delete.php b/test/model/pipeline/delete.php old mode 100644 new mode 100755 index 39f07ef34d..bfa2d47b0f --- a/test/model/pipeline/delete.php +++ b/test/model/pipeline/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,10 +11,12 @@ title=测试 pipelineModel->delete(); cid=1 pid=1 +测试删除之后deleted值是否为1 >> 1 + */ $pipeline = new pipelineTest(); r($pipeline->deleteTest(1)) && p('deleted') && e('1'); //测试删除之后deleted值是否为1 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/pipeline/getbyid.php b/test/model/pipeline/getbyid.php old mode 100644 new mode 100755 index 06d1cc2de7..0b8114c3f1 --- a/test/model/pipeline/getbyid.php +++ b/test/model/pipeline/getbyid.php @@ -10,6 +10,8 @@ title=测试 pipelineModel->getByID(); cid=1 pid=1 +获取id为1的name字段值 >> gitlab服务器 + */ $IDList = array('1','0'); @@ -17,4 +19,4 @@ $IDList = array('1','0'); $pipeline = new pipelineTest(); r($pipeline->getByIDTest($IDList[0])) && p('name') && e('gitlab服务器'); //获取id为1的name字段值 -r($pipeline->getByIDTest($IDList[1])) && p() && e(); //获取id为不存在的数据 +r($pipeline->getByIDTest($IDList[1])) && p() && e(); //获取id为不存在的数据 \ No newline at end of file diff --git a/test/model/pipeline/getlist.php b/test/model/pipeline/getlist.php old mode 100644 new mode 100755 index d2c06bc3a7..1204115afc --- a/test/model/pipeline/getlist.php +++ b/test/model/pipeline/getlist.php @@ -10,6 +10,10 @@ title=测试 pipelineModel->getList(); cid=1 pid=1 +获取第一页第一条数据的name >> gitlab服务器 +统计所有type为gitlab的数量 >> 1 +统计所有type为sonarqube的数据量 >> 1 + */ global $tester; @@ -23,4 +27,4 @@ $sonarqubeList = $pipeline->getListTest('sonarqube ', 'id_desc', $pager); r($gitlabList) && p('1:name') && e('gitlab服务器'); //获取第一页第一条数据的name r(count($gitlabList)) && p() && e('1'); //统计所有type为gitlab的数量 -r(count($sonarqubeList)) && p() && e('1'); //统计所有type为sonarqube的数据量 +r(count($sonarqubeList)) && p() && e('1'); //统计所有type为sonarqube的数据量 \ No newline at end of file diff --git a/test/model/pipeline/getpairs.php b/test/model/pipeline/getpairs.php old mode 100644 new mode 100755 index 2c856409f2..c23a5a83ec --- a/test/model/pipeline/getpairs.php +++ b/test/model/pipeline/getpairs.php @@ -10,6 +10,10 @@ title=测试 pipelineModel->getPairs(); cid=1 pid=1 +id为1且type为gitlab的pipeline名称 >> gitlab服务器 +id为2且type为sonarqube的pipeline名称 >> sonarqube服务器 +获取不存在的type >> 没有获取到数据 + */ $pipeline = new pipelineTest(); @@ -20,4 +24,4 @@ $data[2] = array('type' => 'testType'); r($pipeline->getPairs($data[0])) && p() && e('gitlab服务器'); //id为1且type为gitlab的pipeline名称 r($pipeline->getPairs($data[1])) && p() && e('sonarqube服务器'); //id为2且type为sonarqube的pipeline名称 -r($pipeline->getPairs($data[2])) && p() && e('没有获取到数据'); //获取不存在的type +r($pipeline->getPairs($data[2])) && p() && e('没有获取到数据'); //获取不存在的type \ No newline at end of file diff --git a/test/model/pipeline/update.php b/test/model/pipeline/update.php old mode 100644 new mode 100755 index 441f77f312..c931ff75ee --- a/test/model/pipeline/update.php +++ b/test/model/pipeline/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,10 @@ title=测试 pipelineModel->update(); cid=1 pid=1 +获取修改后的name值 >> 测试修改gitlab服务器名称 +当名称为空时 >> 『名称』不能为空。 +url为空时 >> 『服务地址』不能为空。 + */ $pipeline = new pipelineTest(); @@ -31,4 +36,4 @@ r($result1) && p('name') && e('测试修改gitlab服务器名称'); //获取 r($result2) && p('name:0') && e('『名称』不能为空。'); //当名称为空时 r($result3) && p('url:0') && e('『服务地址』不能为空。'); //url为空时 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/batchupdate.php b/test/model/product/batchupdate.php index e2b06ec78d..e00f0ed0f7 100755 --- a/test/model/product/batchupdate.php +++ b/test/model/product/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -28,4 +29,4 @@ $product = new productTest('admin'); r($product->batchUpdateTest($changeName, '1')) && p('0:field,old,new') && e('name,正常产品1,批量修改产品1'); // 批量修改product名称 r($product->batchUpdateTest($changeQDs, '2')) && p('0:field,old,new') && e('QD,test2,test1'); // 批量修改produc测试负责人 r($product->batchUpdateTest($changeStatus, '3')) && p('0:field,old,new') && e('status,normal,closed'); // 批量修改product状态 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/checkpriv.php b/test/model/product/checkpriv.php index ee13e9ad37..5f711ed974 100755 --- a/test/model/product/checkpriv.php +++ b/test/model/product/checkpriv.php @@ -2,6 +2,7 @@ switchDB(); #su('admin'); @@ -44,4 +45,4 @@ r($productTest->checkPrivTest($productIDList[3])) && p() && e('1'); // 测试po1 r($productTest->checkPrivTest($productIDList[4])) && p() && e('1'); // 测试po1能否看到产品5 r($productTest->checkPrivTest($productIDList[5])) && p() && e('2'); // 测试po1能否看到不存在的产品 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/close.php b/test/model/product/close.php index 8d7adfc2ce..9cfda16124 100755 --- a/test/model/product/close.php +++ b/test/model/product/close.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -28,4 +29,4 @@ r($product->closeTest($productIDList[2])) && p('0:field,old,new') && e('status,n r($product->closeTest($productIDList[3])) && p('0:field,old,new') && e('status,normal,closed'); // 测试关闭产品4 r($product->closeTest($productIDList[4])) && p('0:field,old,new') && e('status,normal,closed'); // 测试关闭产品5 r($product->closeTest($productIDList[5])) && p() && e('0'); // 测试关闭不存在产品 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/create.php b/test/model/product/create.php index fa8a5a74bd..97dbe4a3c1 100755 --- a/test/model/product/create.php +++ b/test/model/product/create.php @@ -2,6 +2,7 @@ switchDB(); #su('admin'); @@ -41,4 +42,4 @@ r($product->createObject($t_namecode)) && p('name,code') && e('cas r($product->createObject($t_pronamecode)) && p('program,name,code') && e('3,case4,testcase4'); // 测试传入program、name、code r($product->createObject($t_intypestatus)) && p('program,type,status') && e('4,branch,closed'); // 测试传入program、name、code、type、status r($product->createObject($t_noacl)) && p('acl:0') && e('『访问控制』不符合格式,应当为:『/open|private|custom/』。'); // 测试不填权限控制的情况 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/manageline.php b/test/model/product/manageline.php index 7c88edfdb8..18669b83fa 100755 --- a/test/model/product/manageline.php +++ b/test/model/product/manageline.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -37,4 +38,4 @@ r($product->manageLineTest($lines1, 2)) && p('name') && e('产品线2'); // 测 r($product->manageLineTest($lines2, 1)) && p('root') && e('1'); // 测试修改所属项目集 r($product->manageLineTest($lines3)) && p('name') && e('产品线21'); // 测试创建新的产品线 r($product->manageLineTest($lines4)) && p() && e(''); // 测试创建没有项目集的产品线 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/processroadmap.php b/test/model/product/processroadmap.php index 77abcbe545..2ac4316eee 100755 --- a/test/model/product/processroadmap.php +++ b/test/model/product/processroadmap.php @@ -10,7 +10,7 @@ cid=1 pid=1 测试获取产品1下的发布roadmap >> 产品1正常的发布1;产品1正常的发布3;产品1正常的里程碑发布5;产品1停止维护的里程碑发布6 -测试获取产品2下的发布roadmap >> 产品2发布!@#$$%^&*()测试发布的名称到底可以有多长asdlfkjla8 +测试获取产品2下的发布roadmap >> 产品2发布!@#$%^&*()测试发布的名称到底可以有多长asdlfkjla8 测试获取产品3下的发布roadmap >> 0 测试获取产品4下的发布roadmap >> 0 测试获取产品5下的发布roadmap >> 0 @@ -26,4 +26,4 @@ r($product->processRoadmapTest($productIDList[1])) && p('0:name') r($product->processRoadmapTest($productIDList[2])) && p() && e('0'); // 测试获取产品3下的发布roadmap r($product->processRoadmapTest($productIDList[3])) && p() && e('0'); // 测试获取产品4下的发布roadmap r($product->processRoadmapTest($productIDList[4])) && p() && e('0'); // 测试获取产品5下的发布roadmap -r($product->processRoadmapTest($productIDList[5])) && p() && e('0'); // 测试获取不存在产品下的发布roadmap +r($product->processRoadmapTest($productIDList[5])) && p() && e('0'); // 测试获取不存在产品下的发布roadmap \ No newline at end of file diff --git a/test/model/product/update.php b/test/model/product/update.php index b05ec1f565..8208b943e2 100755 --- a/test/model/product/update.php +++ b/test/model/product/update.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -36,4 +37,4 @@ r($product->updateObject('product', 2, $t_unname)) && p() && e(' r($product->updateObject('product', 2, $t_unid)) && p() && e('没有数据更新'); // 测试不更改产品代号 r($product->updateObject('product', 13, $t_repeaproduct)) && p('name:0') && e('『产品名称』已经有『jack』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试同一项目集下产品名称不能重复 r($product->updateObject('product', 13, $t_repeatid)) && p('code:0') && e('『产品代号』已经有『newcode2』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试同一项目集下产品代号不能重复 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/product/updateprojects.php b/test/model/product/updateprojects.php index b3baf23091..fafff4bdbc 100755 --- a/test/model/product/updateprojects.php +++ b/test/model/product/updateprojects.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -25,4 +26,4 @@ r($product->updateProjectsTest($productIDList[1])) && p('0:id,parent,path') r($product->updateProjectsTest($productIDList[2])) && p('0:id,parent,path') && e('0'); // 测试更新产品103的项目信息 r($product->updateProjectsTest($productIDList[3])) && p('0:id,parent,path;1:id,parent,path;2:id,parent,path;3:id,parent,path;4:id,parent,path') && e('733,1,,1,733,;734,1,,1,734,;735,1,,1,735,;736,1,,1,736,;737,1,,1,737,'); // 测试更新产品111的项目信息 r($product->updateProjectsTest($productIDList[4])) && p('0:id,parent,path;1:id,parent,path;2:id,parent,path;3:id,parent,path;4:id,parent,path') && e('738,1,,1,738,;739,1,,1,739,;740,1,,1,740,;741,1,,1,741,;742,1,,1,742,'); // 测试更新产品112的项目信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/batchchangestatus.php b/test/model/productplan/batchchangestatus.php index 3d03dc2808..f05ebd9774 100755 --- a/test/model/productplan/batchchangestatus.php +++ b/test/model/productplan/batchchangestatus.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -39,5 +40,5 @@ r($status6) && p('0:old') && e('doing'); //将planiID=4, 5的计划状态修改 r($status6) && p('0:new') && e('wait'); //将planiID=4, 5的计划状态修改回wait, 打印4的修改后的状态 r($status7) && p('0:old') && e('doing'); //将planiID=4, 5的计划状态修改回wait, 打印5的当前状态 r($status6) && p('0:new') && e('wait'); //将planiID=4, 5的计划状态修改回wait, 打印5的修改后的状态 -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/batchupdate.php b/test/model/productplan/batchupdate.php index a28ede7e26..4ae7a5142c 100755 --- a/test/model/productplan/batchupdate.php +++ b/test/model/productplan/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -97,5 +98,5 @@ r($batchUpdate3) && p('0:new') && e('list-3'); //当product=1时,传入正常参 r($batchUpdate4) && p('0:new') && e('list-4'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=4修改后的名字new r($batchUpdate5) && p('0:new') && e('list-5'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=5修改后的名字new r($batchUpdate6) && p('0:new') && e('list-6'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=6修改后的名字new -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/create.php b/test/model/productplan/create.php index eeef6ea9f0..b0c31f43af 100755 --- a/test/model/productplan/create.php +++ b/test/model/productplan/create.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -58,5 +59,5 @@ r($plan->create($noBeginEnd)) && p() && e('113'); r($plan->create($noUid)) && p() && e('114'); //测试不传UID的情况 r($plan->create($noProduct)) && p('product:0') && e('『产品』应当是数字。'); //测试不传关联产品的情况 r($plan->create($noParent)) && p('parent:0') && e('『父计划』应当是数字。'); //测试不传父级计划的情况 -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/getlist.php b/test/model/productplan/getlist.php index 389c040872..19d56cdb6f 100755 --- a/test/model/productplan/getlist.php +++ b/test/model/productplan/getlist.php @@ -40,4 +40,4 @@ r($dataList[4]) && p('3:id;3:product;3:status') && e('3;1;wait'); // r($dataList[5]) && p('101:id;101:product;101:status') && e('101;1;doing'); // 获取product=1的所有进行中的计划 r($dataList[6]) && p('103:id;103:product;103:status') && e('103;2;done'); // 获取product=2的所有已完成的计划 r($dataList[7]) && p('102:id;102:product;102:status') && e('102;1;closed'); // 获取product=1的所有已关闭的计划 -?> +?> \ No newline at end of file diff --git a/test/model/productplan/linkbug.php b/test/model/productplan/linkbug.php index 970c839396..50b493699e 100755 --- a/test/model/productplan/linkbug.php +++ b/test/model/productplan/linkbug.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -39,5 +40,5 @@ r($plan->linkBug($planID[0], $bugID[2])) && p() && e('0'); //传入不存在 r($plan->unlinkBug($planID[0], $unbugID[0])) && p() && e('0'); //解除bugid为1的关联关系 r($plan->unlinkBug($planID[0], $unbugID[1])) && p() && e('0'); //解除bugid为2的关联关系 r($plan->unlinkBug($planID[0], $unbugID[2])) && p() && e('0'); //解除不存在的id -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/linkstory.php b/test/model/productplan/linkstory.php index 14c05dd0d4..f470707c8a 100755 --- a/test/model/productplan/linkstory.php +++ b/test/model/productplan/linkstory.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -42,5 +43,5 @@ r($plan->linkStory($planID[2], $storyID[2])) && p() && e('0'); //传入不存在 #这里将另一个同类方法unlinkStory放在这里调用 r($plan->unlinkStory($unstoryID[0], $planID[0])) && p() && e('0'); //解除id为100关联需求4 r($plan->unlinkStory($unstoryID[1], $planID[1])) && p() && e('0'); //解除id为101关联需求8 -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/update.php b/test/model/productplan/update.php index 82eedba5a1..eab1982cae 100755 --- a/test/model/productplan/update.php +++ b/test/model/productplan/update.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -34,5 +35,5 @@ $late['end'] = '2021-10-10'; r($plan->update($planId[0], $posts)) && p('0:old') && e('1.1'); //修改planId=5的数据,打印出旧的名称 r($plan->update($planId[0], $posts)) && p('0:old') && e('0'); //二次修改旧的数据,由于数据发生变化,理应失败 r($plan->update($planId[0], $late)) && p('end') && e('父计划[5]的完成日期:2021-10-10,不能小于子计划的完成日期: 2021-10-26'); //测试传入结束时间小于开始时间的情况 -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/updateparentstatus.php b/test/model/productplan/updateparentstatus.php index c9504744b5..e29df768b0 100755 --- a/test/model/productplan/updateparentstatus.php +++ b/test/model/productplan/updateparentstatus.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -28,5 +29,5 @@ r($plan->updateParentStatus($parentid[0])) && p() && e('0'); //将id为1的计 r($plan->updateParentStatus($parentid[1])) && p() && e('1'); //将id为2的计划改为doing状态 r($plan->updateParentStatus($parentid[2])) && p() && e('1'); //将id为3的计划改为closed状态 r($plan->updateParentStatus($parentid[3])) && p() && e('1'); //将id为4的计划改为done状态 -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/productplan/updatestatus.php b/test/model/productplan/updatestatus.php index 83474ef0b2..50eab3ba54 100755 --- a/test/model/productplan/updatestatus.php +++ b/test/model/productplan/updatestatus.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -29,5 +30,5 @@ $planId[7] = 'activated'; r($plan->updateStatus($planId[0], $planId[1], $planId[4])) && p() && e('1'); //修改id=5的状态为doing r($plan->updateStatus($planId[0], $planId[2], $planId[5])) && p() && e('1'); //修改状态为done r($plan->updateStatus($planId[0], $planId[3], $planId[6])) && p() && e('1'); //修改状态为closed -system("./ztest init"); -?> \ No newline at end of file +?> +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/program/computeprogress.php b/test/model/program/computeprogress.php old mode 100644 new mode 100755 index 06f576510c..9879468852 --- a/test/model/program/computeprogress.php +++ b/test/model/program/computeprogress.php @@ -8,6 +8,12 @@ title=测试 programModel::create(); cid=1 pid=1 +传入任务数组,返回计算后的总消耗 >> 13 +传入任务数组,返回计算后的总预计 >> 15 +传入任务数组,返回计算后的总剩余 >> 7 +传入任务数组,返回计算后的总工时 >> 20 +传入任务数组,返回计算后的进度 >> 65 + */ global $tester; @@ -42,4 +48,4 @@ r($hours) && p('1:totalConsumed') && e('13'); // 传入任务数组,返回计 r($hours) && p('1:totalEstimate') && e('15'); // 传入任务数组,返回计算后的总预计 r($hours) && p('1:totalLeft') && e('7'); // 传入任务数组,返回计算后的总剩余 r($hours) && p('1:totalReal') && e('20'); // 传入任务数组,返回计算后的总工时 -r($hours) && p('1:progress') && e('65'); // 传入任务数组,返回计算后的进度 +r($hours) && p('1:progress') && e('65'); // 传入任务数组,返回计算后的进度 \ No newline at end of file diff --git a/test/model/program/create.php b/test/model/program/create.php index 948d580e5d..de144c8745 100755 --- a/test/model/program/create.php +++ b/test/model/program/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -58,4 +59,4 @@ r($program->create($emptyBeginProgram)) && p('message[begin]:0') && e(' r($program->create($emptyEndProgram)) && p('message[end]:0') && e('『计划完成』不能为空。'); // 项目集的完成时间为空 r($program->create($beginGtEndProgram)) && p('message[end]:0') && e('『计划完成』应当大于『2022-01-12』。'); // 项目集的计划完成时间大于计划开始时间 r($program->create($moreThanParent)) && p('message:begin;message:end') && e('父项目集的开始日期:2022-01-16,开始日期不能小于父项目集的开始日期'); // 项目集的完成日期大于父项目集的完成日期(需要实时更新日期) -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/program/createstakeholder.php b/test/model/program/createstakeholder.php index 36749a7f29..26d773a962 100755 --- a/test/model/program/createstakeholder.php +++ b/test/model/program/createstakeholder.php @@ -2,6 +2,7 @@ switchDB(); /** @@ -9,7 +10,8 @@ title=测试 programModel::createStakeholder(); cid=1 pid=1 -创建id=1的项目集的干系人dev1,dev2并查看。 >> dev2;dev1 +创建id=1的项目集的干系人并查看数量。 >> 2 +创建id=1的项目集的干系人dev1,dev2并查看Account。 >> dev2;dev1 */ @@ -22,4 +24,4 @@ $result = $tester->program->getStakeholdersByPrograms(1); r(count($result)) && p('') && e('2'); // 创建id=1的项目集的干系人并查看数量。 r($result) && p('0:account;1:account') && e('dev2;dev1'); // 创建id=1的项目集的干系人dev1,dev2并查看Account。 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/program/getbudgetleft.php b/test/model/program/getbudgetleft.php index 2aa2f16499..066cf1789f 100755 --- a/test/model/program/getbudgetleft.php +++ b/test/model/program/getbudgetleft.php @@ -9,7 +9,8 @@ title=测试 programModel::getBudgetLeft(); cid=1 pid=1 -查看父项目集id=1的预算剩余 >> 0 +查看项目11的所有父项目集的预算剩余 >> 900000 +查看项目12的所有父项目集的预算剩余 >> 899900 */ @@ -21,4 +22,4 @@ $result1 = $tester->program->getBudgetLeft($program1); $result2 = $tester->program->getBudgetLeft($program2); r($result) && p() && e('900000'); // 查看项目11的所有父项目集的预算剩余 -r($result) && p() && e('899900'); // 查看项目12的所有父项目集的预算剩余 +r($result) && p() && e('899900'); // 查看项目12的所有父项目集的预算剩余 \ No newline at end of file diff --git a/test/model/program/getbudgetunitlist.php b/test/model/program/getbudgetunitlist.php index 5c622370c5..367aa5677d 100755 --- a/test/model/program/getbudgetunitlist.php +++ b/test/model/program/getbudgetunitlist.php @@ -16,4 +16,4 @@ pid=1 global $tester; $tester->loadModel('project'); -r($tester->loadModel('program')->getBudgetUnitList()) && p('CNY;USD') && e('人民币;美元'); //获取货币类型列表 +r($tester->loadModel('program')->getBudgetUnitList()) && p('CNY;USD') && e('人民币;美元'); //获取货币类型列表 \ No newline at end of file diff --git a/test/model/program/getbyid.php b/test/model/program/getbyid.php index 4918252f70..d4ad8a1bb4 100755 --- a/test/model/program/getbyid.php +++ b/test/model/program/getbyid.php @@ -9,7 +9,7 @@ cid=1 pid=1 通过id字段获取id=1的项目集并验证它的name。 >> 项目集1 -通过id字段获取id=1000的项目集并验证它的name。 >> Not Found +通过id字段获取id=1000的项目集,返回空 >> 0 */ @@ -19,4 +19,4 @@ $program1 = $tester->program->getById(1); $program2 = $tester->program->getById(1000); r($program1) && p('name') && e('项目集1'); // 通过id字段获取id=1的项目集并验证它的name。 -r($program2) && p() && e('0'); // 通过id字段获取id=1000的项目集,返回空 +r($program2) && p() && e('0'); // 通过id字段获取id=1000的项目集,返回空 \ No newline at end of file diff --git a/test/model/program/getchildren.php b/test/model/program/getchildren.php index 8a8a156d03..61f6bb3ef8 100755 --- a/test/model/program/getchildren.php +++ b/test/model/program/getchildren.php @@ -11,7 +11,7 @@ pid=1 通过id查找id=1的子项目集个数 >> 9 通过id查找id=22的子项目集个数 >> 7 -通过id查找id=221的子项目集个数 >> Not Found +通过id查找id=221的子项目集个数 >> 0 */ @@ -20,4 +20,4 @@ $tester->loadModel('program'); r($tester->program->getChildren(1)) && p() && e('9'); // 通过id查找id=1的子项目集个数 r($tester->program->getChildren(22)) && p() && e('7'); // 通过id查找id=22的子项目集个数 -r($tester->program->getChildren(221)) && p() && e('0'); // 通过id查找id=221的子项目集个数 +r($tester->program->getChildren(221)) && p() && e('0'); // 通过id查找id=221的子项目集个数 \ No newline at end of file diff --git a/test/model/program/getinvolvedprograms.php b/test/model/program/getinvolvedprograms.php index f3a3fea74e..e593aaf7d8 100755 --- a/test/model/program/getinvolvedprograms.php +++ b/test/model/program/getinvolvedprograms.php @@ -9,8 +9,10 @@ title=测试 programModel::getInvolvedPrograms(); cid=1 pid=1 -查看用户admin可以看到的项目和执行id列表 >> 1 -查看用户test2可以看到的项目和执行id列表 >> 1 +获取admin参与的项目集数量 >> 2 +获取test2参与的项目集数量 >> 1 +获取admin参与的项目集ID >> 10 +获取test2参与的项目集ID >> 1 */ @@ -22,4 +24,4 @@ $test2Programs = $tester->program->getInvolvedPrograms('test2'); r(count($adminPrograms)) && p() && e('2'); // 获取admin参与的项目集数量 r(count($test2Programs)) && p() && e('1'); // 获取test2参与的项目集数量 r($adminPrograms) && p('10') && e('10'); // 获取admin参与的项目集ID -r($test2Programs) && p('1') && e('1'); // 获取test2参与的项目集ID +r($test2Programs) && p('1') && e('1'); // 获取test2参与的项目集ID \ No newline at end of file diff --git a/test/model/program/getkanbangroup.php b/test/model/program/getkanbangroup.php index a615bf6718..fc21900f8a 100755 --- a/test/model/program/getkanbangroup.php +++ b/test/model/program/getkanbangroup.php @@ -9,7 +9,9 @@ title=测试 programModel::getKanbanGroup(); cid=1 pid=1 -查看当前用户看板的其它项目 >> 项目集1 +查看当前用户负责的项目集看板数量 >> 2 +查看当前用户其他的项目集看板数量 >> 8 +查看当前用户其他的项目集看板详情 >> 项目集2 */ @@ -20,4 +22,4 @@ $kanbanGroup = $tester->program->getKanbanGroup(); r(count($kanbanGroup['my'])) && p('') && e('2'); //查看当前用户负责的项目集看板数量 r(count($kanbanGroup['others'])) && p('') && e('8'); //查看当前用户其他的项目集看板数量 -r($kanbanGroup['others']) && p('0:name') && e('项目集2'); //查看当前用户其他的项目集看板详情 +r($kanbanGroup['others']) && p('0:name') && e('项目集2'); //查看当前用户其他的项目集看板详情 \ No newline at end of file diff --git a/test/model/program/getlist.php b/test/model/program/getlist.php index eed70377c7..52270bda2a 100755 --- a/test/model/program/getlist.php +++ b/test/model/program/getlist.php @@ -10,15 +10,15 @@ title=测试 programModel::getList(); cid=1 pid=1 -查看所有项目和项目集的个数 >> 120 -查看分页后项目集和项目的个数 >> 10 -查看所有'closed'的项目和项目集的个数 >> 11 +查看所有项目和项目集的个数 >> 120 +查看分页后项目集和项目的个数 >> 10 +查看所有'closed'的项目和项目集的个数 >> 11 查看所有'suspended'的项目和项目集的个数 >> 11 -按照项目和项目集名称倒序获取第一个ID >> 9 -按照ID正序获取项目和项目集列表第一个ID >> 1 -获取顶级项目集个数 >> 30 -获取分页后顶级项目集个数 >> 10 -获取type=child 项目集个数 >> 120 +按照项目和项目集名称倒序获取第一个ID >> 9 +按照ID正序获取项目和项目集列表第一个ID >> 1 +获取顶级项目集个数 >> 30 +获取分页后顶级项目集个数 >> 10 +获取分页后顶级项目集个数 >> 120 */ @@ -45,4 +45,4 @@ r(key($namedescPrograms)) && p() && e('9'); // 按照项目和项目集名 r(key($idascPrograms)) && p() && e('1'); // 按照ID正序获取项目和项目集列表第一个ID r(count($topPrograms)) && p() && e('30'); // 获取顶级项目集个数 r(count($topPagePrograms)) && p() && e('10'); // 获取分页后顶级项目集个数 -r(count($childPrograms)) && p() && e('120'); // 获取分页后顶级项目集个数 +r(count($childPrograms)) && p() && e('120'); // 获取分页后顶级项目集个数 \ No newline at end of file diff --git a/test/model/program/getpairs.php b/test/model/program/getpairs.php index 2ed5e63d28..ed058ca61c 100755 --- a/test/model/program/getpairs.php +++ b/test/model/program/getpairs.php @@ -8,9 +8,9 @@ title=测试 programModel::getPairs(); cid=1 pid=1 +获取项目集个数 >> 6 获取项目集个数 >> 10 -获取项目集id/name 的关联数组 >> 项目集1 -获取项目集id/name 的关联数组 >> 项目集9 +获取项目集id为9的名称 >> 项目集9 */ @@ -22,4 +22,4 @@ $programs2 = $tester->program->getPairs('true'); r(count($programs1)) && p() && e('6'); // 获取项目集个数 r(count($programs2)) && p() && e('10'); // 获取项目集个数 r($programs1) && p('9') && e('项目集9'); // 获取项目集id为9的名称 -r($programs2) && p('11') && e(''); // 获取不存在的项目集 +r($programs2) && p('11') && e(''); // 获取不存在的项目集 \ No newline at end of file diff --git a/test/model/program/getpairsbylist.php b/test/model/program/getpairsbylist.php index 0619b837dc..d9214a7e73 100755 --- a/test/model/program/getpairsbylist.php +++ b/test/model/program/getpairsbylist.php @@ -29,4 +29,4 @@ r($program->getPairsByList($programIdList[2])) && p('1') && e('项目集1' r($program->getPairsByList($programIdList[3])) && p('1,2,3') && e('项目集1,项目集2,项目集3'); // 通过数组array(1,2,3)获取项目集名称 r($program->getPairsByList($programIdList[4])) && p('message') && e('Not Found'); // 通过id为空获取项目集名称 r($program->getPairsByList($programIdList[5])) && p('message') && e('Not Found'); // 通过id=0获取项目集名称 -r($program->getPairsByList($programIdList[6])) && p('message') && e('Not Found'); // 通过id=11获取项目集名称 +r($program->getPairsByList($programIdList[6])) && p('message') && e('Not Found'); // 通过id=11获取项目集名称 \ No newline at end of file diff --git a/test/model/program/getparentpairs.php b/test/model/program/getparentpairs.php index 03c6bfe6ab..a57e25883d 100755 --- a/test/model/program/getparentpairs.php +++ b/test/model/program/getparentpairs.php @@ -9,7 +9,9 @@ title=测试 programModel::getParentPairs(); cid=1 pid=1 - >> 11 +获取所有父项目集的数量 >> 7 +获取瀑布类型父项目集的数量 >> 1 +获取ID为1的父项目集的名称 >> /项目集1 */ @@ -20,4 +22,4 @@ $program2 = $tester->program->getParentPairs('waterfall'); r(count($program1)) && p() && e('7'); // 获取所有父项目集的数量 r(count($program2)) && p() && e('1'); // 获取瀑布类型父项目集的数量 -r($program1) && p('1') && e('/项目集1'); // 获取ID为1的父项目集的名称 +r($program1) && p('1') && e('/项目集1'); // 获取ID为1的父项目集的名称 \ No newline at end of file diff --git a/test/model/program/getparentpm.php b/test/model/program/getparentpm.php index ee90479d95..6438595743 100755 --- a/test/model/program/getparentpm.php +++ b/test/model/program/getparentpm.php @@ -9,7 +9,9 @@ title=测试 programModel::getParentPM(); cid=1 pid=1 -GetParentPM(). >> 0 +获取父项目集的负责人数量 >> 2 +获取父项目集的负责人account >> pm2 +获取父项目集的负责人account >> pm3 */ @@ -21,4 +23,4 @@ $parentPM = $tester->program->getParentPM($programIdList); r(count($parentPM)) && p() && e('2'); // 获取父项目集的负责人数量 r($parentPM) && p('12:pm2') && e('pm2'); // 获取父项目集的负责人account -r($parentPM) && p('13:pm3') && e('pm3'); // 获取父项目集的负责人account +r($parentPM) && p('13:pm3') && e('pm3'); // 获取父项目集的负责人account \ No newline at end of file diff --git a/test/model/program/getproductpairs.php b/test/model/program/getproductpairs.php index 856e041db4..d65c5f86b8 100755 --- a/test/model/program/getproductpairs.php +++ b/test/model/program/getproductpairs.php @@ -8,12 +8,10 @@ title=测试 programModel::getProductPairs(); cid=1 pid=1 +获取项目集1下的所有产品数量 >> 6 +根据项目集ID获取关联产品名字 >> 已关闭的正常产品24 +获取项目集1下的未关闭的产品数量 >> 4 根据项目或项目集ID获取关联产品详情 >> 已关闭的正常产品24 -获取不存在的项目或项目集 >> Not Found -根据项目或项目集指派情况获取关联产品详情 >> 正常产品1 -根据项目或项目集状态获取关联产品详情 >> 多平台产品90 -查看ID=1,有指派,所有状态的关联产品数量 >> 9 -查看ID=1,有指派,未关闭的关联产品数量 >> 5 */ @@ -27,4 +25,4 @@ r(count($products1)) && p() && e('6'); //获取项目集1下的所有产品 r($products1) && p('24') && e('已关闭的正常产品24'); //根据项目集ID获取关联产品名字 r(count($products2)) && p() && e('4'); //获取项目集1下的未关闭的产品数量 -r($products2) && p('24') && e('已关闭的正常产品24'); //根据项目或项目集ID获取关联产品详情 +r($products2) && p('24') && e('已关闭的正常产品24'); //根据项目或项目集ID获取关联产品详情 \ No newline at end of file diff --git a/test/model/program/getprogresslist.php b/test/model/program/getprogresslist.php index d4e95b04dd..3e5fdb0f6e 100755 --- a/test/model/program/getprogresslist.php +++ b/test/model/program/getprogresslist.php @@ -9,8 +9,8 @@ title=测试 programModee::getProgressList(); cid=1 pid=1 -获取项目和项目集的个数 >> 100 -获取id=1的项目的进度 >> 0 +获取项目和项目集的个数 >> 120 +获取id=1的项目的进度 >> 41 获取id=11的项目集的进度 >> 45 */ @@ -21,4 +21,4 @@ $progressList = $tester->program->getProgressList(); r(count($progressList)) && p() && e('120'); // 获取项目和项目集的个数 r($progressList) && p('1') && e('41'); // 获取id=1的项目的进度 -r($progressList) && p('11') && e('45'); // 获取id=11的项目集的进度 +r($progressList) && p('11') && e('45'); // 获取id=11的项目集的进度 \ No newline at end of file diff --git a/test/model/program/getprojectlist.php b/test/model/program/getprojectlist.php index 72acf45f83..d919f26e11 100755 --- a/test/model/program/getprojectlist.php +++ b/test/model/program/getprojectlist.php @@ -9,6 +9,14 @@ title=测试 programModel::getProjectList(); cid=1 pid=1 +获取所有项目列表数量 >> 110 +获取未完成项目列表数量 >> 88 +带项目集名称的项目列表数量 >> 88 +获取我参与的项目列表数量 >> 1 +不带项目集名称的项目名称 >> 项目2 +带项目集名称的项目名称 >> 项目集2/项目2 +我参与的项目的名称 >> 项目集1/项目1 + */ global $tester; @@ -25,4 +33,4 @@ r(count($withProgramProjects)) && p() && e('88'); // 带项 r(count($involvedProjects)) && p() && e('1'); // 获取我参与的项目列表数量 r($allProjects) && p('12:name') && e('项目2'); // 不带项目集名称的项目名称 r($withProgramProjects) && p('12:name') && e('项目集2/项目2'); // 带项目集名称的项目名称 -r($involvedProjects) && p('11:name') && e('项目集1/项目1'); // 我参与的项目的名称 +r($involvedProjects) && p('11:name') && e('项目集1/项目1'); // 我参与的项目的名称 \ No newline at end of file diff --git a/test/model/program/getprojectstats.php b/test/model/program/getprojectstats.php index 25f287ce8d..006020a677 100755 --- a/test/model/program/getprojectstats.php +++ b/test/model/program/getprojectstats.php @@ -9,13 +9,10 @@ title=测试 programModel::getProjectStats(); cid=1 pid=1 -查看当前项目集下所有未开始和进行中的项目的个数 >> 68 -查看当前项目集下所有状态为进行中的项目的个数 >> 44 -根据name倒序查看所有项目 >> 1 -根据id倒序查看所有项目的个数 >> 1 -查看所有项目(包含所属项目集名称) >> 项目1 -查看当前用户参与的项目 >> 项目1 -查看当前用户参与的项目的个数 >> 1 +查看当前项目集下所有未完成的项目的个数 >> 7 +查看当前项目集下所有未完成的项目的个数 >> 7 +查看当前项目集下所有未完成的项目按照id倒序排的第一个项目集信息 >> 91,项目81 +查看当前项目集下所有未完成的项目按照id正序排的第一个项目集信息 >> 12,项目2 */ @@ -27,4 +24,4 @@ $stats2 = $tester->program->getProjectStats(2, 'undone', 0, 'id_asc', null); r(count($stats1)) && p() && e('7'); // 查看当前项目集下所有未完成的项目的个数 r(count($stats2)) && p() && e('7'); // 查看当前项目集下所有未完成的项目的个数 r(current($stats1)) && p('id,name') && e('91,项目81'); // 查看当前项目集下所有未完成的项目按照id倒序排的第一个项目集信息 -r(current($stats2)) && p('id,name') && e('12,项目2'); // 查看当前项目集下所有未完成的项目按照id正序排的第一个项目集信息 +r(current($stats2)) && p('id,name') && e('12,项目2'); // 查看当前项目集下所有未完成的项目按照id正序排的第一个项目集信息 \ No newline at end of file diff --git a/test/model/program/getstakeholders.php b/test/model/program/getstakeholders.php index 705621c1a7..9b2b9dbf91 100755 --- a/test/model/program/getstakeholders.php +++ b/test/model/program/getstakeholders.php @@ -9,10 +9,10 @@ title=测试 programModel::getStakeholders(); cid=1 pid=1 -查看项目集2的干系人信息 >> 测试17 -根据干系人id倒序排序 >> 1 -根据干系人id正序排序 >> 1 -查看项目集2的干系人个数 >> 3 +获取干系人数量 >> 3 +获取干系人数量 >> 3 +id倒序排,获取第一个干系人真实姓名 >> 测试17 +id正序排,获取第一个干系人真实姓名 >> 测试19 */ @@ -24,4 +24,4 @@ $stakeholders2 = $tester->program->getStakeholders(2, 'id_asc'); r(count($stakeholders1)) && p() && e('3'); // 获取干系人数量 r(count($stakeholders2)) && p() && e('3'); // 获取干系人数量 r($stakeholders1) && p('0:realname') && e('测试17'); // id倒序排,获取第一个干系人真实姓名 -r($stakeholders2) && p('0:realname') && e('测试19'); // id正序排,获取第一个干系人真实姓名 +r($stakeholders2) && p('0:realname') && e('测试19'); // id正序排,获取第一个干系人真实姓名 \ No newline at end of file diff --git a/test/model/program/getstakeholdersbyprograms.php b/test/model/program/getstakeholdersbyprograms.php index c095dfdd73..44c4fd3bee 100755 --- a/test/model/program/getstakeholdersbyprograms.php +++ b/test/model/program/getstakeholdersbyprograms.php @@ -14,9 +14,9 @@ pid=1 获取项目集2的干系人名单 >> user17 获取项目集2和项目集3的干系人名单 >> user19 获取项目集2和项目集3的干系人名单 >> user18 -获取项目集2和项目集3的干系人名单... >> user17 +获取项目集2和项目集3的干系人名单 >> user17 获取项目集2的干系人个数 >> 3 -获取项目集2和项目集3的干系人个数 >> 6 +获取项目集2、3的干系人个数 >> 6 */ @@ -30,4 +30,4 @@ r($tester->program->getStakeholdersByPrograms('2,3')) && p('0:account') & r($tester->program->getStakeholdersByPrograms('2,3')) && p('1:account') && e('user18'); // 获取项目集2和项目集3的干系人名单 r($tester->program->getStakeholdersByPrograms('2,3')) && p('2:account') && e('user17'); // 获取项目集2和项目集3的干系人名单 r(count($tester->program->getStakeholdersByPrograms('2'))) && p('') && e('3'); // 获取项目集2的干系人个数 -r(count($tester->program->getStakeholdersByPrograms('2,3'))) && p('') && e('6'); // 获取项目集2、3的干系人个数 +r(count($tester->program->getStakeholdersByPrograms('2,3'))) && p('') && e('6'); // 获取项目集2、3的干系人个数 \ No newline at end of file diff --git a/test/model/program/getteammemberpairs.php b/test/model/program/getteammemberpairs.php index 7045e096e1..6d96e43d82 100755 --- a/test/model/program/getteammemberpairs.php +++ b/test/model/program/getteammemberpairs.php @@ -9,8 +9,10 @@ title=测试 programModel::getTeamMemberPairs(); cid=1 pid=1 -获取项目集下所有团队成员 >> P:产品经理92 -获取项目集下所有团队成员 >> 19 +获取项目集1下所有团队成员数量 >> 19 +获取项目集2下所有团队成员数量 >> 19 +获取项目集1下所有团队成员真实姓名 >> P:产品经理92 +获取项目集2下所有团队成员真实姓名 >> U:测试83 */ @@ -22,4 +24,4 @@ $teams2 = $tester->program->getTeamMemberPairs(2); r(count($teams1)) && p() && e('19'); // 获取项目集1下所有团队成员数量 r(count($teams2)) && p() && e('19'); // 获取项目集2下所有团队成员数量 r($teams1) && p('pm92') && e('P:产品经理92'); // 获取项目集1下所有团队成员真实姓名 -r($teams2) && p('user83') && e('U:测试83'); // 获取项目集2下所有团队成员真实姓名 +r($teams2) && p('user83') && e('U:测试83'); // 获取项目集2下所有团队成员真实姓名 \ No newline at end of file diff --git a/test/model/program/gettopbyid.php b/test/model/program/gettopbyid.php index 12d472e321..43673c1b15 100755 --- a/test/model/program/gettopbyid.php +++ b/test/model/program/gettopbyid.php @@ -11,7 +11,7 @@ cid=1 pid=1 获取项目集1最上级的项目集id >> 1 -获取项目集1000最上级的项目集id >> Not Found +获取项目集1000最上级的项目集id >> 0 */ @@ -21,4 +21,4 @@ $top1 = $tester->program->getTopByID(1); $top1000 = $tester->program->getTopByID(1000); r($top1) && p() && e('1'); //获取项目集1最上级的项目集id -r($top1000) && p() && e('0'); //获取项目集1000最上级的项目集id +r($top1000) && p() && e('0'); //获取项目集1000最上级的项目集id \ No newline at end of file diff --git a/test/model/program/gettoppairs.php b/test/model/program/gettoppairs.php index 30add3b6f9..1def059995 100755 --- a/test/model/program/gettoppairs.php +++ b/test/model/program/gettoppairs.php @@ -9,8 +9,9 @@ title=测试 programModel::getTopPairs(); cid=1 pid=1 -查看id=1的父项目集 >> 项目集1 -查看父项目集的个数 >> 6 +获取系统中所有顶级项目集数量 >> 10 +获取系统中所有未关闭的顶级项目集数量 >> 10 +获取系统中所有顶级项目集数量 >> 10 */ @@ -19,4 +20,4 @@ $tester->loadModel('program'); r(count($tester->program->getTopPairs())) && p() && e('10'); // 获取系统中所有顶级项目集数量 r(count($tester->program->getTopPairs('', 'noclosed'))) && p() && e('10'); // 获取系统中所有未关闭的顶级项目集数量 -r(count($tester->program->getTopPairs('', '', true))) && p() && e('10'); // 获取系统中所有顶级项目集数量 +r(count($tester->program->getTopPairs('', '', true))) && p() && e('10'); // 获取系统中所有顶级项目集数量 \ No newline at end of file diff --git a/test/model/program/gettoppath.php b/test/model/program/gettoppath.php old mode 100644 new mode 100755 index 426f94621b..9d64f94320 --- a/test/model/program/gettoppath.php +++ b/test/model/program/gettoppath.php @@ -9,6 +9,9 @@ title=测试 programModel::getTopPairs(); cid=1 pid=1 +传入一个path,返回最顶级path >> 2 +传入一个path,返回最顶级path >> 100 + */ global $tester; @@ -17,4 +20,4 @@ $path1 = ',2,3,4,'; $path2 = '100,101'; r($tester->program->getTopByPath($path1)) && p() && e('2'); // 传入一个path,返回最顶级path -r($tester->program->getTopByPath($path2)) && p() && e('100'); // 传入一个path,返回最顶级path +r($tester->program->getTopByPath($path2)) && p() && e('100'); // 传入一个path,返回最顶级path \ No newline at end of file diff --git a/test/model/program/gettreemenu.php b/test/model/program/gettreemenu.php old mode 100644 new mode 100755 index efd0c0f9ba..f73d77e4e4 --- a/test/model/program/gettreemenu.php +++ b/test/model/program/gettreemenu.php @@ -8,10 +8,12 @@ title=测试 programModel::getTreeMenu(); cid=1 pid=1 +查看返回的字符个数 >> 789 + */ global $tester; $tester->loadModel('program'); $programs1 = $tester->program->getTreeMenu(1); -r(strlen($programs1)) && p() && e('789'); // 查看返回的字符个数 +r(strlen($programs1)) && p() && e('789'); // 查看返回的字符个数 \ No newline at end of file diff --git a/test/model/program/hasunfinished.php b/test/model/program/hasunfinished.php index 4e616b1334..5a1cd2665c 100755 --- a/test/model/program/hasunfinished.php +++ b/test/model/program/hasunfinished.php @@ -9,7 +9,8 @@ title=测试 programModel::hasUnfinished(); cid=1 pid=1 -获取项目集1下未完成的项目和项目集 >> 9 +获取项目集1下未完成的项目和项目集数量 >> 9 +获取项目集2下未完成的项目和项目集数量 >> 7 */ @@ -19,4 +20,4 @@ $program1 = $tester->program->getById(1); $program2 = $tester->program->getById(2); r($tester->program->hasUnfinished($program1)) && p() && e('9'); // 获取项目集1下未完成的项目和项目集数量 -r($tester->program->hasUnfinished($program2)) && p() && e('7'); // 获取项目集2下未完成的项目和项目集数量 +r($tester->program->hasUnfinished($program2)) && p() && e('7'); // 获取项目集2下未完成的项目和项目集数量 \ No newline at end of file diff --git a/test/model/program/isclickable.php b/test/model/program/isclickable.php old mode 100644 new mode 100755 index e8019a13a7..3d8904c401 --- a/test/model/program/isclickable.php +++ b/test/model/program/isclickable.php @@ -9,7 +9,12 @@ title=测试 programModel::createStakeholder(); cid=1 pid=1 -创建id=1的项目集的干系人dev1,dev2并查看。 >> dev2;dev1 +传入项目集1,动作为closed,判断是否可点击 >> 1 +传入项目集1,动作为activate,判断是否可点击 >> 0 +传入项目集1,动作为suspend,判断是否可点击 >> 1 +传入项目集2,动作为closed,判断是否可点击 >> 1 +传入项目集2,动作为activate,判断是否可点击 >> 0 +传入项目集2,动作为activate,判断是否可点击 >> 1 */ @@ -24,4 +29,4 @@ r($tester->program->isClickable($program1, 'activate')) && p('') && e('0'); // r($tester->program->isClickable($program1, 'suspend')) && p('') && e('1'); // 传入项目集1,动作为suspend,判断是否可点击 r($tester->program->isClickable($program2, 'close')) && p('') && e('1'); // 传入项目集2,动作为closed,判断是否可点击 r($tester->program->isClickable($program2, 'activate')) && p('') && e('0'); // 传入项目集2,动作为activate,判断是否可点击 -r($tester->program->isClickable($program2, 'suspend')) && p('') && e('1'); // 传入项目集2,动作为activate,判断是否可点击 +r($tester->program->isClickable($program2, 'suspend')) && p('') && e('1'); // 传入项目集2,动作为activate,判断是否可点击 \ No newline at end of file diff --git a/test/model/program/settreepath.php b/test/model/program/settreepath.php index 91d6381257..689014342c 100755 --- a/test/model/program/settreepath.php +++ b/test/model/program/settreepath.php @@ -9,7 +9,8 @@ title=测试 programModel::setTreePath(); cid=1 pid=1 -查找id=12的项目集的path >> ,2,12, +设置之前的项目集的path >> ,2,12, +设置之后的项目集的path >> ,2,12, */ @@ -22,4 +23,4 @@ $after = $tester->program->getById(12); r($before) && p('path') && e(',2,12,'); // 设置之前的项目集的path r($after) && p('path') && e(',2,12,'); // 设置之后的项目集的path -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/program/update.php b/test/model/program/update.php index 15103dbf8e..092cedf741 100755 --- a/test/model/program/update.php +++ b/test/model/program/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,12 @@ title=测试 programModel::update(); cid=1 pid=1 -更新id为10的项目集信息 >> 测试更新项目集十 -更新项目集名称为空时 >> 『项目集名称』不能为空。 +正常更新项目集的情况 >> 测试更新项目集十 +更新项目集名称为空时 >> 『项目集名称』不能为空。 当计划开始为空时更新项目集信息 >> 『计划开始』不能为空。 当计划完成为空时更新项目集信息 >> 『计划完成』不能为空。 -父项目集的开始日期大于子项目集的开始日期时 >> 子项目集的最小开始日期:2022-03-26,父项目集的开始日期不能大于子项目集的最小开始日期 -项目集开始时间小于父项目集时 >> 父项目集的开始日期:2022-03-26,开始日期不能小于父项目集的开始日期;父项目集的完成日期:2022-06-02,完成日期不能大于父项目集的完成日期 +父项目集的开始日期大于子项目集的开始日期时 >> 子项目集的最小开始日期:2022-02-01,父项目集的开始日期不能大于子项目集的最小开始日期 +项目集开始、结束日期和子项目不符的情况 >> 父项目集的开始日期:2022-03-26,开始日期不能小于父项目集的开始日期;父项目集的完成日期:2022-06-02,完成日期不能大于父项目集的完成日期 更新未开始的项目集实际开始时间 >> doing */ @@ -63,4 +64,4 @@ r($program->update(10, $emptyEndProgram)) && p('message:end') r($program->update(10, $beginGtEndProgram)) && p('message:begin') && e('子项目集的最小开始日期:2022-02-01,父项目集的开始日期不能大于子项目集的最小开始日期'); // 父项目集的开始日期大于子项目集的开始日期时 r($program->update(10, $beginLtParentProgram)) && p('message:begin;message:end') && e('父项目集的开始日期:2022-03-26,开始日期不能小于父项目集的开始日期;父项目集的完成日期:2022-06-02,完成日期不能大于父项目集的完成日期'); // 项目集开始、结束日期和子项目不符的情况 r($program->update(10, $realBeganProgram)) && p('status') && e('doing'); // 更新未开始的项目集实际开始时间 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/programplan/create.php b/test/model/programplan/create.php index 88dd944e42..b22f170d6e 100755 --- a/test/model/programplan/create.php +++ b/test/model/programplan/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -53,4 +54,4 @@ r($programplan->createTest($errorEnd)) && p() && e("阶段的结束时间 r($programplan->createTest($percentOver)) && p() && e('工作量占比累计不应当超过100%'); // 测试创建用例 工作量占比之和大于100 r($programplan->createTest()) && p() && e('7'); // 测试正常更新阶段信息 获取阶段数量 r($programplan->createTest($create)) && p() && e('8'); // 测试正常创建一条阶段信息 获取阶段数量 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/programplan/update.php b/test/model/programplan/update.php index 4530074a62..edb3408072 100755 --- a/test/model/programplan/update.php +++ b/test/model/programplan/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -43,4 +44,4 @@ r($programplan->updateTest($planID, $projectID, $changeName)) && p(' r($programplan->updateTest($planID, $projectID, $changePercent)) && p('0:field,new') && e('percent,15'); // 测试修改plan的 percent 值 r($programplan->updateTest($planID, $projectID, $changeBegin)) && p('0:field,new') && e('begin,2022-04-01'); // 测试修改plan的 begin 值 r($programplan->updateTest($planID, $projectID, $changeEnd)) && p('0:field,new') && e('end,2022-04-30'); // 测试修改plan的 end 值 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/activate.php b/test/model/project/activate.php index 2aaea526f7..f0997052c7 100755 --- a/test/model/project/activate.php +++ b/test/model/project/activate.php @@ -9,8 +9,8 @@ title=测试 projectModel->activate(); cid=1 pid=1 -开始id为66状态不是closed的项目 >> 1 -开始id为67状态是closed的项目 >> 0 +激活id为66状态是closed的项目 >> status,closed,doing +激活id为73状态是suspended的项目 >> status,suspended,doing */ @@ -22,4 +22,4 @@ $changes2 = $tester->project->activate(73); r($changes1) && p('1:field,old,new') && e('status,closed,doing'); // 激活id为66状态是closed的项目 r($changes2) && p('1:field,old,new') && e('status,suspended,doing'); // 激活id为73状态是suspended的项目 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/batchupdate.php b/test/model/project/batchupdate.php old mode 100644 new mode 100755 index c798c2147a..1edadaa981 --- a/test/model/project/batchupdate.php +++ b/test/model/project/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,10 @@ title=测试taskModel->batchUpdate(); cid=1 pid=1 +查看被编辑了的项目数量 >> 3 +查看被编辑了的项目11详情 >> 批量修改项目11,1,admin,2022-02-08,open +查看被编辑了的项目12详情 >> 批量修改项目12,2,,2022-03-05,private + */ $project = new Project(); @@ -29,4 +34,4 @@ $projects = $project->batchUpdate($data); r(count($projects)) && p() && e('3'); // 查看被编辑了的项目数量 r($projects) && p('11:name,parent,PM,begin,acl') && e('批量修改项目11,1,admin,2022-02-08,open'); // 查看被编辑了的项目11详情 r($projects) && p('12:name,parent,PM,begin,acl') && e('批量修改项目12,2,,2022-03-05,private'); // 查看被编辑了的项目12详情 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/buildmenuquery.php b/test/model/project/buildmenuquery.php old mode 100644 new mode 100755 index 26d9f1f57e..5cc8ac7af1 --- a/test/model/project/buildmenuquery.php +++ b/test/model/project/buildmenuquery.php @@ -9,10 +9,13 @@ title=测试 projectModel->buildMenuQuery(); cid=1 pid=1 +获取构建的查询项目的sql的字符串长度 >> 231 +获取构建的查询项目的sql的字符串长度 >> 233 + */ global $tester; $tester->loadModel('project'); r(strlen($tester->project->buildMenuQuery(11))) && p() && e('231'); // 获取构建的查询项目的sql的字符串长度 -r(strlen($tester->project->buildMenuQuery(100))) && p() && e('233'); // 获取构建的查询项目的sql的字符串长度 +r(strlen($tester->project->buildMenuQuery(100))) && p() && e('233'); // 获取构建的查询项目的sql的字符串长度 \ No newline at end of file diff --git a/test/model/project/checkcanchangemodel.php b/test/model/project/checkcanchangemodel.php old mode 100644 new mode 100755 index 5188fb328d..fad6478a81 --- a/test/model/project/checkcanchangemodel.php +++ b/test/model/project/checkcanchangemodel.php @@ -9,10 +9,13 @@ title=测试 projectModel->checkCanChangeModel(); cid=1 pid=1 +查看ID为11的敏捷项目是否可切换项目管理模型 >> 0 +查看ID为41的瀑布项目是否可切换项目管理模型 >> 0 + */ global $tester; $tester->loadModel('project'); r($tester->project->checkCanChangeModel(11, 'scrum')) && p() && e('0'); // 查看ID为11的敏捷项目是否可切换项目管理模型 -r($tester->project->checkCanChangeModel(41, 'waterfall')) && p() && e('0'); // 查看ID为41的瀑布项目是否可切换项目管理模型 +r($tester->project->checkCanChangeModel(41, 'waterfall')) && p() && e('0'); // 查看ID为41的瀑布项目是否可切换项目管理模型 \ No newline at end of file diff --git a/test/model/project/checkhaschildren.php b/test/model/project/checkhaschildren.php index 646ee19b36..d4fd3638b6 100755 --- a/test/model/project/checkhaschildren.php +++ b/test/model/project/checkhaschildren.php @@ -19,4 +19,4 @@ $project = new Project('admin'); $getID = array(1, 101); r($project->checkHasChildren($getID[0])) && p() && e('1'); //获取id为1的项目是否有子项目 -r($project->checkHasChildren($getID[1])) && p() && e('0'); //获取id为101的项目是否有子项目 +r($project->checkHasChildren($getID[1])) && p() && e('0'); //获取id为101的项目是否有子项目 \ No newline at end of file diff --git a/test/model/project/close.php b/test/model/project/close.php index 5c99ab39d0..d0b04ebcd9 100755 --- a/test/model/project/close.php +++ b/test/model/project/close.php @@ -9,9 +9,9 @@ title=测试 projectModel->close(); cid=1 pid=1 -关闭id为20状态不是closed的项目 >> 1 -关闭id为26状态是closed的项目 >> 0 -关闭id为41状态是suspended的项目 >> 0 +关闭id为20状态不是closed的项目 >> status,wait,closed +关闭id为26状态是closed的项目 >> closedBy,,admin +关闭id为41状态是suspended的项目 >> status,suspended,closed */ @@ -27,4 +27,4 @@ $changes3 = $tester->project->close(33); r($changes1) && p('1:field,old,new') && e('status,wait,closed'); // 关闭id为20状态不是closed的项目 r($changes2) && p('1:field,old,new') && e('closedBy,,admin'); // 关闭id为26状态是closed的项目 r($changes3) && p('1:field,old,new') && e('status,suspended,closed'); // 关闭id为41状态是suspended的项目 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/computerprogress.php b/test/model/project/computerprogress.php old mode 100644 new mode 100755 index 7bec97055a..f3ceff0452 --- a/test/model/project/computerprogress.php +++ b/test/model/project/computerprogress.php @@ -9,6 +9,10 @@ title=测试 projectModel->computerProgress(); cid=1 pid=1 +查看项目11下的所有执行的数量 >> 7 +查看计算后的执行工时汇总信息 >> 10,3,10,23.08,13 +查看计算后的执行工时汇总信息 >> 1,3,1,75,4 + */ global $tester; @@ -20,4 +24,4 @@ $executions = $tester->project->computerProgress($executions); r(count($executions)) && p('') && e('7'); // 查看项目11下的所有执行的数量 r($executions) && p('551:totalEstimate,totalConsumed,totalLeft,progress,totalReal') && e('10,3,10,23.08,13'); // 查看计算后的执行工时汇总信息 -r($executions) && p('641:totalEstimate,totalConsumed,totalLeft,progress,totalReal') && e('1,3,1,75,4'); // 查看计算后的执行工时汇总信息 +r($executions) && p('641:totalEstimate,totalConsumed,totalLeft,progress,totalReal') && e('1,3,1,75,4'); // 查看计算后的执行工时汇总信息 \ No newline at end of file diff --git a/test/model/project/create.php b/test/model/project/create.php old mode 100644 new mode 100755 index d1c1e52250..958871cded --- a/test/model/project/create.php +++ b/test/model/project/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -12,10 +13,10 @@ pid=1 创建新项目 >> 测试新增项目一 项目名称为空时 >> 『项目名称』不能为空。 -项目的开始时间为空 >> 『计划开始』不能为空。 项目的完成时间为空 >> 『计划完成』不能为空。 -项目的计划完成时间大于计划开始时间 >> 『计划完成』应当大于『2022-01-12』。 -项目的完成日期大于父项目的完成日期(需要实时更新日期) >> 父项目的开始日期:2022-01-16,开始日期不能小于父项目的开始日期 +项目的计划完成时间大于计划开始时间 >> 『计划完成』应当大于『2022-02-07』。 +项目的开始时间为空 >> 项目集的最小开始日期:2022-02-07,项目的开始日期不能小于项目集的最小开始日期 +项目的完成日期大于父项目的完成日期(需要实时更新日期) >> 项目集的最小开始日期:2022-02-07,项目的开始日期不能小于项目集的最小开始日期; */ @@ -61,4 +62,4 @@ r($project->create($emptyEndProject)) && p('message[end]:0') && e(' r($project->create($beginGtEndProject)) && p('message[end]:0') && e('『计划完成』应当大于『2022-02-07』。'); // 项目的计划完成时间大于计划开始时间 r($project->create($emptyBeginProject)) && p('message:begin') && e('项目集的最小开始日期:2022-02-07,项目的开始日期不能小于项目集的最小开始日期'); // 项目的开始时间为空 r($project->create($moreThanParent)) && p('message:begin;message:end') && e('项目集的最小开始日期:2022-02-07,项目的开始日期不能小于项目集的最小开始日期;'); // 项目的完成日期大于父项目的完成日期(需要实时更新日期) -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/getbranchesbyproject.php b/test/model/project/getbranchesbyproject.php old mode 100644 new mode 100755 index 6550b8eff8..c75ce71935 --- a/test/model/project/getbranchesbyproject.php +++ b/test/model/project/getbranchesbyproject.php @@ -9,6 +9,10 @@ title=测试 projectModel->getBranchesByProject(); cid=1 pid=1 +获取id为11的项目的关联产品的分支数组数量,按产品分组 >> 3 +获取id为11的项目的关联产品的分支数组,获取第一个数组的键 >> 1 +获取id为12的项目的关联产品的分支数组数量,按产品分组 >> 3 + */ global $tester; @@ -18,4 +22,4 @@ $projectIdList = array(11, 12, 13); r(count($tester->project->getBranchesByProject(11))) && p('') && e('3'); // 获取id为11的项目的关联产品的分支数组数量,按产品分组 r(key($tester->project->getBranchesByProject(11))) && p('') && e('1'); // 获取id为11的项目的关联产品的分支数组,获取第一个数组的键 -r(count($tester->project->getBranchesByProject(12))) && p('') && e('3'); // 获取id为12的项目的关联产品的分支数组数量,按产品分组 +r(count($tester->project->getBranchesByProject(12))) && p('') && e('3'); // 获取id为12的项目的关联产品的分支数组数量,按产品分组 \ No newline at end of file diff --git a/test/model/project/getbranchgroupbyproject.php b/test/model/project/getbranchgroupbyproject.php old mode 100644 new mode 100755 index 26ac63c1b0..55080ac2eb --- a/test/model/project/getbranchgroupbyproject.php +++ b/test/model/project/getbranchgroupbyproject.php @@ -9,6 +9,10 @@ title=测试 projectModel->getBranchGroupByProject(); cid=1 pid=1 +获取id为11的项目的关联产品的分支数组数量,按产品分组 >> 1 +获取id为11的项目的关联产品的分支数组,获取第一个数组的键 >> 2 +获取id为12的项目的关联产品的分支数组数量,按产品分组 >> 1 + */ global $tester; @@ -18,4 +22,4 @@ $productIdList = array(1, 2, 3); r(count($tester->project->getBranchGroupByProject(11, $productIdList))) && p('') && e('1'); // 获取id为11的项目的关联产品的分支数组数量,按产品分组 r(key($tester->project->getBranchGroupByProject(12, $productIdList))) && p('') && e('2'); // 获取id为11的项目的关联产品的分支数组,获取第一个数组的键 -r(count($tester->project->getBranchGroupByProject(13, $productIdList))) && p('') && e('1'); // 获取id为12的项目的关联产品的分支数组数量,按产品分组 +r(count($tester->project->getBranchGroupByProject(13, $productIdList))) && p('') && e('1'); // 获取id为12的项目的关联产品的分支数组数量,按产品分组 \ No newline at end of file diff --git a/test/model/project/getbrotherprojects.php b/test/model/project/getbrotherprojects.php old mode 100644 new mode 100755 index cf77573f70..4d77dba8df --- a/test/model/project/getbrotherprojects.php +++ b/test/model/project/getbrotherprojects.php @@ -11,7 +11,7 @@ cid=1 pid=1 获取项目id为11同一个项目集下的所有项目个数 >> 9 -获取id为731的顶级项目兄弟项目个数 >> 1 +获取id为731的顶级项目兄弟项目个数 >> 1 */ @@ -25,4 +25,4 @@ $projectInst = $project->project->getById(731); $depProjects = $project->getBrotherProjectsTest($projectInst); r(count($programProjects)) && p() && e('9'); // 获取项目id为11同一个项目集下的所有项目个数 -r(count($depProjects)) && p() && e('1'); // 获取id为731的顶级项目兄弟项目个数 +r(count($depProjects)) && p() && e('1'); // 获取id为731的顶级项目兄弟项目个数 \ No newline at end of file diff --git a/test/model/project/getbudgetunitlist.php b/test/model/project/getbudgetunitlist.php index db6ab2efc9..2bbd823954 100755 --- a/test/model/project/getbudgetunitlist.php +++ b/test/model/project/getbudgetunitlist.php @@ -8,11 +8,11 @@ title=测试 projectModel::getBudgetUnitList(); cid=1 pid=1 -检查翻译 >> 1 +获取系统中的货币单位 >> 人民币,美元 */ global $tester; $tester->loadModel('project'); -r($tester->project->getBudgetUnitList()) && p('CNY,USD') && e('人民币,美元'); //获取系统中的货币单位 +r($tester->project->getBudgetUnitList()) && p('CNY,USD') && e('人民币,美元'); //获取系统中的货币单位 \ No newline at end of file diff --git a/test/model/project/getbyid.php b/test/model/project/getbyid.php index b82ad63236..56eac3864f 100755 --- a/test/model/project/getbyid.php +++ b/test/model/project/getbyid.php @@ -34,4 +34,4 @@ r($tester->project->getByID(0, 'sprint')) && p('code,type') && e('0'); r($tester->project->getByID(131, 'stage')) && p('code,type') && e('project31,stage'); //获取ID等于131的阶段 r($tester->project->getByID(0, 'stage')) && p('code,type') && e('0'); //获取不存在的阶段 r($tester->project->getByID(161, 'kanban')) && p('code,type') && e('project61,kanban'); //获取ID等于161的阶段 -r($tester->project->getByID(0, 'kanban')) && p('code,type') && e('0'); //获取不存在的看板 +r($tester->project->getByID(0, 'kanban')) && p('code,type') && e('0'); //获取不存在的看板 \ No newline at end of file diff --git a/test/model/project/getbyidlist.php b/test/model/project/getbyidlist.php index 51eafaf97f..701e28ea0e 100755 --- a/test/model/project/getbyidlist.php +++ b/test/model/project/getbyidlist.php @@ -17,4 +17,4 @@ global $tester; $tester->loadModel('project'); $projectIdList = array(11,12,13); -r(($tester->project->getByIdList($projectIdList))) && p('11:name;12:name;13:name') && e('项目1;项目2;项目3'); //获取projectIdList对应的项目名称 +r(($tester->project->getByIdList($projectIdList))) && p('11:name;12:name;13:name') && e('项目1;项目2;项目3'); //获取projectIdList对应的项目名称 \ No newline at end of file diff --git a/test/model/project/getinfolist.php b/test/model/project/getinfolist.php index 2e0159c408..4b4fbd8fa8 100755 --- a/test/model/project/getinfolist.php +++ b/test/model/project/getinfolist.php @@ -9,11 +9,11 @@ title=测试 projectModel::getInfoList; cid=1 pid=1 -查询正在进行的项目 >> 0 -查询等待状态的项目 >> 项目1 -查询暂停状态的项目 >> 0 -查询关闭状态的项目 >> 0 -查询所有状态的项目 >> 项目1 +查询正在进行的项目数量 >> 44 +查询wait状态的Id为11的项目名称 >> 项目1 +查询暂停状态的项目数量 >> 11 +查询关闭状态的项目数量 >> 11 +查询所有状态的项目数量 >> 110 */ @@ -30,4 +30,4 @@ r(count($doingProjects)) && p() && e('44'); //查询正在进行 r($waitProjects) && p('11:name') && e('项目1'); //查询wait状态的Id为11的项目名称 r(count($suspendedProjects)) && p() && e('11'); //查询暂停状态的项目数量 r(count($closedProjects)) && p() && e('11'); //查询关闭状态的项目数量 -r(count($allProjects)) && p() && e('110'); //查询所有状态的项目数量 +r(count($allProjects)) && p() && e('110'); //查询所有状态的项目数量 \ No newline at end of file diff --git a/test/model/project/getmembers2import.php b/test/model/project/getmembers2import.php old mode 100644 new mode 100755 index eaa12278e9..68c15a9406 --- a/test/model/project/getmembers2import.php +++ b/test/model/project/getmembers2import.php @@ -9,6 +9,9 @@ title=测试 projectModel->getMembers2Import(); cid=1 pid=1 +获取id为11的项目团队成员个数,排除admin >> 1 +获取id为11的项目团队成员的角色 >> 产品经理92 + */ global $tester; @@ -17,4 +20,4 @@ $tester->loadModel('project'); $members = $tester->project->getMembers2Import(11, array('admin')); r(count($members)) && p() && e('1'); // 获取id为11的项目团队成员个数,排除admin -r($members) && p('pm92:role') && e('产品经理92'); // 获取id为11的项目团队成员的角色 +r($members) && p('pm92:role') && e('产品经理92'); // 获取id为11的项目团队成员的角色 \ No newline at end of file diff --git a/test/model/project/getmultilinkedproducts.php b/test/model/project/getmultilinkedproducts.php old mode 100644 new mode 100755 index 93ca8be7e7..33d70149c1 --- a/test/model/project/getmultilinkedproducts.php +++ b/test/model/project/getmultilinkedproducts.php @@ -9,6 +9,10 @@ title=测试 projectModel::getInfoList; cid=1 pid=1 +查询项目1的关联产品数量 >> 0 +查询项目11的关联产品数量 >> 3 +查询项目11关联的产品名称 >> 正常产品1,多平台产品91,多平台产品81 + */ global $tester; @@ -19,4 +23,4 @@ $products2 = $tester->project->getMultiLinkedProducts(11); r(count($products1)) && p() && e('0'); //查询项目1的关联产品数量 r(count($products2)) && p() && e('3'); //查询项目11的关联产品数量 -r($products2) && p('1,91,81') && e('正常产品1,多平台产品91,多平台产品81'); //查询项目11关联的产品名称 +r($products2) && p('1,91,81') && e('正常产品1,多平台产品91,多平台产品81'); //查询项目11关联的产品名称 \ No newline at end of file diff --git a/test/model/project/getoverviewlist.php b/test/model/project/getoverviewlist.php index e4ef52b1c7..0e028eb4e1 100755 --- a/test/model/project/getoverviewlist.php +++ b/test/model/project/getoverviewlist.php @@ -9,12 +9,12 @@ title=测试 projectModel::getOverviewList; cid=1 pid=1 -获取未开始的项目 >> 15 -获取状态不为done和closed的项目 >> 15 -根据项目ID获取项目详情 >> 11 +获取未开始的项目数量 >> 15 +获取状态不为done和closed的项目数量 >> 15 +根据项目ID获取项目 >> 1 获取不存在的项目 >> 0 -按照ID正序获取项目列表 >> 1 -按照项目名称倒序获取项目列表 >> 1 +按照ID正序获取项目列表,查看排第一个的项目详情 >> 11,项目1 +按照项目名称倒序获取项目列表,查看排第一个的项目详情 >> 100,项目90 */ @@ -35,4 +35,4 @@ r(count($byStatus2)) && p() && e('15'); // 获取状态不为d r(count($byId1)) && p() && e('1'); // 根据项目ID获取项目 r(count($byId2)) && p() && e('0'); // 获取不存在的项目 r(current($byOrder1)) && p('id,name') && e('11,项目1'); // 按照ID正序获取项目列表,查看排第一个的项目详情 -r(current($byOrder2)) && p('id,name') && e('100,项目90'); // 按照项目名称倒序获取项目列表,查看排第一个的项目详情 +r(current($byOrder2)) && p('id,name') && e('100,项目90'); // 按照项目名称倒序获取项目列表,查看排第一个的项目详情 \ No newline at end of file diff --git a/test/model/project/getpairsbyidlist.php b/test/model/project/getpairsbyidlist.php index 309885c4ee..bc5c163b1e 100755 --- a/test/model/project/getpairsbyidlist.php +++ b/test/model/project/getpairsbyidlist.php @@ -9,8 +9,8 @@ title=测试 projectModel->getPairsByIdList(); cid=1 pid=1 -查找ID为0、11、12、13的项目 >> 3 -查找所有项目 >> 90 +查找ID为0、11、12、13的项目数量 >> 3 +查找所有项目数量 >> 110 */ @@ -19,4 +19,4 @@ $tester->loadModel('project'); $projectIdList = array(0, 11, 12, 13); r(count($tester->project->getPairsByIdList($projectIdList))) && p() && e('3'); //查找ID为0、11、12、13的项目数量 -r(count($tester->project->getPairsByIdList(array()))) && p() && e('110'); //查找所有项目数量 +r(count($tester->project->getPairsByIdList(array()))) && p() && e('110'); //查找所有项目数量 \ No newline at end of file diff --git a/test/model/project/getpairsbymodel.php b/test/model/project/getpairsbymodel.php old mode 100644 new mode 100755 index f1528f851e..04dd4b452f --- a/test/model/project/getpairsbymodel.php +++ b/test/model/project/getpairsbymodel.php @@ -9,6 +9,10 @@ title=测试 projectModel->getPairsByModel(); cid=1 pid=1 +获取项目集1下的所有项目数量 >> 9 +获取项目集1下的项目名称 >> 项目集1 / 项目11 +获取项目集1下的所有瀑布项目数量 >> 3 + */ global $tester; @@ -16,4 +20,4 @@ $tester->loadModel('project'); r(count($tester->project->getPairsByModel('all', 1))) && p() && e('9'); // 获取项目集1下的所有项目数量 r($tester->project->getPairsByModel('all', 1)) && p('21') && e('项目集1 / 项目11'); // 获取项目集1下的项目名称 -r(count($tester->project->getPairsByModel('waterfall', 1))) && p() && e('3'); // 获取项目集1下的所有瀑布项目数量 +r(count($tester->project->getPairsByModel('waterfall', 1))) && p() && e('3'); // 获取项目集1下的所有瀑布项目数量 \ No newline at end of file diff --git a/test/model/project/getpairsbyprogram.php b/test/model/project/getpairsbyprogram.php index 216aba2df7..6f8063fabf 100755 --- a/test/model/project/getpairsbyprogram.php +++ b/test/model/project/getpairsbyprogram.php @@ -9,6 +9,12 @@ title=测试 projectModel->getPairsByProgram(); cid=1 pid=1 +查找管理员可查看的所有项目数量 >> 110 +查找独立项目数量 >> 20 +查找管理员可查看的所属项目集ID为1的项目数量 >> 9 +查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 >> 3 +查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 >> 9 + */ global $tester; @@ -20,4 +26,4 @@ r(count($tester->project->getPairsByProgram('', 'all', true))) && p() && e('110' r(count($tester->project->getPairsByProgram(0))) && p() && e('20'); // 查找独立项目数量 r(count($tester->project->getPairsByProgram(1))) && p() && e('9'); // 查找管理员可查看的所属项目集ID为1的项目数量 r(count($tester->project->getPairsByProgram(1, 'wait'))) && p() && e('3'); // 查找管理员可查看的所属项目集ID为1且状态为wait的项目数量 -r(count($tester->project->getPairsByProgram(1, 'noclosed'))) && p() && e('9'); // 查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 +r(count($tester->project->getPairsByProgram(1, 'noclosed'))) && p() && e('9'); // 查找管理员可查看的所属项目集ID为1且状态不为closed的项目数量 \ No newline at end of file diff --git a/test/model/project/getparentprogram.php b/test/model/project/getparentprogram.php old mode 100644 new mode 100755 index 652287553a..5677abd79d --- a/test/model/project/getparentprogram.php +++ b/test/model/project/getparentprogram.php @@ -10,8 +10,7 @@ cid=1 pid=1 获取id为11的项目父项目名字 >> 项目集1 -获取id为1的项目父项目名字 >> 项目集1 -获取id为0的项目父项目名字 >> 0 +获取id为1的项目父项目名字 >> 0 */ @@ -22,4 +21,4 @@ $project1 = $tester->project->getById(11); $project2 = $tester->project->getById(1); r($tester->project->getParentProgram($project1)) && p('name') && e('项目集1'); // 获取id为11的项目父项目名字 -r($tester->project->getParentProgram($project2)) && p('name') && e('0'); // 获取id为1的项目父项目名字 +r($tester->project->getParentProgram($project2)) && p('name') && e('0'); // 获取id为1的项目父项目名字 \ No newline at end of file diff --git a/test/model/project/getprojectsconsumed.php b/test/model/project/getprojectsconsumed.php index ed1bb44432..4e9ea441f2 100755 --- a/test/model/project/getprojectsconsumed.php +++ b/test/model/project/getprojectsconsumed.php @@ -9,6 +9,10 @@ title=测试 projectModel::getProjectsConsumed; cid=1 pid=1 +批量获取各个项目的总计消耗工时 >> 21.0 +批量获取各个项目的总计消耗工时 >> 28.0 +批量获取各个项目的总计消耗工时 >> 35.0 + */ global $tester; @@ -18,4 +22,4 @@ $projectIdList = array(11, 12, 13); r($tester->project->getProjectsConsumed($projectIdList)) && p('11:totalConsumed') && e('21.0'); // 批量获取各个项目的总计消耗工时 r($tester->project->getProjectsConsumed($projectIdList)) && p('12:totalConsumed') && e('28.0'); // 批量获取各个项目的总计消耗工时 -r($tester->project->getProjectsConsumed($projectIdList)) && p('13:totalConsumed') && e('35.0'); // 批量获取各个项目的总计消耗工时 +r($tester->project->getProjectsConsumed($projectIdList)) && p('13:totalConsumed') && e('35.0'); // 批量获取各个项目的总计消耗工时 \ No newline at end of file diff --git a/test/model/project/getstatdata.php b/test/model/project/getstatdata.php index cb14e7274c..fdab1c645f 100755 --- a/test/model/project/getstatdata.php +++ b/test/model/project/getstatdata.php @@ -9,9 +9,9 @@ title=测试 projectModel->getStatData(); cid=1 pid=1 -统计id=13的项目bug数量 >> 3 +统计id=13的项目bug数量 >> 4 任务数量 >> 13 -暂停数量 >> 2 +未开始数量 >> 2 进行的数量 >> 2 完成的数量 >> 0 @@ -24,4 +24,4 @@ r($tester->project->getStatData(13)) && p('bugCount') && e('4'); //统计 r($tester->project->getStatData(13)) && p('taskCount') && e('13'); //任务数量 r($tester->project->getStatData(13)) && p('waitCount') && e('2'); //未开始数量 r($tester->project->getStatData(13)) && p('doingCount') && e('2'); //进行的数量 -r($tester->project->getStatData(13)) && p('finishedCount') && e('0'); //完成的数量 +r($tester->project->getStatData(13)) && p('finishedCount') && e('0'); //完成的数量 \ No newline at end of file diff --git a/test/model/project/getstats.php b/test/model/project/getstats.php index a6871ce083..7edb704a54 100755 --- a/test/model/project/getstats.php +++ b/test/model/project/getstats.php @@ -9,12 +9,12 @@ title=测试 projectModel->getStats(); cid=1 pid=1 -查看所有执行 >> 630 -查看未完成的执行 >> 0 -查看所有进行中的执行 >> 315 -查看所有进行中的执行 >> 315 -查看id为11项目的执行 >> 7 -查看id为12项目的执行 >> 7 +查看所有执行数量 >> 630 +查看未完成的执行数量 >> 630 +查看所有进行中的执行数量 >> 315 +查看所有进行中的执行数量 >> 315 +查看id为11项目的执行数量 >> 7 +查看id为12项目的执行数量 >> 7 */ @@ -35,4 +35,4 @@ r(count($undoneExecutions)) && p() && e('630'); // 查看未完成的执行 r(count($doingExecutions)) && p() && e('315'); // 查看所有进行中的执行数量 r(count($waitExecutions)) && p() && e('315'); // 查看所有进行中的执行数量 r(count($project11Executions)) && p() && e('7'); // 查看id为11项目的执行数量 -r(count($project12Executions)) && p() && e('7'); // 查看id为12项目的执行数量 +r(count($project12Executions)) && p() && e('7'); // 查看id为12项目的执行数量 \ No newline at end of file diff --git a/test/model/project/getstats4kanban.php b/test/model/project/getstats4kanban.php old mode 100644 new mode 100755 index f7cf3107a0..e68b183a66 --- a/test/model/project/getstats4kanban.php +++ b/test/model/project/getstats4kanban.php @@ -9,6 +9,11 @@ title=测试 projectModel->getStats4Kanban(); cid=1 pid=1 +统计获取到的看板数据的分组数量 >> 2 +统计获取到的看板数据的其他数量 >> 11 +统计获取到的看板数据的其他下的项目集1下的wait的项目数量 >> 3 +统计获取到的看板数据的其他下的项目集1下的doing的项目数量 >> 4 + */ global $tester; @@ -18,4 +23,4 @@ $kanbanGroup = $tester->project->getStats4Kanban(); r(count($kanbanGroup['kanbanGroup'])) && p() && e('2'); //统计获取到的看板数据的分组数量 r(count($kanbanGroup['kanbanGroup']['other'])) && p() && e('11'); //统计获取到的看板数据的其他数量 r(count($kanbanGroup['kanbanGroup']['other'][1]['wait'])) && p() && e('3'); //统计获取到的看板数据的其他下的项目集1下的wait的项目数量 -r(count($kanbanGroup['kanbanGroup']['other'][1]['doing'])) && p() && e('4'); //统计获取到的看板数据的其他下的项目集1下的doing的项目数量 +r(count($kanbanGroup['kanbanGroup']['other'][1]['doing'])) && p() && e('4'); //统计获取到的看板数据的其他下的项目集1下的doing的项目数量 \ No newline at end of file diff --git a/test/model/project/getstoriesbyproject.php b/test/model/project/getstoriesbyproject.php old mode 100644 new mode 100755 index d35eaf147c..d3fed78985 --- a/test/model/project/getstoriesbyproject.php +++ b/test/model/project/getstoriesbyproject.php @@ -9,6 +9,9 @@ title=测试 projectModel->getStoriesByProject(); cid=1 pid=1 +获取项目11关联的所有产品数量 >> 2 +获取项目11关联的产品ID为91的详情 >> 11 + */ global $tester; @@ -17,4 +20,4 @@ $tester->loadModel('project'); $result = $tester->project->getStoriesByProject(11); r(count($result)) && p() && e('2'); // 获取项目11关联的所有产品数量 -r($result[91]) && p('0:project') && e('11'); // 获取项目11关联的产品ID为91的详情 +r($result[91]) && p('0:project') && e('11'); // 获取项目11关联的产品ID为91的详情 \ No newline at end of file diff --git a/test/model/project/getswitcher.php b/test/model/project/getswitcher.php index 704b49e03b..534e174d70 100755 --- a/test/model/project/getswitcher.php +++ b/test/model/project/getswitcher.php @@ -9,11 +9,11 @@ cid=1 pid=1 获取项目下拉菜单,项目列表页面没有项目下拉菜单 >> 0 -获取项目ID为11的迭代列表页面的项目下拉菜单,查看是否包含项目ID为11的名称 >> 项目1 +获取项目ID为11的迭代列表页面的项目下拉菜单,查看项目1下拉框出现的位置 >> 137 */ $project = $tester->loadModel('project'); r($project->getSwitcher(11, 'project', 'browse')) && p() && e('0'); // 获取项目下拉菜单,项目列表页面没有项目下拉菜单 -r(strpos($project->getSwitcher(11, 'project', 'execution'), "项目1")) && p() && e('137'); // 获取项目ID为11的迭代列表页面的项目下拉菜单,查看项目1下拉框出现的位置 +r(strpos($project->getSwitcher(11, 'project', 'execution'), "项目1")) && p() && e('137'); // 获取项目ID为11的迭代列表页面的项目下拉菜单,查看项目1下拉框出现的位置 \ No newline at end of file diff --git a/test/model/project/getteammemberpairs.php b/test/model/project/getteammemberpairs.php index 10a16437ac..1ed95ad7fc 100755 --- a/test/model/project/getteammemberpairs.php +++ b/test/model/project/getteammemberpairs.php @@ -9,6 +9,9 @@ title=测试 projectModel->getTeamMemberPairs(); cid=1 pid=1 +获取id为11的项目团队成员个数 >> 3 +获取id为11的项目团队成员的详细信息 >> 产品经理92 + */ global $tester; @@ -17,4 +20,4 @@ $tester->loadModel('project'); $members = $tester->project->getTeamMemberPairs(11); r(count($members)) && p() && e('3'); // 获取id为11的项目团队成员个数 -r($members) && p('pm92') && e('产品经理92'); // 获取id为11的项目团队成员的详细信息 +r($members) && p('pm92') && e('产品经理92'); // 获取id为11的项目团队成员的详细信息 \ No newline at end of file diff --git a/test/model/project/getteammembers.php b/test/model/project/getteammembers.php index ceb40f3fb4..925714d016 100755 --- a/test/model/project/getteammembers.php +++ b/test/model/project/getteammembers.php @@ -10,7 +10,7 @@ cid=1 pid=1 获取id为11的项目团队成员个数 >> 2 -获取id为11的项目团队成员个数,开启新手引导 >> 1 +获取id为11的项目团队成员的详细信息 >> 项目经理,343.0,产品经理92 */ @@ -20,4 +20,4 @@ $tester->loadModel('project'); $members = $tester->project->getTeamMembers(11); r(count($members)) && p() && e('2'); // 获取id为11的项目团队成员个数 -r($members) && p('pm92:role,totalHours,realname') && e('项目经理,343.0,产品经理92'); // 获取id为11的项目团队成员的详细信息 +r($members) && p('pm92:role,totalHours,realname') && e('项目经理,343.0,产品经理92'); // 获取id为11的项目团队成员的详细信息 \ No newline at end of file diff --git a/test/model/project/gettotalbugbyproject.php b/test/model/project/gettotalbugbyproject.php index 44fe9a7fe6..ac4922305e 100755 --- a/test/model/project/gettotalbugbyproject.php +++ b/test/model/project/gettotalbugbyproject.php @@ -9,7 +9,7 @@ title=测试 projectModel->getTotalBugByProject(); cid=1 pid=1 -状态一致时正常打印id为11的项目bug数量 >> 3 +获取id为11的项目下激活的bug数量 >> 4 */ @@ -19,4 +19,4 @@ $tester->loadModel('project'); $projectIdList = array(11, 12, 13, 14, 15, 16, 27); r($tester->project->getTotalBugByProject($projectIdList, 'active')) && p('11') && e('4'); //获取id为11的项目下激活的bug数量 -r($tester->project->getTotalBugByProject($projectIdList, 'active')) && p('27') && e(''); //获取id为27的项目下激活的bug数量 +r($tester->project->getTotalBugByProject($projectIdList, 'active')) && p('27') && e(''); //获取id为27的项目下激活的bug数量 \ No newline at end of file diff --git a/test/model/project/gettotalstoriesbyproject.php b/test/model/project/gettotalstoriesbyproject.php index 2a8aff4196..73447e29d5 100755 --- a/test/model/project/gettotalstoriesbyproject.php +++ b/test/model/project/gettotalstoriesbyproject.php @@ -9,6 +9,9 @@ title=测试 projectModel::getTotalStoriesByProject; cid=1 pid=1 +不传入产品ID列表,获取项目11下的所有需求数量 >> 0 +传入产品ID列表,获取项目11下的所有需求数量 >> 2 + */ global $tester; @@ -19,4 +22,4 @@ $stories1 = $tester->project->getTotalStoriesByProject(11); $stories2 = $tester->project->getTotalStoriesByProject(11, $productIdList); r($stories1) && p() && e('0'); // 不传入产品ID列表,获取项目11下的所有需求数量 -r($stories2) && p() && e('2'); // 传入产品ID列表,获取项目11下的所有需求数量 +r($stories2) && p() && e('2'); // 传入产品ID列表,获取项目11下的所有需求数量 \ No newline at end of file diff --git a/test/model/project/gettotaltaskbyproject.php b/test/model/project/gettotaltaskbyproject.php old mode 100644 new mode 100755 index 0f8007bc18..3d76eb4b34 --- a/test/model/project/gettotaltaskbyproject.php +++ b/test/model/project/gettotaltaskbyproject.php @@ -9,7 +9,9 @@ title=测试 projectModel->getTotalTaskByProject(); cid=1 pid=1 -状态一致时正常打印id为11的项目bug数量 >> 3 +获取id为11的项目下激活的task数量 >> 14 +获取id为15的项目下完成的task数量 >> 2 +获取id为27的项目下激活的task数量 >> 8 */ @@ -20,4 +22,4 @@ $projectIdList = array(11, 12, 13, 14, 15, 16, 27); r($tester->project->getTotalTaskByProject($projectIdList, 'undone')) && p('11') && e('14'); // 获取id为11的项目下激活的task数量 r($tester->project->getTotalTaskByProject($projectIdList, 'done')) && p('15') && e('2'); // 获取id为15的项目下完成的task数量 -r($tester->project->getTotalTaskByProject($projectIdList, 'undone')) && p('27') && e('8'); // 获取id为27的项目下激活的task数量 +r($tester->project->getTotalTaskByProject($projectIdList, 'undone')) && p('27') && e('8'); // 获取id为27的项目下激活的task数量 \ No newline at end of file diff --git a/test/model/project/gettreemenu.php b/test/model/project/gettreemenu.php old mode 100644 new mode 100755 index 0c995025b6..5c79d18b8d --- a/test/model/project/gettreemenu.php +++ b/test/model/project/gettreemenu.php @@ -9,6 +9,8 @@ title=测试 projectModel->getTreeMenu(); cid=1 pid=1 +查看获取到的menu option的字符串数量 >> 1596 + */ global $tester; @@ -16,4 +18,4 @@ $tester->loadModel('project'); $lastMenu = $tester->project->getTreeMenu(0, array('projectmodel', 'createManageLink')); -r(strlen($lastMenu)) && p() && e('1596'); // 查看获取到的menu option的字符串数量 +r(strlen($lastMenu)) && p() && e('1596'); // 查看获取到的menu option的字符串数量 \ No newline at end of file diff --git a/test/model/project/getworkhour.php b/test/model/project/getworkhour.php index cf6f8da7cf..b98e4744fe 100755 --- a/test/model/project/getworkhour.php +++ b/test/model/project/getworkhour.php @@ -9,8 +9,8 @@ title=测试 projectModel::getWorkhour; cid=1 pid=1 -预计61.0小时 >> 61.0 -消耗95.0小时 >> 95.0 +获取项目ID为13的预计工时,61.0小时 >> 61.0 +获取项目ID为13的消耗工时,95.0小时 >> 95.0 */ @@ -19,4 +19,4 @@ $tester->loadModel('project'); r($tester->project->getWorkHour(13)) && p('totalEstimate') && e('61.0'); //获取项目ID为13的预计工时,61.0小时 r($tester->project->getWorkHour(13)) && p('totalConsumed') && e('95.0'); //获取项目ID为13的消耗工时,95.0小时 -r($tester->project->getWorkHour(1000)) && p('totalEstimate') && e(''); //测试不存在的项目 +r($tester->project->getWorkHour(1000)) && p('totalEstimate') && e(''); //测试不存在的项目 \ No newline at end of file diff --git a/test/model/project/isclickable.php b/test/model/project/isclickable.php index a208b0f4b1..a4f313df73 100755 --- a/test/model/project/isclickable.php +++ b/test/model/project/isclickable.php @@ -59,4 +59,4 @@ r($projectModel->isClickable($closedProject, $status[0])) && p() && e('0'); // r($projectModel->isClickable($closedProject, $status[1])) && p() && e('0'); // 检查已关闭项目的完成按钮 r($projectModel->isClickable($closedProject, $status[2])) && p() && e('0'); // 检查已关闭项目的关闭按钮 r($projectModel->isClickable($closedProject, $status[3])) && p() && e('0'); // 检查已关闭项目的暂停按钮 -r($projectModel->isClickable($closedProject, $status[4])) && p() && e('1'); // 检查已关闭项目的激活按钮 +r($projectModel->isClickable($closedProject, $status[4])) && p() && e('1'); // 检查已关闭项目的激活按钮 \ No newline at end of file diff --git a/test/model/project/managemembers.php b/test/model/project/managemembers.php old mode 100644 new mode 100755 index 357b1601ff..53ac8434f5 --- a/test/model/project/managemembers.php +++ b/test/model/project/managemembers.php @@ -9,6 +9,10 @@ title=测试 projectModel->unlinkMember(); cid=1 pid=1 +查看维护团队之后的成员数量 >> 4 +查看维护团队之后的成员详情 >> 开发1 +查看维护团队之后的成员详情 >> 测试2 + */ global $tester; @@ -26,4 +30,4 @@ $members = $tester->project->getTeamMemberPairs(11); r(count($members)) && p('') && e('4'); // 查看维护团队之后的成员数量 r($members) && p('dev1') && e('开发1'); // 查看维护团队之后的成员详情 r($members) && p('test2') && e('测试2'); // 查看维护团队之后的成员详情 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/putoff.php b/test/model/project/putoff.php old mode 100644 new mode 100755 index adc9b03237..cfe4c0d958 --- a/test/model/project/putoff.php +++ b/test/model/project/putoff.php @@ -9,6 +9,9 @@ title=测试 projectModel->start(); cid=1 pid=1 +延期ID为81的项目,查看延期后的日期 >> 2023-07-01 +延期ID为0的项目,返回空 >> 0 + */ global $tester; @@ -20,4 +23,4 @@ $changes2 = $tester->project->putoff(0); r($changes1[0]) && p('new') && e('2023-07-01'); // 延期ID为81的项目,查看延期后的日期 r($changes2) && p() && e('0'); // 延期ID为0的项目,返回空 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/savestate.php b/test/model/project/savestate.php index 86c8b78762..b2422d1a37 100755 --- a/test/model/project/savestate.php +++ b/test/model/project/savestate.php @@ -9,8 +9,10 @@ title=测试 programModel::saveState; cid=1 pid=1 +传入存在ID的值99,保存session,返回第一位默认值11 >> 11 + */ $project = new Project(); -r($project->saveState(99)) && p() && e('11'); //传入存在ID的值99,保存session,返回第一位默认值11 +r($project->saveState(99)) && p() && e('11'); //传入存在ID的值99,保存session,返回第一位默认值11 \ No newline at end of file diff --git a/test/model/project/start.php b/test/model/project/start.php index ad7a8b9160..52197ff156 100755 --- a/test/model/project/start.php +++ b/test/model/project/start.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,11 @@ title=测试 projectModel->start(); cid=1 pid=1 +开始id为81状态是suspended的项目 >> 项目71,doing +开始id为82状态是closed的项目 >> 0 +开始id为83状态是wait的项目 >> 项目73,doing +开始id为85状态是doing的项目 >> 0 + */ $project = new Project(); @@ -18,4 +24,4 @@ r($project->start(81)) && p('name,status') && e('项目71,doing'); // 开始id r($project->start(82)) && p() && e('0'); // 开始id为82状态是closed的项目 r($project->start(83)) && p('name,status') && e('项目73,doing'); // 开始id为83状态是wait的项目 r($project->start(85)) && p() && e('0'); // 开始id为85状态是doing的项目 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/suspend.php b/test/model/project/suspend.php index 46566e47f6..321f3f90b0 100755 --- a/test/model/project/suspend.php +++ b/test/model/project/suspend.php @@ -9,6 +9,10 @@ title=测试 projectModel->suspend(); cid=1 pid=1 +挂起id为56状态是doing的项目 >> suspended +挂起id为73状态是suspended的项目 >> suspendedDate +挂起id为74状态是closed的项目 >> suspended + */ global $tester; @@ -21,4 +25,4 @@ $changes3 = $tester->project->suspend(74); r($changes1[0]) && p('new') && e('suspended'); // 挂起id为56状态是doing的项目 r($changes2[0]) && p('field') && e('suspendedDate'); // 挂起id为73状态是suspended的项目 r($changes3[0]) && p('new') && e('suspended'); // 挂起id为74状态是closed的项目 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/unlinkmember.php b/test/model/project/unlinkmember.php old mode 100644 new mode 100755 index dcf098add6..76de6acef0 --- a/test/model/project/unlinkmember.php +++ b/test/model/project/unlinkmember.php @@ -9,6 +9,11 @@ title=测试 projectModel->unlinkMember(); cid=1 pid=1 +查看移除团队成员之前的ID为11的项目团队成员数量 >> 3 +查看移除团队成员之后的ID为11的项目团队成员数量 >> 2 +查看项目ID为11的团队成员的真实姓名 >> 产品经理92 +查看项目ID为11的团队成员的真实姓名 >> 产品经理92 + */ global $tester; @@ -22,4 +27,4 @@ r(count($beforeMembers)) && p('') && e('3'); // 查看移除团队 r(count($afterMembers)) && p('') && e('2'); // 查看移除团队成员之后的ID为11的项目团队成员数量 r($beforeMembers) && p('pm92') && e('产品经理92'); // 查看项目ID为11的团队成员的真实姓名 r($afterMembers) && p('pm92') && e('产品经理92'); // 查看项目ID为11的团队成员的真实姓名 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/update.php b/test/model/project/update.php old mode 100644 new mode 100755 index e342fb80d8..1f4f075b52 --- a/test/model/project/update.php +++ b/test/model/project/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,12 +11,13 @@ title=测试 projectModel::update(); cid=1 pid=1 -更新id为10的项目信息 >> 测试更新项目十 -当计划开始为空时更新项目信息 >> 『计划开始』不能为空。 -当计划完成为空时更新项目信息 >> 『计划完成』不能为空。 -当计划完成小于计划开始时 >> 『计划完成』应当大于『2020-10-10』。 -项目名称已经存在时 >> 『项目名称』已经有『项目1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 -项目开始时间小于父项目时 >> 父项目的开始日期:2019-09-09,开始日期不能小于父项目的开始日期;父项目的完成日期:2019-09-09,完成日期不能大于父项目的完成日期 +正常更新项目的情况 >> 测试更新项目十 +未关联产品的项目 >> 最少关联一个产品 +更新项目名称为空时 >> 『项目名称』不能为空。 +当计划完成为空时更新项目信息 >> 『计划开始』不能为空。 +当计划完成小于计划开始时 >> 『计划完成』不能为空。 +父项目的开始日期大于子项目的开始日期时 >> 『计划完成』应当大于『2022-07-01』。 +项目开始、结束日期和子项目不符的情况 >> 项目集的最小开始日期:2022-02-15,项目的开始日期不能小于项目集的最小开始日期;项目集的最大完成日期:2022-04-22,项目的完成日期不能大于项目集的最大完成日期 */ @@ -65,4 +67,4 @@ r($project->update(10, $emptyBeginProject)) && p('message[begin]:0') r($project->update(10, $emptyEndProject)) && p('message[end]:0') && e('『计划完成』不能为空。'); // 当计划完成小于计划开始时 r($project->update(10, $beginGtEndProject)) && p('message[end]:0') && e('『计划完成』应当大于『2022-07-01』。'); // 父项目的开始日期大于子项目的开始日期时 r($project->update(10, $beginLtParentProject)) && p('message:begin;message:end') && e('项目集的最小开始日期:2022-02-15,项目的开始日期不能小于项目集的最小开始日期;项目集的最大完成日期:2022-04-22,项目的完成日期不能大于项目集的最大完成日期'); // 项目开始、结束日期和子项目不符的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/updateproductprogram.php b/test/model/project/updateproductprogram.php old mode 100644 new mode 100755 index f8e3b50450..2ba16aa40e --- a/test/model/project/updateproductprogram.php +++ b/test/model/project/updateproductprogram.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,12 @@ title=测试 projectModel->updateProductProgram(); cid=1 pid=1 +查看被更新了项目集的产品数量 >> 4 +查看被更新了项目集的产品详情 >> 1,正常产品1 +查看被更新了项目集的产品详情 >> 1,正常产品2 +查看被更新了项目集的产品详情 >> 1,正常产品3 +查看被更新了项目集的产品详情 >> 1,正常产品4 + */ global $tester; @@ -25,4 +32,4 @@ r($products) && p('1:program,name') && e('1,正常产品1'); // 查看被 r($products) && p('2:program,name') && e('1,正常产品2'); // 查看被更新了项目集的产品详情 r($products) && p('3:program,name') && e('1,正常产品3'); // 查看被更新了项目集的产品详情 r($products) && p('4:program,name') && e('1,正常产品4'); // 查看被更新了项目集的产品详情 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/project/updateproducts.php b/test/model/project/updateproducts.php old mode 100644 new mode 100755 index a874abd6c7..c58db6e716 --- a/test/model/project/updateproducts.php +++ b/test/model/project/updateproducts.php @@ -9,6 +9,11 @@ title=测试 projectModel->updateProducts(); cid=1 pid=1 +查看更新项目关联的产品之前的产品数量 >> 3 +查看更新项目关联的产品之后的产品数量 >> 4 +查看更新项目关联的产品之前的产品名称 >> 多平台产品81 +查看更新项目关联的产品之后的产品名称 >> 正常产品4 + */ global $tester; @@ -26,4 +31,4 @@ r(count($beforeProducts)) && p() && e('3'); // 查看更新项目 r(count($afterProducts)) && p() && e('4'); // 查看更新项目关联的产品之后的产品数量 r($beforeProducts) && p('81') && e('多平台产品81'); // 查看更新项目关联的产品之前的产品名称 r($afterProducts) && p('4') && e('正常产品4'); // 查看更新项目关联的产品之后的产品名称 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/projectrelease/linkbug.php b/test/model/projectrelease/linkbug.php index 5e3f149d1b..7f17d5271f 100755 --- a/test/model/projectrelease/linkbug.php +++ b/test/model/projectrelease/linkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($projectrelease->linkBugTest($releaseID[0],$type[2])) && p('leftBugs') && e(', r($projectrelease->linkBugTest($releaseID[1],$type[0])) && p('bugs') && e(',1,2'); //测试terminate状态的发布,releaseID正常存在,type为bug r($projectrelease->linkBugTest($releaseID[1],$type[1])) && p('leftBugs') && e(',1,2'); //测试terminate状态的发布,releaseID正常存在,type为leftBug r($projectrelease->linkBugTest($releaseID[1],$type[2])) && p('leftBugs') && e(',1,2,'); //测试terminate状态的发布,releaseID正常存在,type为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/projectrelease/linkstory.php b/test/model/projectrelease/linkstory.php index a11bf3093d..a5885b9981 100755 --- a/test/model/projectrelease/linkstory.php +++ b/test/model/projectrelease/linkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -20,4 +21,4 @@ $projectrelease = new projectreleaseTest(); r($projectrelease->linkStoryTest($releaseID[0])) && p('stories') && e(',1,2'); //测试normal状态的发布,releaseID正常存在 r($projectrelease->linkStoryTest($releaseID[1])) && p('stories') && e(',1,2'); //测试terminate状态的发布,releaseID正常存在 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/projectrelease/unlinkstory.php b/test/model/projectrelease/unlinkstory.php index ac4fe1aba0..1c6251a805 100755 --- a/test/model/projectrelease/unlinkstory.php +++ b/test/model/projectrelease/unlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($projectrelease->unlinkStoryTest($releaseID[0], $storyID[2])) && p('stories') r($projectrelease->unlinkStoryTest($releaseID[1], $storyID[0])) && p('stories') && e('1'); //测试terminate状态的发布,正常存在的storyID值为2,可移除 r($projectrelease->unlinkStoryTest($releaseID[1], $storyID[1])) && p('stories') && e('1,2'); //测试terminate状态的发布,不存在的storyID值为100,不可移除 r($projectrelease->unlinkStoryTest($releaseID[1], $storyID[2])) && p('stories') && e('1,2'); //测试terminate状态的发布,不存在的storyID值为空,不可移除 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/projectrelease/update.php b/test/model/projectrelease/update.php index 40e59cca1d..287b718941 100755 --- a/test/model/projectrelease/update.php +++ b/test/model/projectrelease/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($projectrelease->updateTest($releaseID[0], $name[3], $date[1])) && p('name:0;d r($projectrelease->updateTest($releaseID[0], $name[1], $date[0])) && p('name:0') && e('『name』已经有『产品发布9』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试releaseID正常存在,name在其他发布存在,date正常,不可修改 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/projectstory/getexecutionstories.php b/test/model/projectstory/getexecutionstories.php index 780376149e..8f6a3b78a1 100755 --- a/test/model/projectstory/getexecutionstories.php +++ b/test/model/projectstory/getexecutionstories.php @@ -36,4 +36,4 @@ r($projectstory->getExecutionStoriesTest($projectID[0], $storyID[0])) && p('12:t r($projectstory->getExecutionStoriesTest($projectID[1], $storyID[1])) && p('14:title') && e('软件需求14'); //这里取出了id14的项目下需求id14名称 r($projectstory->getExecutionStoriesTest($projectID[1], $storyID[1])) && p('16:title') && e('软件需求16'); //这里取出了id14的项目下需求id16名称 r($projectstory->getExecutionStoriesTest($projectID[2], $storyID[0])) && p('10:title') && e('0'); //当项目id不存在时 -r($projectstory->getExecutionStoriesTest($projectID[0], $storyID[2])) && p('1000:title') && e('0'); //当需求id不存在时 +r($projectstory->getExecutionStoriesTest($projectID[0], $storyID[2])) && p('1000:title') && e('0'); //当需求id不存在时 \ No newline at end of file diff --git a/test/model/release/batchunlinkbug.php b/test/model/release/batchunlinkbug.php index 57c1242492..586787ed65 100755 --- a/test/model/release/batchunlinkbug.php +++ b/test/model/release/batchunlinkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($release->batchUnlinkBugTest($releaseID[0], $bugs ,$type[1])) && p('id,bugs,le r($release->batchUnlinkBugTest($releaseID[1], $bugs ,$type[0])) && p('id,bugs,leftBugs') && e('6,'); //停止维护任务批量移除解决的Bug r($release->batchUnlinkBugTest($releaseID[1], $bugs ,$type[1])) && p('id,bugs,leftBugs') && e('6,'); //停止维护任务批量移除遗留的Bug -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/batchunlinkstory.php b/test/model/release/batchunlinkstory.php index 54dd63243e..b2ccd0c260 100755 --- a/test/model/release/batchunlinkstory.php +++ b/test/model/release/batchunlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ $release = new releaseTest(); r($release->batchUnlinkStoryTest($releaseID[0],$stories)) && p('id,stories') && e('1,'); //正常任务批量移除关联需求 r($release->batchUnlinkStoryTest($releaseID[1],$stories)) && p('id,stories') && e('6,'); //停止维护任务批量移除关联需求 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/create.php b/test/model/release/create.php index 2b92dc57b4..f6ed552405 100755 --- a/test/model/release/create.php +++ b/test/model/release/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ r($release->createTest($projectID, $branch, $projectID, $syncRelease)) & r($release->createTest($projectID, $branch, $projectID, $noSyncnormalRelease)) && p('id,name,build') && e('15,新增不关联发布,13'); //创建将版本中完成的研发需求和已解决的Bug不关联的发布 r($release->createTest($projectID, $branch, $projectID, $noNameRelease)) && p('name:0') && e('『发布名称』不能为空。'); //名称为空测试 r($release->createTest($projectID, $branch, $projectID, $executionRelease)) && p('name:0') && e('『发布名称』已经有『新增执行版本发布』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //名称重复测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/linkbug.php b/test/model/release/linkbug.php index 17ac1dd2fa..b1f858281b 100755 --- a/test/model/release/linkbug.php +++ b/test/model/release/linkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($release->linkBugTest($releaseID[0], $type[1], $bugs)) && p('id,bugs,leftBugs' r($release->linkBugTest($releaseID[1], $type[0], $bugs)) && p('id,bugs,leftBugs') && e('6,,311,312'); //停止维护任务关联解决Bug r($release->linkBugTest($releaseID[1], $type[1], $bugs)) && p('id,bugs,leftBugs') && e('6,,311,312,,311,312'); //停止维护任务关联遗留Bug -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/linkstory.php b/test/model/release/linkstory.php index 79d2faa72f..e3f294bd12 100755 --- a/test/model/release/linkstory.php +++ b/test/model/release/linkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ $release = new releaseTest(); r($release->linkStoryTest($releaseID[0],$stories)) && p('id,stories') && e('1,,2,4'); //正常任务关联需求 r($release->linkStoryTest($releaseID[1],$stories)) && p('id,stories') && e('6,,2,4'); //停止维护任务关联需求 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/unlinkbug.php b/test/model/release/unlinkbug.php index b553f926ea..b5d8e76c7b 100755 --- a/test/model/release/unlinkbug.php +++ b/test/model/release/unlinkbug.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($release->unlinkBugTest($releaseID[0], $bugs ,$type[0])) && p('id,bugs,leftBug r($release->unlinkBugTest($releaseID[0], $bugs ,$type[1])) && p('id,bugs,leftBugs') && e('1,'); //正常发布批量移除遗留的Bug r($release->unlinkBugTest($releaseID[1], $bugs ,$type[0])) && p('id,bugs,leftBugs') && e('6,'); //停止维护发布批量移除解决的Bug r($release->unlinkBugTest($releaseID[1], $bugs ,$type[1])) && p('id,bugs,leftBugs') && e('6,'); //停止维护发布批量移除遗留的Bug -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/unlinkstory.php b/test/model/release/unlinkstory.php index 53037a4b19..c1397e1c48 100755 --- a/test/model/release/unlinkstory.php +++ b/test/model/release/unlinkstory.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ $release = new releaseTest(); r($release->unlinkStoryTest($releaseID[0],$stories)) && p('id,stories') && e('1,'); //正常任务移除关联需求 r($release->unlinkStoryTest($releaseID[1],$stories)) && p('id,stories') && e('6,'); //停止维护任务移除关联需求 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/release/update.php b/test/model/release/update.php index 8b580d612a..947579bc32 100755 --- a/test/model/release/update.php +++ b/test/model/release/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($release->updateTest($releaseID[1], $terminateRelease)) && p('id,name,build') r($release->updateTest($releaseID[2], $noReleaseID)) && p() && e('0'); //任务ID为空测试 r($release->updateTest($releaseID[0], $noName)) && p('name:0') && e('『发布名称』不能为空。'); //名称为空测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); diff --git a/test/model/repo/getcommits.php b/test/model/repo/getcommits.php old mode 100644 new mode 100755 index f29014f76b..a66ede87f9 --- a/test/model/repo/getcommits.php +++ b/test/model/repo/getcommits.php @@ -22,4 +22,4 @@ $path = ''; $result = $repoModel->getCommits($repo, $path); $firstResult = array_shift($result); r(isset($firstResult->commit)) && p() && e('1'); //通过repo,path,获取commit列表 -r(count($result) > 0) && p() && e('1'); //通过repo,path,获取commit数量 +r(count($result) > 0) && p() && e('1'); //通过repo,path,获取commit数量 \ No newline at end of file diff --git a/test/model/repo/getrepobyurl.php b/test/model/repo/getrepobyurl.php old mode 100644 new mode 100755 index 0733fffa77..ea4f768380 --- a/test/model/repo/getrepobyurl.php +++ b/test/model/repo/getrepobyurl.php @@ -8,9 +8,9 @@ title=测试 repoModel::getRepoByUrl(); cid=1 pid=1 -使用空的url >> Url is empty. -使用错误的url >> No matched gitlab. -使用正确的url >> return normal +使用空的MR >> Url is empty. +使用错误的MR >> No matched gitlab. +使用正确的MR >> return normal */ @@ -31,4 +31,4 @@ if(!empty($result)) if($result['result'] == 'fail' and $result['message'] != 'No matched gitlab.') $result = 'return normal'; if(is_array($result) and $result['result'] == 'success') $result = 'return normal'; } -r($result) && p() && e('return normal'); //使用正确的MR +r($result) && p() && e('return normal'); //使用正确的MR \ No newline at end of file diff --git a/test/model/score/create.php b/test/model/score/create.php old mode 100644 new mode 100755 index 7bceae0108..51adf7c699 --- a/test/model/score/create.php +++ b/test/model/score/create.php @@ -10,6 +10,14 @@ title=测试 scoreModel->create(); cid=1 pid=1 +关闭一个不存在创建者的需求 >> 0 +关闭一个存在创建者的需求 >> 2 +ID为601 的任务有子任务,完成不计算积分 >> 0 +ID为2 的任务,优先级为2,消耗4h, 预计1h >> 2 +确认严重程度为1的bug >> 4 +在截止时间内关闭一个项目经理为admin的执行 >> 30 +product模块的edit方法不存在与积分规则中,不计算积分 >> 0 + */ $moduleList = array('user', 'story', 'task', 'bug', 'execution', 'product'); @@ -34,4 +42,4 @@ r($score->createTest($moduleList[2], $methodList[2], '601')) r($score->createTest($moduleList[2], $methodList[2], '2')) && p('score') && e('2'); // ID为2 的任务,优先级为2,消耗4h, 预计1h r($score->createTest($moduleList[3], $methodList[3], $bug)) && p('score') && e('4'); // 确认严重程度为1的bug r($score->createTest($moduleList[4], $methodList[4], $execution, 'admin', '2022-05-11')) && p('score') && e('30'); // 在截止时间内关闭一个项目经理为admin的执行 -r($score->createTest($moduleList[5], $methodList[5])) && p('') && e('0'); // product模块的edit方法不存在与积分规则中,不计算积分 +r($score->createTest($moduleList[5], $methodList[5])) && p('') && e('0'); // product模块的edit方法不存在与积分规则中,不计算积分 \ No newline at end of file diff --git a/test/model/score/fixkey.php b/test/model/score/fixkey.php old mode 100644 new mode 100755 index 40aa9f58f5..9bac44533c --- a/test/model/score/fixkey.php +++ b/test/model/score/fixkey.php @@ -10,6 +10,11 @@ title=测试 scoreModel->fixKey(); cid=1 pid=1 +action为created >> create +action为opened >> create +action为bugconfirmed >> confirmBug +action为fixed, 不存在于strings中 >> fixed + */ $actionList = array('created', 'opened', 'bugconfirmed', 'fixed'); @@ -19,4 +24,4 @@ $score = new scoreTest(); r($score->fixKeyTest($actionList[0])) && p('') && e('create'); // action为created r($score->fixKeyTest($actionList[1])) && p('') && e('create'); // action为opened r($score->fixKeyTest($actionList[2])) && p('') && e('confirmBug'); // action为bugconfirmed -r($score->fixKeyTest($actionList[3])) && p('') && e('fixed'); // action为fixed, 不存在于strings中 +r($score->fixKeyTest($actionList[3])) && p('') && e('fixed'); // action为fixed, 不存在于strings中 \ No newline at end of file diff --git a/test/model/score/getlistbyaccount.php b/test/model/score/getlistbyaccount.php old mode 100644 new mode 100755 index f2a9748d2e..454264e560 --- a/test/model/score/getlistbyaccount.php +++ b/test/model/score/getlistbyaccount.php @@ -10,6 +10,11 @@ title=测试 scoreModel->getListByAccount(); cid=1 pid=1 +查看account为admin,每页展示15条,第一页的第一条数据 >> admin +查看account为dev10, 每页展示15条,第一页的数据总量 >> 15 +查看account为top10, 不传pager(默认分页)的第一条数据 >> top10 +查看account为adminn(不存在的用户)的数据 >> 0 + */ global $tester; $tester->app->loadClass('pager', $static = true); @@ -21,4 +26,4 @@ $pager = new pager(0, 15, 1); r($score->getListByAccountTest($accountList[0], $pager)) && p('0:account') && e('admin'); // 查看account为admin,每页展示15条,第一页的第一条数据 r($score->getListByAccountTest($accountList[1], $pager, true)) && p('') && e('15'); // 查看account为dev10, 每页展示15条,第一页的数据总量 r($score->getListByAccountTest($accountList[2], null)) && p('0:account') && e('top10'); // 查看account为top10, 不传pager(默认分页)的第一条数据 -r($score->getListByAccountTest($accountList[3], null)) && p('0:account') && e('0'); // 查看account为adminn(不存在的用户)的数据 +r($score->getListByAccountTest($accountList[3], null)) && p('0:account') && e('0'); // 查看account为adminn(不存在的用户)的数据 \ No newline at end of file diff --git a/test/model/score/reset.php b/test/model/score/reset.php old mode 100644 new mode 100755 index 6f60e4c15a..220e9594be --- a/test/model/score/reset.php +++ b/test/model/score/reset.php @@ -10,8 +10,10 @@ title=测试 scoreModel->reset(); cid=1 pid=1 +重置积分成功 >> finish,0 + */ $score = new scoreTest(); -r($score->resetTest()) && p('status,number') && e('finish,0'); // 重置积分成功 +r($score->resetTest()) && p('status,number') && e('finish,0'); // 重置积分成功 \ No newline at end of file diff --git a/test/model/search/buildindexquery.php b/test/model/search/buildindexquery.php old mode 100644 new mode 100755 index b3f0b394c6..2abf867745 --- a/test/model/search/buildindexquery.php +++ b/test/model/search/buildindexquery.php @@ -9,6 +9,11 @@ title=测试 searchModel->buildIndexQuery(); cid=1 pid=1 +构建未删除项目集的sql语句 >> SELECT t1.* FROM `zt_project` AS t1 WHERE 1 AND type = 'program' AND t1.deleted = '0' +构建需求的sql语句 >> SELECT DISTINCT t1.*,t2.spec,t2.verify FROM `zt_story` AS t1 LEFT JOIN `zt_storyspec` AS t2 ON t1.id=t2.story WHERE t1.deleted = '0' AND t1.version=t2.version +构建需求的sql语句 >> SELECT DISTINCT t1.*,t2.content,t2.digest FROM `zt_doc` AS t1 LEFT JOIN `zt_doccontent` AS t2 ON t1.id=t2.doc WHERE t1.deleted = '0' AND t1.version=t2.version +构建查询所有项目的sql语句 >> SELECT t1.* FROM `zt_project` AS t1 WHERE 1 AND type = 'project' + */ global $tester; @@ -17,4 +22,4 @@ $search = $tester->loadModel('search'); r($search->buildIndexQuery('program')->get()) && p() && e("SELECT t1.* FROM `zt_project` AS t1 WHERE 1 AND type = 'program' AND t1.deleted = '0'"); //构建未删除项目集的sql语句 r($search->buildIndexQuery('story')->get()) && p() && e("SELECT DISTINCT t1.*,t2.spec,t2.verify FROM `zt_story` AS t1 LEFT JOIN `zt_storyspec` AS t2 ON t1.id=t2.story WHERE t1.deleted = '0' AND t1.version=t2.version"); //构建需求的sql语句 r($search->buildIndexQuery('doc')->get()) && p() && e("SELECT DISTINCT t1.*,t2.content,t2.digest FROM `zt_doc` AS t1 LEFT JOIN `zt_doccontent` AS t2 ON t1.id=t2.doc WHERE t1.deleted = '0' AND t1.version=t2.version"); //构建需求的sql语句 -r($search->buildIndexQuery('project', false)->get()) && p() && e("SELECT t1.* FROM `zt_project` AS t1 WHERE 1 AND type = 'project'"); //构建查询所有项目的sql语句 +r($search->buildIndexQuery('project', false)->get()) && p() && e("SELECT t1.* FROM `zt_project` AS t1 WHERE 1 AND type = 'project'"); //构建查询所有项目的sql语句 \ No newline at end of file diff --git a/test/model/search/decode.php b/test/model/search/decode.php old mode 100644 new mode 100755 index 0dc37300f0..cd59bab947 --- a/test/model/search/decode.php +++ b/test/model/search/decode.php @@ -10,8 +10,10 @@ title=测试 searchModel->decode(); cid=1 pid=1 +测试将搜索字转化为正确的汉字 >> 产 + */ $search = new searchTest(); -r($search->decodeTest(20135)) && p() && e('产'); //测试将搜索字转化为正确的汉字 +r($search->decodeTest(20135)) && p() && e('产'); //测试将搜索字转化为正确的汉字 \ No newline at end of file diff --git a/test/model/search/deletequery.php b/test/model/search/deletequery.php old mode 100644 new mode 100755 index 78000e9462..62bec1bdb4 --- a/test/model/search/deletequery.php +++ b/test/model/search/deletequery.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,9 @@ title=测试 searchModel->deleteQuery(); cid=1 pid=1 +测试删除ID为1的数据后剩余的数量 >> 5 +测试删除ID为2的数据后剩余的数量 >> 4 + */ $search = new searchTest(); @@ -19,4 +23,4 @@ $queryIDList = array('1', '2'); r($search->deleteQueryTest($queryIDList[0])) && p() && e('5'); //测试删除ID为1的数据后剩余的数量 r($search->deleteQueryTest($queryIDList[1])) && p() && e('4'); //测试删除ID为2的数据后剩余的数量 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/search/getbyid.php b/test/model/search/getbyid.php old mode 100644 new mode 100755 index 8d2ec91364..7fed9191b8 --- a/test/model/search/getbyid.php +++ b/test/model/search/getbyid.php @@ -10,6 +10,13 @@ title=测试 searchModel->getByID(); cid=1 pid=1 +查询ID为1的模块名及条件名 >> task,任务查询测试条件 +查询ID为2的模块名及条件名 >> executionStory,需求查找条件 +查询ID为3的模块名及条件名 >> user,用户测试条件 +查询ID为4的模块名及条件名 >> projectBuild,项目版本搜索 +查询ID为5的模块名及条件名 >> executionBuild,执行版本搜索 +查询ID为6的模块名及条件名 >> design,设计搜索 + */ $search = new searchTest(); @@ -21,4 +28,4 @@ r($search->getByIDTest($queryIDList[1])) && p('module,title') && e('executionSto r($search->getByIDTest($queryIDList[2])) && p('module,title') && e('user,用户测试条件'); //查询ID为3的模块名及条件名 r($search->getByIDTest($queryIDList[3])) && p('module,title') && e('projectBuild,项目版本搜索'); //查询ID为4的模块名及条件名 r($search->getByIDTest($queryIDList[4])) && p('module,title') && e('executionBuild,执行版本搜索'); //查询ID为5的模块名及条件名 -r($search->getByIDTest($queryIDList[5])) && p('module,title') && e('design,设计搜索'); //查询ID为6的模块名及条件名 +r($search->getByIDTest($queryIDList[5])) && p('module,title') && e('design,设计搜索'); //查询ID为6的模块名及条件名 \ No newline at end of file diff --git a/test/model/search/getlist.php b/test/model/search/getlist.php old mode 100644 new mode 100755 index 2b3a9704d0..88470441a8 --- a/test/model/search/getlist.php +++ b/test/model/search/getlist.php @@ -10,6 +10,25 @@ title=测试 searchModel->getList(); cid=1 pid=1 +测试在全部类型中搜索带有任务字体的条数 >> 1246 +测试在任务类型中搜索带有任务字体的条数 >> 910 +测试在bug类型中搜索带有bug字体的条数 >> 239 +测试在用例类型中搜索带有用例字体的条数 >> 97 +测试在文档类型中搜索带有文档字体的条数 >> 900 +测试在待办类型中搜索带有待办字体的条数 >> 1680 +测试在版本类型中搜索带有版本字体的条数 >> 20 +测试在用例库类型中搜索带有用例库字体的条数 >> 0 +测试在产品类型中搜索带有产品字体的条数 >> 120 +测试在发布类型中搜索带有发布字体的条数 >> 10 +测试在测试单类型中搜索带有测试单字体的条数 >> 100 +测试在测试套件类型中搜索带有测试套件字体的条数 >> 201 +测试在测试报告类型中搜索带有测试报告字体的条数 >> 10 +测试在计划类型中搜索带有计划字体的条数 >> 0 +测试在项目集类型中搜索带有项目集字体的条数 >> 10 +测试在项目类型中搜索带有项目字体的条数 >> 110 +测试在迭代类型中搜索带有迭代字体的条数 >> 630 +测试在需求类型中搜索带有需求字体的条数 >> 450 + */ $search = new searchTest(); @@ -53,4 +72,4 @@ r($search->getListTest($searchWords[12], $searchType[13])) && p() && e('0'); r($search->getListTest($searchWords[13], $searchType[14])) && p() && e('10'); //测试在项目集类型中搜索带有项目集字体的条数 r($search->getListTest($searchWords[14], $searchType[15])) && p() && e('110'); //测试在项目类型中搜索带有项目字体的条数 r($search->getListTest($searchWords[15], $searchType[16])) && p() && e('630'); //测试在迭代类型中搜索带有迭代字体的条数 -r($search->getListTest($searchWords[16], $searchType[17])) && p() && e('450'); //测试在需求类型中搜索带有需求字体的条数 +r($search->getListTest($searchWords[16], $searchType[17])) && p() && e('450'); //测试在需求类型中搜索带有需求字体的条数 \ No newline at end of file diff --git a/test/model/search/getquery.php b/test/model/search/getquery.php old mode 100644 new mode 100755 index 5331d93ba0..54ff883171 --- a/test/model/search/getquery.php +++ b/test/model/search/getquery.php @@ -10,6 +10,13 @@ title=测试 searchModel->getQuery(); cid=1 pid=1 +查询ID为1的搜索条件名称及查询数量 >> 任务查询测试条件,27 +查询ID为2的搜索条件名称及查询数量 >> 需求查找条件,1 +查询ID为3的搜索条件名称及查询数量 >> 用户测试条件,1 +查询ID为4的搜索条件名称及查询数量 >> 项目版本搜索,1 +查询ID为5的搜索条件名称及查询数量 >> 执行版本搜索,1 +查询ID为6的搜索条件名称及查询数量 >> 设计搜索,32 + */ $search = new searchTest(); @@ -21,4 +28,4 @@ r($search->getQueryTest($queryIDList[1])) && p('title,queryCount') && e('需求 r($search->getQueryTest($queryIDList[2])) && p('title,queryCount') && e('用户测试条件,1'); //查询ID为3的搜索条件名称及查询数量 r($search->getQueryTest($queryIDList[3])) && p('title,queryCount') && e('项目版本搜索,1'); //查询ID为4的搜索条件名称及查询数量 r($search->getQueryTest($queryIDList[4])) && p('title,queryCount') && e('执行版本搜索,1'); //查询ID为5的搜索条件名称及查询数量 -r($search->getQueryTest($queryIDList[5])) && p('title,queryCount') && e('设计搜索,32'); //查询ID为6的搜索条件名称及查询数量 +r($search->getQueryTest($queryIDList[5])) && p('title,queryCount') && e('设计搜索,32'); //查询ID为6的搜索条件名称及查询数量 \ No newline at end of file diff --git a/test/model/search/getquerypairs.php b/test/model/search/getquerypairs.php old mode 100644 new mode 100755 index fbfe235559..5c329df865 --- a/test/model/search/getquerypairs.php +++ b/test/model/search/getquerypairs.php @@ -10,6 +10,14 @@ title=测试 searchModel->getQueryPairs(); cid=1 pid=1 +查询module为task的键值对 >> 任务查询测试条件 +查询module为executionStory的键值对 >> 需求查找条件 +查询module为user的键值对 >> 用户测试条件 +查询module为projectBuild的键值对 >> 项目版本搜索 +查询module为executionBuild的键值对 >> 执行版本搜索 +查询module为design的键值对 >> 设计搜索 +查询module不存在的情况 >> 我的查询 + */ $search = new searchTest(); @@ -22,4 +30,4 @@ r($search->getQueryPairsTest($queryIDList[2])) && p('3') && e('用户测试条 r($search->getQueryPairsTest($queryIDList[3])) && p('4') && e('项目版本搜索'); //查询module为projectBuild的键值对 r($search->getQueryPairsTest($queryIDList[4])) && p('5') && e('执行版本搜索'); //查询module为executionBuild的键值对 r($search->getQueryPairsTest($queryIDList[5])) && p('6') && e('设计搜索'); //查询module为design的键值对 -r($search->getQueryPairsTest($queryIDList[6])) && p('') && e('我的查询'); //查询module不存在的情况 +r($search->getQueryPairsTest($queryIDList[6])) && p('') && e('我的查询'); //查询module不存在的情况 \ No newline at end of file diff --git a/test/model/search/getsummary.php b/test/model/search/getsummary.php old mode 100644 new mode 100755 index 69f5c8bd9d..839ff1587c --- a/test/model/search/getsummary.php +++ b/test/model/search/getsummary.php @@ -10,10 +10,12 @@ title=测试 searchModel->getSummary(); cid=1 pid=1 +测试搜索的内容中不带关键字的结果展示 >> 【步骤】【结果】【期望】 +测试搜索的内容中带关键字的结果展示 >> 【步 】【结果】【期望】 + */ $search = new searchTest(); r($search->getSummaryTest(1, 0)) && p() && e('【步骤】【结果】【期望】'); //测试搜索的内容中不带关键字的结果展示 -r($search->getSummaryTest(1, 39588)) && p() && e("【步 】【结果】【期望】"); //测试搜索的内容中带关键字的结果展示 - +r($search->getSummaryTest(1, 39588)) && p() && e("【步 】【结果】【期望】"); //测试搜索的内容中带关键字的结果展示 \ No newline at end of file diff --git a/test/model/search/markkeywords.php b/test/model/search/markkeywords.php old mode 100644 new mode 100755 index 2f56d24da3..f7dc14150f --- a/test/model/search/markkeywords.php +++ b/test/model/search/markkeywords.php @@ -10,8 +10,10 @@ title=测试 searchModel->markKeywords(); cid=1 pid=1 +测试查找带骤字的bug >> 12304 27493 12305 12304 32467 26524 12305 12304 26399 26395 12305 + */ $search = new searchTest(); -r($search->markKeywordsTest(1, 39588)) && p() && e("12304 27493 12305 12304 32467 26524 12305 12304 26399 26395 12305"); //测试查找带骤字的bug +r($search->markKeywordsTest(1, 39588)) && p() && e("12304 27493 12305 12304 32467 26524 12305 12304 26399 26395 12305"); //测试查找带骤字的bug \ No newline at end of file diff --git a/test/model/search/savedict.php b/test/model/search/savedict.php old mode 100644 new mode 100755 index 0c36803ed5..d764b34272 --- a/test/model/search/savedict.php +++ b/test/model/search/savedict.php @@ -10,9 +10,12 @@ title=测试 searchModel->saveDict(); cid=1 pid=1 +创建我是标题的搜索索引 >> 4 +创建特殊字符的搜索索引 >> 0 + */ $search = new searchTest(); r($search->saveDictTest('我是标题')) && p() && e('4'); //创建我是标题的搜索索引 -r($search->saveDictTest('!@#$%^&*()_+')) && p() && e('0'); //创建特殊字符的搜索索引 +r($search->saveDictTest('!@#$%^&*()_+')) && p() && e('0'); //创建特殊字符的搜索索引 \ No newline at end of file diff --git a/test/model/search/saveindex.php b/test/model/search/saveindex.php old mode 100644 new mode 100755 index fcafa94bb4..af53b82929 --- a/test/model/search/saveindex.php +++ b/test/model/search/saveindex.php @@ -10,9 +10,12 @@ title=测试 searchModel->saveIndex(); cid=1 pid=1 +创建ID为10的bug的索引 >> 1 +创建ID为10的任务的索引 >> 1 + */ $search = new searchTest(); r($search->saveIndexTest('bug', 10)) && p() && e('1'); //创建ID为10的bug的索引 -r($search->saveIndexTest('task', 10)) && p() && e('1'); //创建ID为10的任务的索引 +r($search->saveIndexTest('task', 10)) && p() && e('1'); //创建ID为10的任务的索引 \ No newline at end of file diff --git a/test/model/setting/createdao.php b/test/model/setting/createdao.php index b608c612f1..4fe0429f18 100755 --- a/test/model/setting/createdao.php +++ b/test/model/setting/createdao.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -86,4 +87,4 @@ r($setting->createDAOTest($paramString[10], $method[1])) && p() && e('7'); r($setting->createDAOTest($paramString[11], $method[1])) && p() && e('13'); //测试删除参数包含vision的config数据 r($setting->createDAOTest($paramString[12], $method[1])) && p() && e('0'); //测试删除参数为空的config数据 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/setting/deleteitems.php b/test/model/setting/deleteitems.php old mode 100644 new mode 100755 index bffcdaa3fe..271f3b2a4b --- a/test/model/setting/deleteitems.php +++ b/test/model/setting/deleteitems.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -57,4 +58,4 @@ r($setting->deleteItemsTest($params[10])) && p() && e('0'); // 删除所有者 r($setting->deleteItemsTest($params[11])) && p() && e('0'); // 删除视图是rnd的数据 r($setting->deleteItemsTest($params[12])) && p() && e('0'); // 删除所有的数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/setting/getitem.php b/test/model/setting/getitem.php old mode 100644 new mode 100755 index 02b4bd84e7..acb92a468b --- a/test/model/setting/getitem.php +++ b/test/model/setting/getitem.php @@ -27,7 +27,7 @@ pid=1 查询所有者是系统并且所属模块是common、值是CRProduct的第一条数据 >> 1 查询所有者是系统并且所属模块是common、附加条件是global、值是version的第一条数据 >> 1 查询所有者是admin并且所属模块是common、值是URSR的第一条数据 >> 1 -查询所有者是admin并且所属模块是common、附加条件是block、值是initVersion的第一条数据 >> 1 +查询所有者是admin并且所属模块是my、附加条件是block、值是initVersion的第一条数据 >> 1 查询不存在的界面配置 >> 0 查询不存在的所有者配置 >> 0 查询不存在的模块配置 >> 0 @@ -85,4 +85,4 @@ r($setting->getItemTest($items[18])) && p() && e('0'); // 查询不存在的界 r($setting->getItemTest($items[19])) && p() && e('0'); // 查询不存在的所有者配置 r($setting->getItemTest($items[20])) && p() && e('0'); // 查询不存在的模块配置 r($setting->getItemTest($items[21])) && p() && e('0'); // 查询不存在的附加条件配置 -r($setting->getItemTest($items[22])) && p() && e('0'); // 查询不存在的值配置 +r($setting->getItemTest($items[22])) && p() && e('0'); // 查询不存在的值配置 \ No newline at end of file diff --git a/test/model/setting/getitems.php b/test/model/setting/getitems.php old mode 100644 new mode 100755 index a9850988c5..4b7b777d81 --- a/test/model/setting/getitems.php +++ b/test/model/setting/getitems.php @@ -85,4 +85,4 @@ r($setting->getItemsTest($items[18])) && p() && e('0'); // 查询 r($setting->getItemsTest($items[19])) && p() && e('0'); // 查询不存在的所有者配置 r($setting->getItemsTest($items[20])) && p() && e('0'); // 查询不存在的模块配置 r($setting->getItemsTest($items[21])) && p() && e('0'); // 查询不存在的附加条件配置 -r($setting->getItemsTest($items[22])) && p() && e('0'); // 查询不存在的值配置 +r($setting->getItemsTest($items[22])) && p() && e('0'); // 查询不存在的值配置 \ No newline at end of file diff --git a/test/model/setting/parseitemparam.php b/test/model/setting/parseitemparam.php old mode 100644 new mode 100755 index d38369bf72..b8dc32eb7e --- a/test/model/setting/parseitemparam.php +++ b/test/model/setting/parseitemparam.php @@ -55,4 +55,4 @@ r($setting->parseItemParamTest($params[8])) && p('vision,owner,module,section,k r($setting->parseitemparamtest($params[9])) && p('vision,owner,module,section,key') && e(',,,xuanxuan,'); // 解析参数包含section的数据 r($setting->parseitemparamtest($params[10])) && p('vision,owner,module,section,key') && e(',admin,,,'); // 解析参数包含owner的数据 r($setting->parseitemparamtest($params[11])) && p('vision,owner,module,section,key') && e('rnd,,,,'); // 解析参数包含vision的数据 -r($setting->parseitemparamtest($params[12])) && p('vision,owner,module,section,key') && e(',,,,'); // 解析空数据 +r($setting->parseitemparamtest($params[12])) && p('vision,owner,module,section,key') && e(',,,,'); // 解析空数据 \ No newline at end of file diff --git a/test/model/setting/setitem.php b/test/model/setting/setitem.php old mode 100644 new mode 100755 index 4109182225..139f294e48 --- a/test/model/setting/setitem.php +++ b/test/model/setting/setitem.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -72,4 +73,4 @@ r($setting->setItemTest($pathList[15], 'test15')) && p() && e('0'); // 设 r($setting->setItemTest($pathList[16], 'test16')) && p() && e('test16'); // 设置有vision的project模块的admin配置数据 r($setting->setItemTest($pathList[17], 'test17')) && p() && e('test17'); // 设置有vision的product模块的admin配置数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/setting/setitems.php b/test/model/setting/setitems.php old mode 100644 new mode 100755 index ef4c662e38..d6d9f88dc7 --- a/test/model/setting/setitems.php +++ b/test/model/setting/setitems.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -90,4 +91,4 @@ r($setting->setItemsTest($pathList[7], $items)) && p() && e('1'); // 创建有vi r($setting->setItemsTest($pathList[8], $items)) && p() && e('1'); // 创建有vision,只有所有者且值为project和story的数据 r($setting->setItemsTest($pathList[9], $items)) && p() && e('1'); // 创建有vision,common模块且值为project和story的数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/setting/setsn.php b/test/model/setting/setsn.php index aec97680b2..16219af18f 100755 --- a/test/model/setting/setsn.php +++ b/test/model/setting/setsn.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -18,4 +19,4 @@ $setting = new settingTest(); r($setting->setSNTest()) && p() && e('1'); //测试正常设置SN -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/setting/updateversion.php b/test/model/setting/updateversion.php index 171c1d2068..00cce6b7e8 100755 --- a/test/model/setting/updateversion.php +++ b/test/model/setting/updateversion.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($setting->updateVersionTest($versionList[2])) && p('1:value') && e('max2.0'); r($setting->updateVersionTest($versionList[3])) && p('1:value') && e('biz6.5'); //测试version值为biz6.5,更新数据 r($setting->updateVersionTest($versionList[4])) && p('1:value') && e('0'); //测试version值为0,更新数据 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/sonarqube/apicreateproject.php b/test/model/sonarqube/apicreateproject.php old mode 100644 new mode 100755 index 0a007ace9c..08fd8f7247 --- a/test/model/sonarqube/apicreateproject.php +++ b/test/model/sonarqube/apicreateproject.php @@ -10,10 +10,10 @@ title=测试 sonarqubeModel::apiCreateProject(); cid=1 pid=1 -使用空的sonarqubeID、项目对象创建sonarqube项目 >> return false +使用空的sonarqubeID、项目对象创建sonarqube项目 >> return false 使用空的sonarqubeID、正确的项目对象创建sonarqube项目 >> return false -使用正确的sonarqubeID,项目对象创建sonarqube项目 >> unit_test -使用重复的项目对象创建sonarqube项目 >> Could not create Project, key already exists: unit_test +使用正确的sonarqubeID,项目对象创建sonarqube项目 >> unit test +使用重复的项目对象创建sonarqube项目 >> Could not create Project, key already exists: unit_test */ @@ -27,4 +27,4 @@ r($sonarqube->apiCreateProjectTest(0, $t_empty_project)) && p() r($sonarqube->apiCreateProjectTest(0, $t_project)) && p() && e('return false'); //使用空的sonarqubeID、正确的项目对象创建sonarqube项目 $sonarqube->apiDeleteProjectTest($sonarqubeID, 'unit_test'); r($sonarqube->apiCreateProjectTest($sonarqubeID, $t_project)) && p('project:key') && e('unit test'); //使用正确的sonarqubeID,项目对象创建sonarqube项目 -r($sonarqube->apiCreateProjectTest($sonarqubeID, $t_project)) && p('0:msg') && e("Could not create Project, key already exists: unit_test"); //使用重复的项目对象创建sonarqube项目 +r($sonarqube->apiCreateProjectTest($sonarqubeID, $t_project)) && p('0:msg') && e("Could not create Project, key already exists: unit_test"); //使用重复的项目对象创建sonarqube项目 \ No newline at end of file diff --git a/test/model/sonarqube/apideleteproject.php b/test/model/sonarqube/apideleteproject.php old mode 100644 new mode 100755 index 4adfd0fe70..734301c3eb --- a/test/model/sonarqube/apideleteproject.php +++ b/test/model/sonarqube/apideleteproject.php @@ -10,10 +10,10 @@ title=测试 sonarqubeModel::apiDeleteProject(); cid=1 pid=1 -通过不正确的sonarqubeID、projectKey,删除SonarQube项目 >> return false -正确的sonarqubeID,空的projectKey,删除SonarQube项目 >> The 'project' parameter is missing +通过不正确的sonarqubeID、projectKey,删除SonarQube项目 >> return false +正确的sonarqubeID,空的projectKey,删除SonarQube项目 >> The 'project' parameter is missing 正确的sonarqubeID,不存在的projectKey,删除SonarQube项目 >> Project 'no_project' not found -正确的sonarqubeID、projectKey,删除SonarQube项目 >> return true +正确的sonarqubeID、projectKey,删除SonarQube项目 >> return true */ @@ -28,4 +28,4 @@ r($sonarqube->apiDeleteProjectTest(0, $t_empty_projectkey)) && p() r($sonarqube->apiDeleteProjectTest($sonarqubeID, $t_empty_projectkey)) && p('0:msg') && e("The 'project' parameter is missing"); //正确的sonarqubeID,空的projectKey,删除SonarQube项目 r($sonarqube->apiDeleteProjectTest($sonarqubeID, $t_no_projectkey)) && p('0:msg') && e("Project 'no_project' not found"); //正确的sonarqubeID,不存在的projectKey,删除SonarQube项目 $sonarqube->apiCreateProjectTest($sonarqubeID, array('projectName' => $t_projectkey, 'projectKey' => $t_projectkey)); -r($sonarqube->apiDeleteProjectTest($sonarqubeID, $t_projectkey)) && p() && e("return true"); //正确的sonarqubeID、projectKey,删除SonarQube项目 +r($sonarqube->apiDeleteProjectTest($sonarqubeID, $t_projectkey)) && p() && e("return true"); //正确的sonarqubeID、projectKey,删除SonarQube项目 \ No newline at end of file diff --git a/test/model/sonarqube/apigetissues.php b/test/model/sonarqube/apigetissues.php old mode 100644 new mode 100755 index f5a919b37e..702c1ae21c --- a/test/model/sonarqube/apigetissues.php +++ b/test/model/sonarqube/apigetissues.php @@ -10,9 +10,9 @@ title=测试 sonarqubeModel::apiGetIssues(); cid=1 pid=1 -通过sonarqubeID,获取SonarQube问题列表 >> 1 +通过sonarqubeID,获取SonarQube问题列表 >> 1 通过sonarqubeID,项目key获取SonarQube问题列表 >> 1 -当sonarqubeID为0时,获取SonarQube问题列表 >> return empty +当sonarqubeID为0时,获取SonarQube问题列表 >> return empty */ @@ -22,4 +22,4 @@ $projectKey = 'zentaopms'; $sonarqube = new sonarqubeTest(); r($sonarqube->apiGetIssuesTest($sonarqubeID)) && p() && e('1'); //通过sonarqubeID,获取SonarQube问题列表 r($sonarqube->apiGetIssuesTest($sonarqubeID, $projectKey)) && p() && e('1'); //通过sonarqubeID,项目key获取SonarQube问题列表 -r($sonarqube->apiGetIssuesTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube问题列表 +r($sonarqube->apiGetIssuesTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube问题列表 \ No newline at end of file diff --git a/test/model/sonarqube/apigetprojects.php b/test/model/sonarqube/apigetprojects.php old mode 100644 new mode 100755 index 1f4b4f87a5..43141a13c3 --- a/test/model/sonarqube/apigetprojects.php +++ b/test/model/sonarqube/apigetprojects.php @@ -10,10 +10,10 @@ title=测试 sonarqubeModel::apiGetProjects(); cid=1 pid=1 -通过sonarqubeID,获取SonarQube项目列表 >> 1 -通过sonarqubeID,获取SonarQube项目数量 >> 1 +通过sonarqubeID,获取SonarQube项目列表 >> 1 +通过sonarqubeID,获取SonarQube项目数量 >> 1 通过sonarqubeID,关键字,搜索获取SonarQube项目 >> 1 -当sonarqubeID为0时,获取SonarQube项目列表 >> return empty +当sonarqubeID为0时,获取SonarQube项目列表 >> return empty */ @@ -24,4 +24,4 @@ $sonarqube = new sonarqubeTest(); r($sonarqube->apiGetProjectsTest($sonarqubeID)) && p() && e('1'); //通过sonarqubeID,获取SonarQube项目列表 r(count($sonarqube->apiGetProjectsTest($sonarqubeID)) > 0) && p() && e('1'); //通过sonarqubeID,获取SonarQube项目数量 r($sonarqube->apiGetProjectsTest($sonarqubeID, $keyword)) && p() && e('1'); //通过sonarqubeID,关键字,搜索获取SonarQube项目 -r($sonarqube->apiGetProjectsTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube项目列表 +r($sonarqube->apiGetProjectsTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube项目列表 \ No newline at end of file diff --git a/test/model/sonarqube/apigetqualitygate.php b/test/model/sonarqube/apigetqualitygate.php old mode 100644 new mode 100755 index 6367fcea6a..58b9992316 --- a/test/model/sonarqube/apigetqualitygate.php +++ b/test/model/sonarqube/apigetqualitygate.php @@ -8,6 +8,10 @@ title=测试 sonarqubeModel::apiGetQualitygate(); cid=1 pid=1 +通过错误的sonarqubeID、projectKey,查询sonarqube质量门信息 >> return empty +通过正确的sonarqubeID,不存在的projectKey查询sonarqube质量门信息 >> Project 'wrong_project' not found +通过正确的sonarqubeID、projectKey查询sonarqube质量门信息 >> success + */ $sonarqube = $tester->loadModel('sonarqube'); @@ -26,4 +30,4 @@ r($result->errors) && p('0:msg') && e("Project 'wrong_project' not found"); // $projectKey = 'zentaopms'; $result = $sonarqube->apiGetReport($sonarqubeID, $projectKey); if(!empty($result->component)) $result = 'success'; -r($result) && p() && e("success"); //通过正确的sonarqubeID、projectKey查询sonarqube质量门信息 +r($result) && p() && e("success"); //通过正确的sonarqubeID、projectKey查询sonarqube质量门信息 \ No newline at end of file diff --git a/test/model/sonarqube/apigetreport.php b/test/model/sonarqube/apigetreport.php old mode 100644 new mode 100755 index 250842676c..1a6b61470e --- a/test/model/sonarqube/apigetreport.php +++ b/test/model/sonarqube/apigetreport.php @@ -8,6 +8,11 @@ title=测试 sonarqubeModel::apiGetReport(); cid=1 pid=1 +通过错误的sonarqubeID、projectKey,查询sonarqube报告 >> return empty +通过正确的sonarqubeID,不存在的projectKey查询sonarqube报告 >> Component key 'wrong_project' not found +通过正确的sonarqubeID、projectKey,不正确的metricKeys查询sonarqube报告 >> The following metric keys are not found: wrong_params +通过正确的sonarqubeID、projectKey、metricKeys,查询sonarqube报告 >> success + */ $sonarqube = $tester->loadModel('sonarqube'); @@ -31,4 +36,4 @@ r($result->errors) && p('0:msg') && e("The following metric keys are not found: $metricKeys = 'bugs'; $result = $sonarqube->apiGetReport($sonarqubeID, $projectKey, $metricKeys); if(!empty($result->component)) $result = 'success'; -r($result) && p() && e('success'); //通过正确的sonarqubeID、projectKey、metricKeys,查询sonarqube报告 +r($result) && p() && e('success'); //通过正确的sonarqubeID、projectKey、metricKeys,查询sonarqube报告 \ No newline at end of file diff --git a/test/model/sonarqube/apivalidate.php b/test/model/sonarqube/apivalidate.php old mode 100644 new mode 100755 index 12c4608a3a..db809d7f1e --- a/test/model/sonarqube/apivalidate.php +++ b/test/model/sonarqube/apivalidate.php @@ -10,8 +10,8 @@ title=测试 sonarqubeModel::apiValidate(); cid=1 pid=1 -通过host,token检验api权限 >> success -通过正确的host,错误的token获取api权限 >> return false +通过host,token检验api权限 >> success +通过正确的host,错误的token获取api权限 >> return false 通过正确的host,非管理员权限的token获取api权限 >> return false */ @@ -24,4 +24,4 @@ $noAdminToken = 'dGVzdDoxMjM0NTY='; $sonarqube = new sonarqubeTest(); r($sonarqube->apiValidateTest($sonarqubeID)) && p() && e('success'); //通过host,token检验api权限 r($sonarqube->apiValidateTest($sonarqubeID, '', $errorToken)) && p() && e('return false'); //通过正确的host,错误的token获取api权限 -r($sonarqube->apiValidateTest($sonarqubeID, '', $noAdminToken)) && p() && e('return false'); //通过正确的host,非管理员权限的token获取api权限 +r($sonarqube->apiValidateTest($sonarqubeID, '', $noAdminToken)) && p() && e('return false'); //通过正确的host,非管理员权限的token获取api权限 \ No newline at end of file diff --git a/test/model/sonarqube/createproject.php b/test/model/sonarqube/createproject.php old mode 100644 new mode 100755 index 33a9060f26..2c1aa77acf --- a/test/model/sonarqube/createproject.php +++ b/test/model/sonarqube/createproject.php @@ -10,10 +10,9 @@ title=测试 sonarqubeModel::createProject(); cid=1 pid=1 -使用空的项目数据,空的sonarqubeID创建Sonarqube项目 >> 『项目名称』不能为空 -使用错误项目数据,正确的sonarqubeID创建Sonarqube项目 >> return error -使用正确的项目数据,空的sonarqubeID创建Sonarqube项目 >> return false -使用正确的sonarqubeID和Sonarqube项目信息创建Sonarqube项目 >> 1 +使用空的项目数据,空的sonarqubeID创建Sonarqube项目 >> 『项目名称』不能为空 +使用错误项目数据,正确的sonarqubeID创建Sonarqube项目 >> return error +使用正确的项目数据,空的sonarqubeID创建Sonarqube项目 >> return false */ @@ -28,4 +27,4 @@ r($sonarqube->createProjectTest(0, $empty_post)) && p('projectName:0' r($sonarqube->createProjectTest($sonarqubeID, $error_post)) && p() && e("return error"); //使用错误项目数据,正确的sonarqubeID创建Sonarqube项目 r($sonarqube->createProjectTest(0, $true_post)) && p() && e('return false'); //使用正确的项目数据,空的sonarqubeID创建Sonarqube项目 $sonarqube->apiDeleteProjectTest($sonarqubeID, 'unit_test'); -r($sonarqube->createProjectTest($sonarqubeID, $true_post)) && p() && e(1); //使用正确的sonarqubeID和Sonarqube项目信息创建Sonarqube项目 +r($sonarqube->createProjectTest($sonarqubeID, $true_post)) && p() && e(1); //使用正确的sonarqubeID和Sonarqube项目信息创建Sonarqube项目 \ No newline at end of file diff --git a/test/model/sonarqube/getapibase.php b/test/model/sonarqube/getapibase.php old mode 100644 new mode 100755 index ef7193d975..a6744e132b --- a/test/model/sonarqube/getapibase.php +++ b/test/model/sonarqube/getapibase.php @@ -19,4 +19,4 @@ $sonarqubeID = 2; $sonarqube = new sonarqubeTest(); r($sonarqube->getApiBaseTest($sonarqubeID)) && p() && e('http://192.168.1.161:59001/api/%s'); //通过sonarqubeID,获取SonarQube url和header -r($sonarqube->getApiBaseTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube url和header +r($sonarqube->getApiBaseTest(0)) && p() && e('return empty'); //当sonarqubeID为0时,获取SonarQube url和header \ No newline at end of file diff --git a/test/model/sonarqube/getcachefile.php b/test/model/sonarqube/getcachefile.php old mode 100644 new mode 100755 index 5413013ec7..7d88e28955 --- a/test/model/sonarqube/getcachefile.php +++ b/test/model/sonarqube/getcachefile.php @@ -10,7 +10,7 @@ title=测试 sonarqubeModel::getCacheFile(); cid=1 pid=1 -使用正确的sonarqubeID,项目key获取缓存文件 >> 1 + */ @@ -18,4 +18,4 @@ $sonarqubeID = 2; $projectKey = 'unit_test'; $sonarqube = new sonarqubeTest(); -r($sonarqube->getCacheFileTest($sonarqubeID, $projectKey)) && p('') && e(1); //使用正确的sonarqubeID,项目key获取缓存文件 +r($sonarqube->getCacheFileTest($sonarqubeID, $projectKey)) && p('') && e(1); //使用正确的sonarqubeID,项目key获取缓存文件 \ No newline at end of file diff --git a/test/model/sonarqube/getlinkedproducts.php b/test/model/sonarqube/getlinkedproducts.php old mode 100644 new mode 100755 index 627189cf97..0fc9be868c --- a/test/model/sonarqube/getlinkedproducts.php +++ b/test/model/sonarqube/getlinkedproducts.php @@ -8,6 +8,9 @@ title=测试 sonarqubeModel::getLinkedProducts(); cid=1 pid=1 +通过错误的sonarqubeID和projectKey获取关联产品ID >> return false +通过正确的sonarqubeID和projectKey获取关联产品ID >> 1 + */ $sonarqube = $tester->loadModel('sonarqube'); @@ -21,4 +24,4 @@ r($result) && p() && e('return false'); //通过错误的sonarqubeID和projectKe $sonarqubeID = 2; $projectKey = 'zentaopms'; $result = $sonarqube->getLinkedProducts($sonarqubeID, $projectKey); -r($result) && p() && e('1'); //通过正确的sonarqubeID和projectKey获取关联产品ID +r($result) && p() && e('1'); //通过正确的sonarqubeID和projectKey获取关联产品ID \ No newline at end of file diff --git a/test/model/sso/createuser.php b/test/model/sso/createuser.php index 5e181bd87c..f7273e3b75 100755 --- a/test/model/sso/createuser.php +++ b/test/model/sso/createuser.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=ssoModel->createUser(); cid=1 pid=1 -用户存在的情况 >> fail +用户存在的情况 >> fail 用户信息错误的情况 >> fail -用户不存在的情况 >> bindUser1 +用户不存在的情况 >> bindUser1 */ @@ -41,4 +42,4 @@ $failUser = array( r($sso->createTest($existsUser)) && p('status') && e('fail'); // 用户存在的情况 r($sso->createTest($failUser)) && p('status') && e('fail'); // 用户信息错误的情况 r($sso->createTest($newUser)) && p('account') && e('bindUser1'); // 用户不存在的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/sso/getbinduser.php b/test/model/sso/getbinduser.php index facc679613..07990d10c9 100755 --- a/test/model/sso/getbinduser.php +++ b/test/model/sso/getbinduser.php @@ -9,7 +9,7 @@ cid=1 pid=1 用户不存在绑定的情况 >> not user -用户存在绑定的情况 >> admin +用户存在绑定的情况 >> admin */ @@ -21,4 +21,4 @@ $realUser = 'admin'; $res = $sso->getBindUser($emptyUser); if(!$res) $res = 'not user'; r($res) && p() && e('not user'); // 用户不存在绑定的情况 -r($sso->getBindUser($realUser)) && p('account') && e('admin'); // 用户存在绑定的情况 +r($sso->getBindUser($realUser)) && p('account') && e('admin'); // 用户存在绑定的情况 \ No newline at end of file diff --git a/test/model/sso/getbindusers.php b/test/model/sso/getbindusers.php index 65a3d2fb00..79dd89523a 100755 --- a/test/model/sso/getbindusers.php +++ b/test/model/sso/getbindusers.php @@ -14,4 +14,4 @@ pid=1 $sso = $tester->loadModel('sso'); -r($sso->getBindUsers()) && p('admin') && e('admin'); // 获取第一条记录账号 +r($sso->getBindUsers()) && p('admin') && e('admin'); // 获取第一条记录账号 \ No newline at end of file diff --git a/test/model/stage/batchcreate.php b/test/model/stage/batchcreate.php index b00916db31..e235895fcd 100755 --- a/test/model/stage/batchcreate.php +++ b/test/model/stage/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -43,4 +44,4 @@ r($stage->batchCreateTest($param1)) && p() && e('8'); // 测试批量创建阶 r($stage->batchCreateTest($param2)) && p() && e('10'); // 测试批量创建阶段 2 r($stage->batchCreateTest($param3)) && p() && e('12'); // 测试批量创建阶段 3 r($stage->batchCreateTest($param4)) && p() && e('13'); // 测试批量创建阶段 4 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stage/create.php b/test/model/stage/create.php index 900bbf25bc..507cdea273 100755 --- a/test/model/stage/create.php +++ b/test/model/stage/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -64,4 +65,4 @@ r($stage->createTest($stage4)) && p('name,percent,type') && e('新建的测试,4 r($stage->createTest($stage5)) && p('name,percent,type') && e('新建的发布,5,release'); // 测试新建一个发布阶段 r($stage->createTest($stage6)) && p('name,percent,type') && e('新建的总结评审,6,review'); // 测试新建一个总结评审阶段 r($stage->createTest($stage7)) && p('name,percent,type') && e('新建的其他,7,other'); // 测试新建一个其他阶段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stage/update.php b/test/model/stage/update.php index d09386ca34..8bf2e9caa0 100755 --- a/test/model/stage/update.php +++ b/test/model/stage/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ $stage = new stageTest(); r($stage->updateTest($stageID, $changeName)) && p('0:field,old,new') && e('name,需求,修改后的需求'); // 测试修改名称 r($stage->updateTest($stageID, $changePercent)) && p('0:field,old,new') && e('percent,10,15'); // 测试修改工作量占比 r($stage->updateTest($stageID, $changeType)) && p('0:field,old,new') && e('type,request,other'); // 测试修改阶段分类 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stakeholder/batchcreate.php b/test/model/stakeholder/batchcreate.php index dad0615100..9f9e972472 100755 --- a/test/model/stakeholder/batchcreate.php +++ b/test/model/stakeholder/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r(count($stakeholder->batchCreateTest($projectIDList[1], $normalStakeholder))) & r(count($stakeholder->batchCreateTest($projectIDList[2], $normalStakeholder))) && p() && e('6'); r(count($stakeholder->batchCreateTest($projectIDList[0], $noRealnames))) && p() && e('6'); -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stakeholder/communicate.php b/test/model/stakeholder/communicate.php index 8af55a8ecc..53ad886d67 100755 --- a/test/model/stakeholder/communicate.php +++ b/test/model/stakeholder/communicate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ r($stakeholder->communicateTest($userIDList[0], $comment)) && p('0:comment') && r($stakeholder->communicateTest($userIDList[2])) && p('0:comment') && e(''); r($stakeholder->communicateTest($userIDList[1], $comment)) && p('objectID:0') && e('『对象ID』应当是数字。'); -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stakeholder/create.php b/test/model/stakeholder/create.php index 5ac61b74dc..cee4a1eb23 100755 --- a/test/model/stakeholder/create.php +++ b/test/model/stakeholder/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -44,4 +45,4 @@ r($stakeholder->createTest($objectIDList[0],$noUser)[0]) && p() r($stakeholder->createTest($objectIDList[2],$noKey)) && p('key:0') && e('『key』不符合格式,应当为:『/0|1/』。');//输入错误的key值 r($stakeholder->createTest($objectIDList[0],$teamStakeholder)) && p('user:0') && e('『用户』已经有『po22』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。');//创建相同的干系人 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/stakeholder/edit.php b/test/model/stakeholder/edit.php index 36c89aaf35..44820fbda1 100755 --- a/test/model/stakeholder/edit.php +++ b/test/model/stakeholder/edit.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($stakeholder->editTest($stakeholderID[0], $updateAnalysis)) && p('0:field,old, r($stakeholder->editTest($stakeholderID[1], $updateStrategy)) && p() && e('0'); //修改strategy r($stakeholder->editTest($stakeholderID[0], $noKey)) && p('key:0') && e('『key』不符合格式,应当为:『/0|1/』。');//不输入是否关键干系人 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/activate.php b/test/model/story/activate.php old mode 100644 new mode 100755 index f3384ad04a..33d927f68a --- a/test/model/story/activate.php +++ b/test/model/story/activate.php @@ -48,4 +48,4 @@ r($afterActivate63) && p('status') && e('active'); //查看激活之后的需 r($afterActivate100) && p('status') && e('active'); //查看激活之后的需求状态 r($afterActivate301) && p('status') && e('active'); //查看激活之后的需求状态 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/assign.php b/test/model/story/assign.php old mode 100644 new mode 100755 index b09bdacb0a..9fbec3786f --- a/test/model/story/assign.php +++ b/test/model/story/assign.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($story->assignTest(10, 'admin')) && p('id,assignedTo') && e('10,admin'); / r($story->assignTest(100, 'user50')) && p('id,assignedTo') && e('100,user50'); //指派需求,查看返回的指派人信息 r($story->assignTest(101, 'pm1')) && p('id,assignedTo') && e('101,pm1'); //指派需求,查看返回的指派人信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchassignto.php b/test/model/story/batchassignto.php old mode 100644 new mode 100755 index de56f7d1d9..695abea928 --- a/test/model/story/batchassignto.php +++ b/test/model/story/batchassignto.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($stories) && p('4:assignedTo') && e('test20'); // 批量指派6个需 r($stories) && p('5:assignedTo') && e('test20'); // 批量指派6个需求,查看修改成功的需求指派人 r($stories) && p('6:assignedTo') && e('test20'); // 批量指派6个需求,查看修改成功的需求指派人 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchchangebranch.php b/test/model/story/batchchangebranch.php old mode 100644 new mode 100755 index 81ae3a6600..1d86e492a3 --- a/test/model/story/batchchangebranch.php +++ b/test/model/story/batchchangebranch.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r(count($stories)) && p() && e('3'); // 批量修改需求的所属分 r($stories) && p('2:branch') && e('2'); // 批量修改需求的所属分支,判断需求2修改后的分支ID r($stories) && p('4:branch') && e('2'); // 批量修改需求的所属分支,判断需求4修改后的分支ID r($stories) && p('6:branch') && e('2'); // 批量修改需求的所属分支,判断需求6修改后的分支ID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchchangemodule.php b/test/model/story/batchchangemodule.php old mode 100644 new mode 100755 index 9d33d61065..1d25228729 --- a/test/model/story/batchchangemodule.php +++ b/test/model/story/batchchangemodule.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -31,4 +32,4 @@ r($stories) && p('3:module') && e('1366'); // 批量修改6个需求的 r($stories) && p('4:module') && e('1366'); // 批量修改6个需求的模块,查看需求4修改后的模块ID r($stories) && p('5:module') && e('1366'); // 批量修改6个需求的模块,查看需求5修改后的模块ID r($stories) && p('6:module') && e('1366'); // 批量修改6个需求的模块,查看需求6修改后的模块ID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchchangeplan.php b/test/model/story/batchchangeplan.php old mode 100644 new mode 100755 index d121601d4d..818e49e6e4 --- a/test/model/story/batchchangeplan.php +++ b/test/model/story/batchchangeplan.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -46,4 +47,4 @@ r($stories2) && p('3:plan') && e(',1366,1400'); // 批量修改6个需 r($stories2) && p('4:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求4修改后的计划ID r($stories2) && p('5:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求5修改后的计划ID r($stories2) && p('6:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求6修改后的计划ID -system("../../ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchchangestage.php b/test/model/story/batchchangestage.php old mode 100644 new mode 100755 index bb1c76f0fb..91b092af5f --- a/test/model/story/batchchangestage.php +++ b/test/model/story/batchchangestage.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($result) && p('102:stage') && e('developing'); // 批量修改6个需 r($result) && p('106:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求104修改后的阶段 r($result) && p('110:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求110修改后的阶段 r($result) && p('114:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求114修改后的阶段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchclose.php b/test/model/story/batchclose.php old mode 100644 new mode 100755 index 1bb326f9c3..fdca114df9 --- a/test/model/story/batchclose.php +++ b/test/model/story/batchclose.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($stories) && p('3:status,stage,closedReason,duplicateStory') && e('clos r($stories) && p('4:status,stage,closedReason,duplicateStory') && e('closed,closed,duplicate,8'); // 批量关闭需求,查看需求4被关闭后的字段 r($stories) && p('5:status,stage,closedReason,duplicateStory') && e('closed,closed,cancel,0'); // 批量关闭需求,查看需求5被关闭后的字段 r($stories) && p('6:status,stage,closedReason,duplicateStory') && e('closed,closed,bydesign,0'); // 批量关闭需求,查看需求6被关闭后的字段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchcreate.php b/test/model/story/batchcreate.php old mode 100644 new mode 100755 index 6c16936065..b3f48a12e6 --- a/test/model/story/batchcreate.php +++ b/test/model/story/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r(count($result1)) && p() && e('2'); // 插入两条软件需求,判断返回 r(count($result2)) && p() && e('2'); // 插入两条用户需求,判断返回的需求总量 r($result1) && p('401:title,type,pri,spec,estimate,stage,module') && e('测试需求1,story,1,测试需求描述1,1,planned,2221'); // 插入两条软件需求,判断返回的title、type等信息 r($result2) && p('404:title,type,pri,spec,estimate,stage,module') && e('测试需求2,requirement,2,测试需求描述2,2,planned,2222'); // 插入两条用户需求,判断返回的title、type等信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchgetstorystage.php b/test/model/story/batchgetstorystage.php old mode 100644 new mode 100755 diff --git a/test/model/story/batchreview.php b/test/model/story/batchreview.php old mode 100644 new mode 100755 index bd56f96d54..fd715563d1 --- a/test/model/story/batchreview.php +++ b/test/model/story/batchreview.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r(count($review2)) && p() && e('2'); r($review2) && p('308:status,stage,closedReason') && e('closed,closed,bydesign'); // 批量评审需求,查看被评审后的需求状态、阶段等信息 r(count($review3)) && p() && e('2'); // 批量评审传入三个ID,查看被评审的需求数量 r($review3) && p('314:status,stage,closedReason') && e('active,projected,cancel'); // 批量评审需求,查看被评审后的需求状态、阶段等信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchtotask.php b/test/model/story/batchtotask.php old mode 100644 new mode 100755 index de5de3b1ac..6ceaa240b7 --- a/test/model/story/batchtotask.php +++ b/test/model/story/batchtotask.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($tasks) && p('912:project,execution,name,status,pri,type,assignedTo') r($tasks) && p('913:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求70,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段 r($tasks) && p('914:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求102,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段 r($tasks) && p('915:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求220,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/batchupdate.php b/test/model/story/batchupdate.php old mode 100644 new mode 100755 index f119e4dfa3..4ae8455394 --- a/test/model/story/batchupdate.php +++ b/test/model/story/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -52,4 +53,4 @@ r(count($result1)) && p() && e('2'); // 更新两条软件需求,判断返回 r(count($result2)) && p() && e('2'); // 更新两条用户需求,判断返回的需求总量 r($result1) && p('14:title,type,pri,sourceNote,estimate,module') && e('测试软件需求2,story,3,测试来源备注2,3,2223'); // 更新两条软件需求,判断返回的title、type等信息 r($result2) && p('15:title,type,pri,sourceNote,estimate,module') && e('测试用户需求2,requirement,3,测试来源备注2,3,2221'); // 更新两条用户需求,判断返回的title、type等信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/change.php b/test/model/story/change.php old mode 100644 new mode 100755 index bdb1dcd306..96b6ce2508 --- a/test/model/story/change.php +++ b/test/model/story/change.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -36,4 +37,4 @@ $result3 = $story->changeTest(26, $story3); r($result1[0]) && p() && e('『由谁评审』不能为空。'); // 不勾选【不需要评审】,不传入由谁评审时的变更,给出提示 r($result2) && p('title:0') && e('『研发需求名称』不能为空。'); // 变更时不填写需求名称,给出提示 r($result3) && p('status,title,spec,verify,estimate,lastEditedBy,version') && e('changed,测试需求1变更标题,测试需求1的变更描述,测试需求1的变更验收标准,1,admin,3'); // 正常变更需求,判断返回的status、title等信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/checkneedconfirm.php b/test/model/story/checkneedconfirm.php old mode 100644 new mode 100755 diff --git a/test/model/story/close.php b/test/model/story/close.php old mode 100644 new mode 100755 index 844b6f97c5..e707ff9c50 --- a/test/model/story/close.php +++ b/test/model/story/close.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($changes1) && p('2:field,old,new') && e('stage,wait,closed'); // 关闭一 r($changes2) && p('0:field,old,new') && e('closedReason,subdivided,willnotdo'); // 关闭一个软件需求,查看变更的字段1 r($changes2) && p('1:field,old,new') && e('assignedTo,,closed'); // 关闭一个软件需求,查看变更的字段2 r($changes2) && p('2:field,old,new') && e('status,active,closed'); // 关闭一个软件需求,查看变更的字段3 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/computeestimate.php b/test/model/story/computeestimate.php old mode 100644 new mode 100755 diff --git a/test/model/story/create.php b/test/model/story/create.php old mode 100644 new mode 100755 index b766a8f369..28305f877e --- a/test/model/story/create.php +++ b/test/model/story/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -48,4 +49,4 @@ r($result1[0]) && p() && e('『由谁评审』不能为 r($result2) && p('fromBug,stage,product') && e('0,projected,1'); //不勾选由谁评审传入评审人的情况,正常插入 r($result3) && p('title,fromBug,stage') && e('测试需求3,2,wait'); //勾选由谁评审,不传入executionID的情况,阶段为wait r($result4) && p('title:0') && e('『研发需求名称』不能为空。'); //勾选由谁评审,传入executionID和fromBug的情况,阶段为projected -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/createstoryfromgitlabissue.php b/test/model/story/createstoryfromgitlabissue.php old mode 100644 new mode 100755 index 3182137c24..a9abfffd63 --- a/test/model/story/createstoryfromgitlabissue.php +++ b/test/model/story/createstoryfromgitlabissue.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ $result3 = $story->createStoryFromGitlabIssueTest($story3, 0); r($result1) && p('id,title,stage,product') && e('401,测试需求1,projected,1'); //创建正常的需求,获取创建后的id、title、stage、product r($result2) && p('title:0') && e('『研发需求名称』不能为空。'); //需求名称为空,给出提示 r($result3) && p('id,title,stage,product') && e('402,测试需求3,projected,2'); //创建正常的需求,获取创建后的id、title、stage、product -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/extractaccountsfromlist.php b/test/model/story/extractaccountsfromlist.php old mode 100644 new mode 100755 index 4f6873cdd3..d27beab259 --- a/test/model/story/extractaccountsfromlist.php +++ b/test/model/story/extractaccountsfromlist.php @@ -9,7 +9,10 @@ title=测试 storyModel->extractAccountsFromList(); cid=1 pid=1 - +根据产品1的需求列表获取的accounts数量 >> 2 +根据产品2的需求列表获取的accounts数量 >> 2 +根据产品1的需求列表获取的account详情 >> user2 +根据产品2的需求列表获取的account详情 >> user2 */ @@ -24,4 +27,4 @@ $accounts2 = $tester->story->extractAccountsFromList($stories2); r(count($accounts1)) && p() && e('2'); // 根据产品1的需求列表获取的accounts数量 r(count($accounts2)) && p() && e('2'); // 根据产品2的需求列表获取的accounts数量 r($accounts1) && p('2') && e('user2'); // 根据产品1的需求列表获取的account详情 -r($accounts2) && p('2') && e('user2'); // 根据产品2的需求列表获取的account详情 +r($accounts2) && p('2') && e('user2'); // 根据产品2的需求列表获取的account详情 \ No newline at end of file diff --git a/test/model/story/extractaccountsfromsingle.php b/test/model/story/extractaccountsfromsingle.php old mode 100644 new mode 100755 index a934542cbe..139fa0ab78 --- a/test/model/story/extractaccountsfromsingle.php +++ b/test/model/story/extractaccountsfromsingle.php @@ -9,7 +9,10 @@ title=测试 storyModel->extractAccountsFromSingle(); cid=1 pid=1 - +根据需求2获取的accounts数量 >> 1 +根据需求4获取的accounts数量 >> 1 +根据需求2获取的account详情 >> user2 +根据需求4获取的account详情 >> dev4 */ @@ -24,4 +27,4 @@ $accounts2 = $tester->story->extractAccountsFromSingle($story2); r(count($accounts1)) && p() && e('1'); // 根据需求2获取的accounts数量 r(count($accounts2)) && p() && e('1'); // 根据需求4获取的accounts数量 r($accounts1[0]) && p('0') && e('user2'); // 根据需求2获取的account详情 -r($accounts2[0]) && p('0') && e('dev4'); // 根据需求4获取的account详情 +r($accounts2[0]) && p('0') && e('dev4'); // 根据需求4获取的account详情 \ No newline at end of file diff --git a/test/model/story/formatstories.php b/test/model/story/formatstories.php old mode 100644 new mode 100755 index 40507109cd..4437642077 --- a/test/model/story/formatstories.php +++ b/test/model/story/formatstories.php @@ -9,7 +9,14 @@ title=测试 storyModel->formatStories(); cid=1 pid=1 - +获取处理title之前的需求列表数量 >> 2 +获取处理title之前的需求列表数量 >> 2 +获取处理title之前的需求title >> 软件需求2 +获取处理title之前的需求title >> 软件需求6 +获取处理title之后的需求列表数量 >> 3 +获取处理title之后的需求列表数量 >> 3 +获取处理title之后的需求title >> 2:软件需求2 (优先级:2,预计工时:20) +获取处理title之后的需求title >> 6:软件需求6 (优先级:2,预计工时:17) */ @@ -28,4 +35,4 @@ r($stories2) && p('6:title') && e('软件需求6'); r(count($formatStories1)) && p() && e('3'); // 获取处理title之后的需求列表数量 r(count($formatStories2)) && p() && e('3'); // 获取处理title之后的需求列表数量 r($formatStories1) && p('2') && e('2:软件需求2 (优先级:2,预计工时:20)'); // 获取处理title之后的需求title -r($formatStories2) && p('6') && e('6:软件需求6 (优先级:2,预计工时:17)'); // 获取处理title之后的需求title +r($formatStories2) && p('6') && e('6:软件需求6 (优先级:2,预计工时:17)'); // 获取处理title之后的需求title \ No newline at end of file diff --git a/test/model/story/get2beclosed.php b/test/model/story/get2beclosed.php old mode 100644 new mode 100755 diff --git a/test/model/story/getaffectedscope.php b/test/model/story/getaffectedscope.php old mode 100644 new mode 100755 diff --git a/test/model/story/getallstorysort.php b/test/model/story/getallstorysort.php old mode 100644 new mode 100755 diff --git a/test/model/story/getbyassignedbyme.php b/test/model/story/getbyassignedbyme.php index e0cc7de836..283da3f703 100755 --- a/test/model/story/getbyassignedbyme.php +++ b/test/model/story/getbyassignedbyme.php @@ -27,4 +27,4 @@ r($story->getByAssignedByTest($productIDList[0], $branch)) && p() && e('0'); // r($story->getByAssignedByTest($productIDList[1], $branch)) && p() && e('0'); // 查看产品 2 由我指派的需求 r($story->getByAssignedByTest($productIDList[2], $branch)) && p() && e('0'); // 查看产品 3 由我指派的需求 r($story->getByAssignedByTest($productIDList[3], $branch)) && p() && e('0'); // 查看产品 4 由我指派的需求 -r($story->getByAssignedByTest($productIDList[4], $branch)) && p() && e('0'); // 查看产品 5 由我指派的需求 +r($story->getByAssignedByTest($productIDList[4], $branch)) && p() && e('0'); // 查看产品 5 由我指派的需求 \ No newline at end of file diff --git a/test/model/story/getbyfield.php b/test/model/story/getbyfield.php old mode 100644 new mode 100755 diff --git a/test/model/story/getbyid.php b/test/model/story/getbyid.php old mode 100644 new mode 100755 diff --git a/test/model/story/getbylist.php b/test/model/story/getbylist.php old mode 100644 new mode 100755 diff --git a/test/model/story/getbysearch.php b/test/model/story/getbysearch.php old mode 100644 new mode 100755 diff --git a/test/model/story/getbysql.php b/test/model/story/getbysql.php old mode 100644 new mode 100755 diff --git a/test/model/story/getchangedstories.php b/test/model/story/getchangedstories.php old mode 100644 new mode 100755 index 8358545d80..83f9c27ad5 --- a/test/model/story/getchangedstories.php +++ b/test/model/story/getchangedstories.php @@ -9,7 +9,8 @@ title=测试 storyModel->getChangedStories(); cid=1 pid=1 - +获取需求26关联的用户需求数量 >> 1 +获取需求26关联的用户需求详情 >> 用户需求25,draft,requirement */ @@ -19,4 +20,4 @@ $story = $tester->story->getById(26); $requirements = $tester->story->getChangedStories($story); r(count($requirements)) && p() && e('1'); // 获取需求26关联的用户需求数量 -r($requirements) && p('25:title,status,type') && e('用户需求25,draft,requirement'); // 获取需求26关联的用户需求详情 +r($requirements) && p('25:title,status,type') && e('用户需求25,draft,requirement'); // 获取需求26关联的用户需求详情 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperassignedto.php b/test/model/story/getdataofstorysperassignedto.php old mode 100644 new mode 100755 index 6e4ffa0e78..4f02fd06ba --- a/test/model/story/getdataofstorysperassignedto.php +++ b/test/model/story/getdataofstorysperassignedto.php @@ -9,7 +9,8 @@ title=测试 storyModel->getDataOfStorysPerAssignedTo(); cid=1 pid=1 - +按照需求指派人分组,获取分组后的需求数量 >> 5 +按照需求指派人分组,获取各个指派人名下的需求数量,查看admin下的数据 >> admin,100 */ @@ -20,4 +21,4 @@ $tester->loadModel('report'); $data = $tester->story->getDataOfStorysPerAssignedTo(); r(count($data)) && p() && e('5'); // 按照需求指派人分组,获取分组后的需求数量 -r($data) && p('admin:name,value') && e('admin,100'); // 按照需求指派人分组,获取各个指派人名下的需求数量,查看admin下的数据 +r($data) && p('admin:name,value') && e('admin,100'); // 按照需求指派人分组,获取各个指派人名下的需求数量,查看admin下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperchange.php b/test/model/story/getdataofstorysperchange.php old mode 100644 new mode 100755 index 7abb394de0..22487b96d6 --- a/test/model/story/getdataofstorysperchange.php +++ b/test/model/story/getdataofstorysperchange.php @@ -9,7 +9,9 @@ title=测试 storyModel->getDataOfStorysPerChange(); cid=1 pid=1 - +按照需求版本号分组,获取分组后的需求数量 >> 3 +按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据 >> 1,80 +按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据 >> 0,350 */ @@ -20,4 +22,4 @@ $data = $tester->story->getDataOfStorysPerChange(); r(count($data)) && p() && e('3'); // 按照需求版本号分组,获取分组后的需求数量 r($data) && p('1:name,value') && e('1,80'); // 按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据 -r($data) && p('2:name,value') && e('0,350'); // 按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据 +r($data) && p('2:name,value') && e('0,350'); // 按照需求版本号分组,获取各个版本号下的需求数量,查看admin下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperclosedreason.php b/test/model/story/getdataofstorysperclosedreason.php old mode 100644 new mode 100755 index 33f3b11e2f..09e81ebaae --- a/test/model/story/getdataofstorysperclosedreason.php +++ b/test/model/story/getdataofstorysperclosedreason.php @@ -9,7 +9,10 @@ title=测试 storyModel->getDataOfStorysPerClosedReason(); cid=1 pid=1 - +按照需求关闭原因分组,获取分组后的需求数量 >> 8 +按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看willnotdo的数据 >> 不做,12 +按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看bydesign的数据 >> 设计如此,12 +按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看cancel的数据 >> 已取消,11 */ @@ -22,4 +25,4 @@ $data = $tester->story->getDataOfStorysPerClosedReason(); r(count($data)) && p() && e('8'); // 按照需求关闭原因分组,获取分组后的需求数量 r($data) && p('willnotdo:name,value') && e('不做,12'); // 按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看willnotdo的数据 r($data) && p('bydesign:name,value') && e('设计如此,12'); // 按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看bydesign的数据 -r($data) && p('cancel:name,value') && e('已取消,11'); // 按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看cancel的数据 +r($data) && p('cancel:name,value') && e('已取消,11'); // 按照需求关闭原因分组,获取各个关闭原因下的需求数量,查看cancel的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperestimate.php b/test/model/story/getdataofstorysperestimate.php old mode 100644 new mode 100755 index 76bb9118a6..5bbcb1f7b6 --- a/test/model/story/getdataofstorysperestimate.php +++ b/test/model/story/getdataofstorysperestimate.php @@ -9,7 +9,9 @@ title=测试 storyModel->getDataOfStorysPerEstimate(); cid=1 pid=1 - +按照需求预计工时分组,获取分组后的需求数量 >> 21 +按照需求预计工时分组,获取各个工时的需求数量,查看工时为19的数据 >> 17,28 +按照需求预计工时分组,获取各个工时的需求数量,查看工时为20的数据 >> 1,28 */ @@ -20,4 +22,4 @@ $data = $tester->story->getDataOfStorysPerEstimate(); r(count($data)) && p() && e('21'); // 按照需求预计工时分组,获取分组后的需求数量 r($data) && p('19:name,value') && e('17,28'); // 按照需求预计工时分组,获取各个工时的需求数量,查看工时为19的数据 -r($data) && p('20:name,value') && e('1,28'); // 按照需求预计工时分组,获取各个工时的需求数量,查看工时为20的数据 +r($data) && p('20:name,value') && e('1,28'); // 按照需求预计工时分组,获取各个工时的需求数量,查看工时为20的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstoryspermodule.php b/test/model/story/getdataofstoryspermodule.php old mode 100644 new mode 100755 index 5fbe008192..2e43f1e02b --- a/test/model/story/getdataofstoryspermodule.php +++ b/test/model/story/getdataofstoryspermodule.php @@ -10,7 +10,8 @@ title=测试 storyModel->getDataOfStorysPerModule(); cid=1 pid=1 - +按照模块分组,获取分组后的需求数量 >> 100 +按照模块分组,获取各个模块下的需求数量,查看模块2150下的数据 >> /产品模块330,1,83 */ @@ -21,4 +22,4 @@ $tester->loadModel('report'); $data = $tester->story->getDataOfStorysPerModule(); r(count($data)) && p() && e('100'); // 按照模块分组,获取分组后的需求数量 -r($data) && p('2150:name,value,product') && e('/产品模块330,1,83'); // 按照模块分组,获取各个模块下的需求数量,查看模块2150下的数据 +r($data) && p('2150:name,value,product') && e('/产品模块330,1,83'); // 按照模块分组,获取各个模块下的需求数量,查看模块2150下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperopenedby.php b/test/model/story/getdataofstorysperopenedby.php old mode 100644 new mode 100755 index f0fd006ec4..9844f11b30 --- a/test/model/story/getdataofstorysperopenedby.php +++ b/test/model/story/getdataofstorysperopenedby.php @@ -9,7 +9,8 @@ title=测试 storyModel->getDataOfStorysPerOpenedBy(); cid=1 pid=1 - +按照创建人分组,获取分组后的需求数量 >> 5 +按照创建人分组,获取各个创建人的需求数量,查看用户test3下的数据 >> 开发3,100 */ @@ -20,4 +21,4 @@ $tester->loadModel('report'); $data = $tester->story->getDataOfStorysPerOpenedBy(); r(count($data)) && p() && e('5'); // 按照创建人分组,获取分组后的需求数量 -r($data) && p('test3:name,value') && e('开发3,100'); // 按照创建人分组,获取各个创建人的需求数量,查看用户test3下的数据 +r($data) && p('test3:name,value') && e('开发3,100'); // 按照创建人分组,获取各个创建人的需求数量,查看用户test3下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperplan.php b/test/model/story/getdataofstorysperplan.php old mode 100644 new mode 100755 index 366e8a498f..c93b4f6777 --- a/test/model/story/getdataofstorysperplan.php +++ b/test/model/story/getdataofstorysperplan.php @@ -9,7 +9,9 @@ title=测试 storyModel->getDataOfStorysPerPlan(); cid=1 pid=1 - +按照计划分组,获取分组后的需求数量 >> 25 +按照计划分组,获取各个计划的需求数量,查看1下的数据 >> 1.0,18 +按照计划分组,获取各个计划的需求数量,查看70下的数据 >> 1.0,15 */ @@ -21,4 +23,4 @@ $data = $tester->story->getDataOfStorysPerPlan(); r(count($data)) && p() && e('25'); // 按照计划分组,获取分组后的需求数量 r($data) && p('1:name,value') && e('1.0,18'); // 按照计划分组,获取各个计划的需求数量,查看1下的数据 -r($data) && p('70:name,value') && e('1.0,15'); // 按照计划分组,获取各个计划的需求数量,查看70下的数据 +r($data) && p('70:name,value') && e('1.0,15'); // 按照计划分组,获取各个计划的需求数量,查看70下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperpri.php b/test/model/story/getdataofstorysperpri.php old mode 100644 new mode 100755 index b4be2ec12e..5d21dcccff --- a/test/model/story/getdataofstorysperpri.php +++ b/test/model/story/getdataofstorysperpri.php @@ -10,7 +10,9 @@ title=测试 storyModel->getDataOfStorysPerPri(); cid=1 pid=1 - +按照优先级分组,获取分组后的需求数量 >> 4 +按照优先级分组,获取各个优先级的需求数量,查看优先级1下的数据 >> 1,113 +按照优先级分组,获取各个优先级的需求数量,查看优先级4下的数据 >> 1,112 */ @@ -22,4 +24,4 @@ $data = $tester->story->getDataOfStorysPerPri(); r(count($data)) && p() && e('4'); // 按照优先级分组,获取分组后的需求数量 r($data) && p('1:name,value') && e('1,113'); // 按照优先级分组,获取各个优先级的需求数量,查看优先级1下的数据 -r($data) && p('4:name,value') && e('1,112'); // 按照优先级分组,获取各个优先级的需求数量,查看优先级4下的数据 +r($data) && p('4:name,value') && e('1,112'); // 按照优先级分组,获取各个优先级的需求数量,查看优先级4下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperproduct.php b/test/model/story/getdataofstorysperproduct.php old mode 100644 new mode 100755 index 48f79f7211..7904bdcc4a --- a/test/model/story/getdataofstorysperproduct.php +++ b/test/model/story/getdataofstorysperproduct.php @@ -9,7 +9,8 @@ title=测试 storyModel->getDataOfStorysPerProduct(); cid=1 pid=1 - +按照产品分组,获取分组后的需求数量 >> 100 +按照产品分组,获取各个产品下的需求数量,查看产品79下的数据 >> 已关闭的多分支产品79,4 */ @@ -20,4 +21,4 @@ $tester->loadModel('report'); $data = $tester->story->getDataOfStorysPerProduct(); r(count($data)) && p() && e('100'); // 按照产品分组,获取分组后的需求数量 -r($data) && p('79:name,value') && e('已关闭的多分支产品79,4'); // 按照产品分组,获取各个产品下的需求数量,查看产品79下的数据 +r($data) && p('79:name,value') && e('已关闭的多分支产品79,4'); // 按照产品分组,获取各个产品下的需求数量,查看产品79下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstoryspersource.php b/test/model/story/getdataofstoryspersource.php old mode 100644 new mode 100755 index 5f8dfc3d62..857828fc7c --- a/test/model/story/getdataofstoryspersource.php +++ b/test/model/story/getdataofstoryspersource.php @@ -10,7 +10,9 @@ title=测试 storyModel->getDataOfStorysPerSource(); cid=1 pid=1 - +按照需求来源分组,获取分组后的需求数量 >> 14 +按照需求来源分组,获取各个需求来源的需求数量,查看support下的数据 >> 技术支持,33 +按照需求来源分组,获取各个需求来源的需求数量,查看market下的数据 >> 市场,33 */ @@ -22,4 +24,4 @@ $data = $tester->story->getDataOfStorysPerSource(); r(count($data)) && p() && e('14'); // 按照需求来源分组,获取分组后的需求数量 r($data) && p('support:name,value') && e('技术支持,33'); // 按照需求来源分组,获取各个需求来源的需求数量,查看support下的数据 -r($data) && p('market:name,value') && e('市场,33'); // 按照需求来源分组,获取各个需求来源的需求数量,查看market下的数据 +r($data) && p('market:name,value') && e('市场,33'); // 按照需求来源分组,获取各个需求来源的需求数量,查看market下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperstage.php b/test/model/story/getdataofstorysperstage.php old mode 100644 new mode 100755 index c86d727957..81bf5570e6 --- a/test/model/story/getdataofstorysperstage.php +++ b/test/model/story/getdataofstorysperstage.php @@ -9,7 +9,10 @@ title=测试 storyModel->getDataOfStorysPerStage(); cid=1 pid=1 - +按照需求阶段分组,获取分组后的需求数量 >> 11 +按照需求阶段分组,获取各个需求阶段的需求数量,查看wait下的数据 >> 未开始,25 +按照需求阶段分组,获取各个需求阶段的需求数量,查看planned下的数据 >> 已计划,25 +按照需求阶段分组,获取各个需求阶段的需求数量,查看released下的数据 >> 已发布,25 */ @@ -22,4 +25,4 @@ $data = $tester->story->getDataOfStorysPerStage(); r(count($data)) && p() && e('11'); // 按照需求阶段分组,获取分组后的需求数量 r($data) && p('wait:name,value') && e('未开始,25'); // 按照需求阶段分组,获取各个需求阶段的需求数量,查看wait下的数据 r($data) && p('planned:name,value') && e('已计划,25'); // 按照需求阶段分组,获取各个需求阶段的需求数量,查看planned下的数据 -r($data) && p('released:name,value') && e('已发布,25'); // 按照需求阶段分组,获取各个需求阶段的需求数量,查看released下的数据 +r($data) && p('released:name,value') && e('已发布,25'); // 按照需求阶段分组,获取各个需求阶段的需求数量,查看released下的数据 \ No newline at end of file diff --git a/test/model/story/getdataofstorysperstatus.php b/test/model/story/getdataofstorysperstatus.php old mode 100644 new mode 100755 index 80a4e666a8..63b8825244 --- a/test/model/story/getdataofstorysperstatus.php +++ b/test/model/story/getdataofstorysperstatus.php @@ -10,7 +10,10 @@ title=测试 storyModel->getDataOfStorysPerStatus(); cid=1 pid=1 - +按照需求状态分组,获取分组后的需求数量 >> 4 +按照需求状态分组,获取各个需求状态的需求数量,查看draft下的数据 >> 草稿,184 +按照需求状态分组,获取各个需求状态的需求数量,查看active下的数据 >> 激活,103 +按照需求状态分组,获取各个需求状态的需求数量,查看closed下的数据 >> 已关闭,82 */ @@ -23,4 +26,4 @@ $data = $tester->story->getDataOfStorysPerStatus(); r(count($data)) && p() && e('4'); // 按照需求状态分组,获取分组后的需求数量 r($data) && p('draft:name,value') && e('草稿,184'); // 按照需求状态分组,获取各个需求状态的需求数量,查看draft下的数据 r($data) && p('active:name,value') && e('激活,103'); // 按照需求状态分组,获取各个需求状态的需求数量,查看active下的数据 -r($data) && p('closed:name,value') && e('已关闭,82'); // 按照需求状态分组,获取各个需求状态的需求数量,查看closed下的数据 +r($data) && p('closed:name,value') && e('已关闭,82'); // 按照需求状态分组,获取各个需求状态的需求数量,查看closed下的数据 \ No newline at end of file diff --git a/test/model/story/getestimateinfo.php b/test/model/story/getestimateinfo.php old mode 100644 new mode 100755 index 08337e4b2b..9701869846 --- a/test/model/story/getestimateinfo.php +++ b/test/model/story/getestimateinfo.php @@ -17,4 +17,4 @@ global $tester; $tester->loadModel('story'); $storyInfo = $tester->story->getEstimateInfo(2); -r() && p() && e(); +r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getestimaterounds.php b/test/model/story/getestimaterounds.php old mode 100644 new mode 100755 diff --git a/test/model/story/getexecutionstories.php b/test/model/story/getexecutionstories.php old mode 100644 new mode 100755 diff --git a/test/model/story/getexecutionstorypairs.php b/test/model/story/getexecutionstorypairs.php old mode 100644 new mode 100755 diff --git a/test/model/story/getidlistwithtask.php b/test/model/story/getidlistwithtask.php old mode 100644 new mode 100755 index 680fb01330..5c357e92ce --- a/test/model/story/getidlistwithtask.php +++ b/test/model/story/getidlistwithtask.php @@ -9,7 +9,10 @@ title=测试 storyModel->getIdListWithTask(); cid=1 pid=1 - +获取执行101下的有关联需求的任务ID列表数量 >> 1 +获取执行1下的有关联需求的任务ID列表数量 >> 0 +获取执行null下的有关联需求的任务ID列表数量 >> 0 +获取执行110下的有关联需求的任务ID列表数量 >> 1 */ @@ -23,4 +26,4 @@ $taslIdList4 = $tester->story->getIdListWithTask(110); r(count($taslIdList1)) && p() && e('1'); // 获取执行101下的有关联需求的任务ID列表数量 r(count($taslIdList2)) && p() && e('0'); // 获取执行1下的有关联需求的任务ID列表数量 r(count($taslIdList3)) && p() && e('0'); // 获取执行null下的有关联需求的任务ID列表数量 -r(count($taslIdList4)) && p() && e('1'); // 获取执行110下的有关联需求的任务ID列表数量 +r(count($taslIdList4)) && p() && e('1'); // 获取执行110下的有关联需求的任务ID列表数量 \ No newline at end of file diff --git a/test/model/story/getkanbangroupdata.php b/test/model/story/getkanbangroupdata.php old mode 100644 new mode 100755 index 8e8615d41b..aea88ec76e --- a/test/model/story/getkanbangroupdata.php +++ b/test/model/story/getkanbangroupdata.php @@ -9,7 +9,10 @@ title=测试 storyModel->getKanbanGroupData(); cid=1 pid=1 - +传入stories数据,获取按照stage分组后的结果数量 >> 2 +传入stories数据,获取按照stage分组后的结果数量 >> 2 +传入stories数据,获取按照stage分组后的结果详情 >> 软件需求2,story,wait +传入stories数据,获取按照stage分组后的结果详情 >> 软件需求6,story,projected */ @@ -24,4 +27,4 @@ $storyGroup2 = $tester->story->getKanbanGroupData($stories2); r(count($storyGroup1)) && p() && e('2'); //传入stories数据,获取按照stage分组后的结果数量 r(count($storyGroup2)) && p() && e('2'); //传入stories数据,获取按照stage分组后的结果数量 r($storyGroup1['wait']) && p('2:title,type,stage') && e('软件需求2,story,wait'); //传入stories数据,获取按照stage分组后的结果详情 -r($storyGroup2['projected']) && p('6:title,type,stage') && e('软件需求6,story,projected'); //传入stories数据,获取按照stage分组后的结果详情 +r($storyGroup2['projected']) && p('6:title,type,stage') && e('软件需求6,story,projected'); //传入stories数据,获取按照stage分组后的结果详情 \ No newline at end of file diff --git a/test/model/story/getparentstorypairs.php b/test/model/story/getparentstorypairs.php old mode 100644 new mode 100755 index c1449f3479..3a35320ec0 --- a/test/model/story/getparentstorypairs.php +++ b/test/model/story/getparentstorypairs.php @@ -18,4 +18,4 @@ $tester->loadModel('story'); $stories = $tester->story->getParentStoryPairs(91); //a($stories);die; -r() && p() && e(); +r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getplanstories.php b/test/model/story/getplanstories.php old mode 100644 new mode 100755 index 0af8318845..14b3c99ad1 --- a/test/model/story/getplanstories.php +++ b/test/model/story/getplanstories.php @@ -9,8 +9,10 @@ title=测试 storyModel->getPlanStories(); cid=1 pid=1 +获取计划1下的需求数量,每页10条 >> 10 +获取计划1下的需求数量,不分页 >> 20 获取计划1下的需求列表,每页10条 >> 软件需求290,active,story -获取计划1下的需求列表,不分页 >> 软件需求290,active,story +获取计划1下的需求列表,不分页 >> 软件需求2,active,story */ @@ -25,4 +27,4 @@ $plan2Stories = $tester->story->getPlanStories(1, 'all', 'id_desc'); r(count($plan1Stories)) && p() && e('10'); //获取计划1下的需求数量,每页10条 r(count($plan2Stories)) && p() && e('20'); //获取计划1下的需求数量,不分页 r($plan1Stories) && p('290:title,status,type') && e('软件需求290,active,story'); //获取计划1下的需求列表,每页10条 -r($plan2Stories) && p('2:title,status,type') && e('软件需求2,active,story'); //获取计划1下的需求列表,不分页 +r($plan2Stories) && p('2:title,status,type') && e('软件需求2,active,story'); //获取计划1下的需求列表,不分页 \ No newline at end of file diff --git a/test/model/story/getproductstories.php b/test/model/story/getproductstories.php old mode 100644 new mode 100755 diff --git a/test/model/story/getproductstorypairs.php b/test/model/story/getproductstorypairs.php old mode 100644 new mode 100755 diff --git a/test/model/story/getrequierements.php b/test/model/story/getrequierements.php old mode 100644 new mode 100755 diff --git a/test/model/story/getreviewerpairs.php b/test/model/story/getreviewerpairs.php old mode 100644 new mode 100755 diff --git a/test/model/story/getstories2link.php b/test/model/story/getstories2link.php old mode 100644 new mode 100755 diff --git a/test/model/story/getstoriesbyplanidlist.php b/test/model/story/getstoriesbyplanidlist.php old mode 100644 new mode 100755 index b4df7fc3a6..f17b46899a --- a/test/model/story/getstoriesbyplanidlist.php +++ b/test/model/story/getstoriesbyplanidlist.php @@ -9,7 +9,11 @@ title=测试 storyModel->getStoriesByPlanIdList(); cid=1 pid=1 - +传入计划ID列表,获取其下面的需求数量 >> 20 +传入计划ID列表,查看其下面的需求详情 >> 软件需求388,story,draft +传入计划ID列表,获取其下面的需求数量 >> 20 +传入计划ID列表,查看其下面的需求详情 >> 软件需求392,story,draft +传入空的计划ID列表,获取系统中所有需求数量 >> 424 */ @@ -27,4 +31,4 @@ r(count($stories1[1])) && p() && e('20'); r($stories1[1]) && p('388:title,type,status') && e('软件需求388,story,draft'); //传入计划ID列表,查看其下面的需求详情 r(count($stories2[4])) && p() && e('20'); //传入计划ID列表,获取其下面的需求数量 r($stories2[4]) && p('392:title,type,status') && e('软件需求392,story,draft'); //传入计划ID列表,查看其下面的需求详情 -r(count($stories3, true)) && p() && e('424'); //传入空的计划ID列表,获取系统中所有需求数量 +r(count($stories3, true)) && p() && e('424'); //传入空的计划ID列表,获取系统中所有需求数量 \ No newline at end of file diff --git a/test/model/story/getstoryrelation.php b/test/model/story/getstoryrelation.php old mode 100644 new mode 100755 index 74e65815a2..186fd0fca4 --- a/test/model/story/getstoryrelation.php +++ b/test/model/story/getstoryrelation.php @@ -9,7 +9,10 @@ title=测试 storyModel->getStoryRelation(); cid=1 pid=1 - +获取用户需求25关联的软件需求数量 >> 1 +获取软件需求26关联的用户需求数量 >> 1 +获取用户需求25关联的软件需求详情 >> 软件需求26,story,active +获取软件需求26关联的用户需求详情 >> 用户需求25,requirement,draft */ @@ -20,4 +23,4 @@ $relations2 = $tester->story->getStoryRelation(26, 'story'); r(count($relations1)) && p() && e('1'); // 获取用户需求25关联的软件需求数量 r(count($relations2)) && p() && e('1'); // 获取软件需求26关联的用户需求数量 r($relations1[0]) && p('title,type,status') && e('软件需求26,story,active'); // 获取用户需求25关联的软件需求详情 -r($relations2[0]) && p('title,type,status') && e('用户需求25,requirement,draft'); // 获取软件需求26关联的用户需求详情 +r($relations2[0]) && p('title,type,status') && e('用户需求25,requirement,draft'); // 获取软件需求26关联的用户需求详情 \ No newline at end of file diff --git a/test/model/story/getstoryrelationcounts.php b/test/model/story/getstoryrelationcounts.php old mode 100644 new mode 100755 diff --git a/test/model/story/getstoryspecs.php b/test/model/story/getstoryspecs.php old mode 100644 new mode 100755 diff --git a/test/model/story/getteammembers.php b/test/model/story/getteammembers.php old mode 100644 new mode 100755 index 15bbc9af80..90327818b9 --- a/test/model/story/getteammembers.php +++ b/test/model/story/getteammembers.php @@ -10,7 +10,10 @@ title=测试 storyModel->getTeamMembers(); cid=1 pid=1 - +查找需求20的相关团队成员数量 >> 2 +查找需求21的变更时影响的团队成员数量 >> 3 +查找需求21的变更时影响的团队成员数量 >> po87,user97,test97 +查找需求0的相关团队成员数量 >> 0 */ @@ -23,4 +26,4 @@ $story0Members = $tester->story->getTeamMembers(0, ''); r(count($story20Members)) && p() && e('2'); // 查找需求20的相关团队成员数量 r(count($story21Members)) && p() && e('3'); // 查找需求21的变更时影响的团队成员数量 r($story21Members) && p('po87,user97,test97') && e('po87,user97,test97'); // 查找需求21的变更时影响的团队成员数量 -r(count($story0Members)) && p() && e('0'); // 查找需求0的相关团队成员数量 +r(count($story0Members)) && p() && e('0'); // 查找需求0的相关团队成员数量 \ No newline at end of file diff --git a/test/model/story/getteststories.php b/test/model/story/getteststories.php old mode 100644 new mode 100755 diff --git a/test/model/story/gettoandcclist.php b/test/model/story/gettoandcclist.php old mode 100644 new mode 100755 index 8376252218..de00c0e423 --- a/test/model/story/gettoandcclist.php +++ b/test/model/story/gettoandcclist.php @@ -9,7 +9,12 @@ title=测试 storyModel->getToAndCcList(); cid=1 pid=1 - +获取创建需求1时的通知人数量 >> 2 +获取评审需求1时的通知人数量 >> 2 +获取变更需求1时的通知人数量 >> 2 +获取创建需求1时的通知人详情 >> admin +获取评审需求1时的通知人详情 >> admin +获取变更需求1时的通知人详情 >> po82,user92, */ @@ -26,4 +31,4 @@ r(count($dataList2)) && p() && e('2'); //获取评审需求1时的通 r(count($dataList3)) && p() && e('2'); //获取变更需求1时的通知人数量 r($dataList1[0]) && p() && e('admin'); //获取创建需求1时的通知人详情 r($dataList2[0]) && p() && e('admin'); //获取评审需求1时的通知人详情 -r($dataList3[1]) && p() && e('po82,user92,'); //获取变更需求1时的通知人详情 +r($dataList3[1]) && p() && e('po82,user92,'); //获取变更需求1时的通知人详情 \ No newline at end of file diff --git a/test/model/story/gettrackbyid.php b/test/model/story/gettrackbyid.php old mode 100644 new mode 100755 index a612462e8f..f57dbd901d --- a/test/model/story/gettrackbyid.php +++ b/test/model/story/gettrackbyid.php @@ -10,7 +10,10 @@ title=测试 storyModel->getTrackByID(); cid=1 pid=1 - +获取用户需求1下面的所有任务数量 >> 6 +获取用户需求1下面的任务601的名字 >> 开发任务511 +获取用户需求1下面的任务501的名字 >> 开发任务411 +获取用户需求的信息 >> 软件需求版本一551,requirement,active */ @@ -20,4 +23,4 @@ $story1Tracks = $tester->loadModel('story')->getByID(1); r(count($story1Tracks->tasks)) && p() && e('6'); //获取用户需求1下面的所有任务数量 r($story1Tracks->tasks[601]) && p('0:name') && e('开发任务511'); //获取用户需求1下面的任务601的名字 r($story1Tracks->tasks[501]) && p('0:name') && e('开发任务411'); //获取用户需求1下面的任务501的名字 -r($story1Tracks) && p('title,type,status') && e('软件需求版本一551,requirement,active'); //获取用户需求的信息 +r($story1Tracks) && p('title,type,status') && e('软件需求版本一551,requirement,active'); //获取用户需求的信息 \ No newline at end of file diff --git a/test/model/story/gettracks.php b/test/model/story/gettracks.php old mode 100644 new mode 100755 index 3565d27198..2f2f893b72 --- a/test/model/story/gettracks.php +++ b/test/model/story/gettracks.php @@ -9,7 +9,13 @@ title=测试 storyModel->getTracks(); cid=1 pid=1 - +获取产品1的跟踪矩阵的数量 >> 2 +获取产品1的需求2的关联bug数量 >> 4 +获取产品1的需求2的关联用例数量 >> 4 +获取产品1的需求2的关联Bug名称 >> BUG1 +获取产品1的需求2的关联Bug名称 >> BUG101 +获取产品1的需求2的关联Case名称 >> 这个是测试用例1 +获取产品1的需求2的关联Case名称 >> 这个是测试用例2 */ @@ -27,4 +33,4 @@ r(count($tracks['noRequirement'][2]->cases)) && p() && e('4'); r($tracks['noRequirement'][2]->bugs) && p('1:title') && e('BUG1'); // 获取产品1的需求2的关联Bug名称 r($tracks['noRequirement'][2]->bugs) && p('101:title') && e('BUG101'); // 获取产品1的需求2的关联Bug名称 r($tracks['noRequirement'][2]->cases) && p('1:title') && e('这个是测试用例1'); // 获取产品1的需求2的关联Case名称 -r($tracks['noRequirement'][2]->cases) && p('2:title') && e('这个是测试用例2'); // 获取产品1的需求2的关联Case名称 +r($tracks['noRequirement'][2]->cases) && p('2:title') && e('这个是测试用例2'); // 获取产品1的需求2的关联Case名称 \ No newline at end of file diff --git a/test/model/story/getuserstories.php b/test/model/story/getuserstories.php old mode 100644 new mode 100755 index 8321d4f280..ea70eedd47 --- a/test/model/story/getuserstories.php +++ b/test/model/story/getuserstories.php @@ -9,6 +9,15 @@ title=测试 storyModel->getUserStories(); cid=1 pid=1 +获取指派给User2的所有需求数量 >> 100 +获取指派给User2的ID为6的需求详情 >> 软件需求6,story,user2,projected +获取由User2创建的需求数量,每页10条 >> 10 +获取由User2创建的ID为38的需求详情 >> 软件需求38,story,user2,released +获取由Test3关闭的所有需求数量 >> 14 +获取由Test3关闭的ID为203的需求详情 >> 用户需求203,requirement,test3, +获取无评审人的需求数量 >> 25 +获取无评审人的ID为402的需求详情 >> 软件子需求2,story,,planned + */ global $tester; @@ -28,4 +37,4 @@ r($openedByUser2Stories) && p('38:title,type,openedBy,stage') && e(' r(count($closedByTest3Stories)) && p() && e('14'); //获取由Test3关闭的所有需求数量 r($closedByTest3Stories) && p('203:title,type,closedBy,stage') && e('用户需求203,requirement,test3,'); //获取由Test3关闭的ID为203的需求详情 r(count($emptyReviewedByStories)) && p() && e('25'); //获取无评审人的需求数量 -r($emptyReviewedByStories) && p('402:title,type,reviewedBy,stage') && e('软件子需求2,story,,planned'); //获取无评审人的ID为402的需求详情 +r($emptyReviewedByStories) && p('402:title,type,reviewedBy,stage') && e('软件子需求2,story,,planned'); //获取无评审人的ID为402的需求详情 \ No newline at end of file diff --git a/test/model/story/getuserstorypairs.php b/test/model/story/getuserstorypairs.php old mode 100644 new mode 100755 index 588ba81f43..5f5ed1ca21 --- a/test/model/story/getuserstorypairs.php +++ b/test/model/story/getuserstorypairs.php @@ -10,7 +10,10 @@ title=测试 storyModel->getUserStoryPairs(); cid=1 pid=1 - +获取指派给User2的需求数量,每页10条 >> 10 +获取指派给admin的用户需求,每页50条 >> 50 +获取指派给User2的所有需求总数 >> 100 +获取指派给admin的、不在产品91/92/93里的用户需求,每页50条 >> 97 */ @@ -26,4 +29,4 @@ $user2StoriesSkipProducts = $tester->story->getUserStoryPairs('user2', '0', 'sto r(count($user2Stories)) && p() && e('10'); //获取指派给User2的需求数量,每页10条 r(count($adminRequirements)) && p() && e('50'); //获取指派给admin的用户需求,每页50条 r(count($allUser2Stories)) && p() && e('100'); //获取指派给User2的所有需求总数 -r(count($user2StoriesSkipProducts)) && p() && e('97'); //获取指派给admin的、不在产品91/92/93里的用户需求,每页50条 +r(count($user2StoriesSkipProducts)) && p() && e('97'); //获取指派给admin的、不在产品91/92/93里的用户需求,每页50条 \ No newline at end of file diff --git a/test/model/story/getversion.php b/test/model/story/getversion.php old mode 100644 new mode 100755 diff --git a/test/model/story/getversions.php b/test/model/story/getversions.php old mode 100644 new mode 100755 diff --git a/test/model/story/getzerocase.php b/test/model/story/getzerocase.php old mode 100644 new mode 100755 index d1efcc3ba9..c71ac0a09f --- a/test/model/story/getzerocase.php +++ b/test/model/story/getzerocase.php @@ -9,7 +9,11 @@ title=测试 storyModel->getZeroCase(); cid=1 pid=1 - +获取产品1下的零用例需求数量 >> 1 +获取产品2下的零用例需求数量 >> 1 +获取产品0下的零用例需求数量 >> 0 +获取产品1下的零用例需求详情 >> 软件需求4,active,story,planned +获取产品2下的零用例需求详情 >> 软件需求8,active,story,developing */ @@ -23,4 +27,4 @@ r(count($zeroCaseStory1)) && p() && e('1'); // 获取产品1下的零用例需 r(count($zeroCaseStory2)) && p() && e('1'); // 获取产品2下的零用例需求数量 r(count($zeroCaseStory3)) && p() && e('0'); // 获取产品0下的零用例需求数量 r($zeroCaseStory1) && p('4:title,status,type,stage') && e('软件需求4,active,story,planned'); // 获取产品1下的零用例需求详情 -r($zeroCaseStory2) && p('8:title,status,type,stage') && e('软件需求8,active,story,developing'); // 获取产品2下的零用例需求详情 +r($zeroCaseStory2) && p('8:title,status,type,stage') && e('软件需求8,active,story,developing'); // 获取产品2下的零用例需求详情 \ No newline at end of file diff --git a/test/model/story/isclickable.php b/test/model/story/isclickable.php old mode 100644 new mode 100755 index f0d3cfeb36..35f901b8a1 --- a/test/model/story/isclickable.php +++ b/test/model/story/isclickable.php @@ -9,6 +9,14 @@ title=测试 storyModel->recall(); cid=1 pid=1 +判断需求2是否有变更按钮操作权限 >> 1 +判断需求2是否有评审按钮操作权限 >> 0 +判断需求2是否有关闭按钮操作权限 >> 1 +判断需求2是否有激活按钮操作权限 >> 0 +判断需求2是否有指派按钮操作权限 >> 1 +判断需求2是否有创建用例按钮操作权限 >> 1 +判断需求2是否有批量创建按钮操作权限 >> 0 + */ global $tester; @@ -21,4 +29,4 @@ r($storyModel::isClickable($story, 'close')) && p() && e('1'); // 判断 r($storyModel::isClickable($story, 'activate')) && p() && e('0'); // 判断需求2是否有激活按钮操作权限 r($storyModel::isClickable($story, 'assignto')) && p() && e('1'); // 判断需求2是否有指派按钮操作权限 r($storyModel::isClickable($story, 'createcase')) && p() && e('1'); // 判断需求2是否有创建用例按钮操作权限 -r($storyModel::isClickable($story, 'batchcreate')) && p() && e('0'); // 判断需求2是否有批量创建按钮操作权限 +r($storyModel::isClickable($story, 'batchcreate')) && p() && e('0'); // 判断需求2是否有批量创建按钮操作权限 \ No newline at end of file diff --git a/test/model/story/linkstories.php b/test/model/story/linkstories.php old mode 100644 new mode 100755 index d0fb05986e..898cbacbb3 --- a/test/model/story/linkstories.php +++ b/test/model/story/linkstories.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,9 @@ title=测试 storyModel->linkStories(); cid=1 pid=1 - +查看关联前的关联关系数量 >> 0 +查看关联后的关联关系数量 >> 4 +查看关联后的需求详情 >> 软件需求300,软件需求302,软件需求304,软件需求306 */ @@ -28,4 +31,4 @@ $afterRelations = $tester->story->getRelation(1, 'requirement'); r(count($beforeRelations)) && p() && e('0'); // 查看关联前的关联关系数量 r(count($afterRelations)) && p() && e('4'); // 查看关联后的关联关系数量 r($afterRelations) && p('300,302,304,306') && e('软件需求300,软件需求302,软件需求304,软件需求306'); // 查看关联后的需求详情 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/linkstory.php b/test/model/story/linkstory.php old mode 100644 new mode 100755 index 7e9ec5fcef..d1f1dde19c --- a/test/model/story/linkstory.php +++ b/test/model/story/linkstory.php @@ -9,7 +9,12 @@ title=测试 storyModel->linkStory(); cid=1 pid=1 - +获取关联需求后的执行下的需求数量 >> 5 +获取关联需求后的执行下的需求数量 >> 5 +获取关联需求后的执行下的需求数量 >> 5 +获取关联需求后的执行下的需求详情 >> 软件需求300,story,closed +获取关联需求后的执行下的需求详情 >> 软件需求302,story,planned +获取关联需求后的执行下的需求详情 >> 软件需求304,story,developing */ @@ -29,4 +34,4 @@ r(count($stories3)) && p() && e('5'); r($stories1) && p('300:title,type,stage') && e('软件需求300,story,closed'); // 获取关联需求后的执行下的需求详情 r($stories2) && p('302:title,type,stage') && e('软件需求302,story,planned'); // 获取关联需求后的执行下的需求详情 r($stories3) && p('304:title,type,stage') && e('软件需求304,story,developing'); // 获取关联需求后的执行下的需求详情 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/mergechartoption.php b/test/model/story/mergechartoption.php old mode 100644 new mode 100755 diff --git a/test/model/story/mergereviewer.php b/test/model/story/mergereviewer.php old mode 100644 new mode 100755 index b929dddcb5..8962fc5499 --- a/test/model/story/mergereviewer.php +++ b/test/model/story/mergereviewer.php @@ -10,7 +10,12 @@ title=测试 storyModel->mergeReviewer(); cid=1 pid=1 - +获取需求301的评审人 >> admin +获取需求301的待评审人 >> admin +获取产品76下的需求评审人 >> admin +获取产品76下的需求待评审人 >> admin +获取产品76下的需求评审人 >> admin +获取产品76下的需求待评审人 >> admin */ @@ -26,4 +31,4 @@ r($story) && p('notReview:0') && e('admin'); // 获取需 r($stories[302]->reviewer[0]) && p() && e('admin'); // 获取产品76下的需求评审人 r($stories[302]->notReview[0]) && p() && e('admin'); // 获取产品76下的需求待评审人 r($stories[304]->reviewer[0]) && p() && e('admin'); // 获取产品76下的需求评审人 -r($stories[304]->notReview[0]) && p() && e('admin'); // 获取产品76下的需求待评审人 +r($stories[304]->notReview[0]) && p() && e('admin'); // 获取产品76下的需求待评审人 \ No newline at end of file diff --git a/test/model/story/printassignedhtml.php b/test/model/story/printassignedhtml.php old mode 100644 new mode 100755 diff --git a/test/model/story/recall.php b/test/model/story/recall.php old mode 100644 new mode 100755 index 68cd40aa1c..88ed9816c0 --- a/test/model/story/recall.php +++ b/test/model/story/recall.php @@ -22,4 +22,4 @@ $afterRecall = $tester->story->getByID(2); r($beforeRecall) && p('id,title,status') && e('2,用户需求版本一62,active'); // 撤回评审之前的状态信息 r($afterRecall) && p('id,title,status') && e('2,用户需求版本一62,draft'); // 撤回评审之后的状态信息 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/review.php b/test/model/story/review.php old mode 100644 new mode 100755 index af94491bbb..ffddada341 --- a/test/model/story/review.php +++ b/test/model/story/review.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ $review3 = $story->reviewTest(304, $reject); r($review1[0]) && p() && e('必须选择评审意见'); // 评审ID为2的需求,不传入评审意见,给出没有选择评审意见的提示 r($review2) && p('status') && e('active'); // 评审一个草稿的需求,传入评审意见为通过,状态变为激活 r($review3) && p('status') && e('closed'); // 评审一个草稿的需求,传入评审意见为拒绝,状态变为关闭 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/saveestimateinfo.php b/test/model/story/saveestimateinfo.php old mode 100644 new mode 100755 diff --git a/test/model/story/setstage.php b/test/model/story/setstage.php old mode 100644 new mode 100755 index 109d574609..e28cf9642b --- a/test/model/story/setstage.php +++ b/test/model/story/setstage.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ $after2 = $tester->story->getById(2); r($before) && p('stage') && e('projected'); //查看设置之后的需求状态 r($after1) && p('stage') && e('testing'); //查看设置之后的需求状态 r($after2) && p('stage') && e('tested'); //查看设置之后的需求状态 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/setstatusbyreviewrules.php b/test/model/story/setstatusbyreviewrules.php old mode 100644 new mode 100755 index 8794358486..da1e406823 --- a/test/model/story/setstatusbyreviewrules.php +++ b/test/model/story/setstatusbyreviewrules.php @@ -10,7 +10,10 @@ title=测试 storyModel->setStatusByReviewRules(); cid=1 pid=1 - +传入两个通过一个拒绝,查看返回结果 >> 0 +传入全部通过,查看返回结果 >> active +传入两个拒绝一个通过,查看返回结果 >> 0 +传入三个拒绝,查看返回结果 >> closed */ @@ -29,4 +32,4 @@ $result4 = $tester->story->setStatusByReviewRules($reviewList4); r($result1) && p() && e('0'); // 传入两个通过一个拒绝,查看返回结果 r($result2) && p() && e('active'); // 传入全部通过,查看返回结果 r($result3) && p() && e('0'); // 传入两个拒绝一个通过,查看返回结果 -r($result4) && p() && e('closed'); // 传入三个拒绝,查看返回结果 +r($result4) && p() && e('closed'); // 传入三个拒绝,查看返回结果 \ No newline at end of file diff --git a/test/model/story/sortstoriesofplan.php b/test/model/story/sortstoriesofplan.php old mode 100644 new mode 100755 index cb3d036321..3799acaf9c --- a/test/model/story/sortstoriesofplan.php +++ b/test/model/story/sortstoriesofplan.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,14 @@ title=测试 storyModel->sortStoriesOfPlan(); cid=1 pid=1 - +获取更新排序之前的需求在计划下的排序 >> 5 +获取更新排序之前的需求在计划下的排序 >> 10 +获取更新排序之前的需求在计划下的排序 >> 15 +获取更新排序之前的需求在计划下的排序 >> 20 +获取更新排序之后的需求在计划下的排序 >> 2 +获取更新排序之后的需求在计划下的排序 >> 4 +获取更新排序之后的需求在计划下的排序 >> 1 +获取更新排序之后的需求在计划下的排序 >> 3 */ @@ -20,7 +28,6 @@ $beforeStories = $tester->story->getPlanStories(1); $tester->story->sortStoriesOfPlan(1, array(3, 1, 4, 2)); $afterStories = $tester->story->getPlanStories(1); - r($beforeStories) && p('1:order') && e('5'); //获取更新排序之前的需求在计划下的排序 r($beforeStories) && p('2:order') && e('10'); //获取更新排序之前的需求在计划下的排序 r($beforeStories) && p('3:order') && e('15'); //获取更新排序之前的需求在计划下的排序 @@ -29,4 +36,4 @@ r($afterStories) && p('1:order') && e('2'); //获取更新排序之后的需 r($afterStories) && p('2:order') && e('4'); //获取更新排序之后的需求在计划下的排序 r($afterStories) && p('3:order') && e('1'); //获取更新排序之后的需求在计划下的排序 r($afterStories) && p('4:order') && e('3'); //获取更新排序之后的需求在计划下的排序 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/subdivide.php b/test/model/story/subdivide.php old mode 100644 new mode 100755 index f168f3cfd2..3e3cd3911b --- a/test/model/story/subdivide.php +++ b/test/model/story/subdivide.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($result1) && p('2:AID,BID,relation') && e('1,6,subdivideinto' r(count($result2->children)) && p() && e('3'); // 将软件需求2拆分三个子需求,查看子需求的数量 r($result2->children) && p('8:parent,title,id') && e('2,这里是需求来源备注8,8'); // 将软件需求2拆分三个子需求,查看子需求8的parent、title等字段 r($result2->children) && p('12:parent,title,id') && e('2,这里是需求来源备注12,12'); // 将软件需求2拆分三个子需求,查看子需求12的parent、title等字段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/unlinkstory.php b/test/model/story/unlinkstory.php old mode 100644 new mode 100755 index 55db3c62bc..b0a2b785d0 --- a/test/model/story/unlinkstory.php +++ b/test/model/story/unlinkstory.php @@ -9,7 +9,8 @@ title=测试 storyModel->unlinkStory(); cid=1 pid=1 - +删除用户需求25的关联关系之前,获取关联关系数量 >> 1 +删除用户需求25的关联关系之后,获取关联关系数量 >> 0 */ @@ -22,4 +23,4 @@ $afterRelation = $tester->story->getRelation(25, 'requirement'); r(count($beforeRelation)) && p() && e('1'); //删除用户需求25的关联关系之前,获取关联关系数量 r(count($afterRelation)) && p() && e('0'); //删除用户需求25的关联关系之后,获取关联关系数量 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/update.php b/test/model/story/update.php old mode 100644 new mode 100755 index 5f6be933e4..5e765fc6f1 --- a/test/model/story/update.php +++ b/test/model/story/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ $result2 = $story->updateTest(3, $story1); r($result1) && p('parent,pri,estimate,sourceNote,product') && e('2,4,1,测试来源备注1,2'); // 编辑用户需求,判断返回的信息,stage为空 r($result2) && p('parent,pri,estimate,sourceNote,product') && e('2,4,1,测试来源备注1,2'); // 编辑软件需求,判断返回的信息,stage为wait,parent为2 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/updatestoryorderofplan.php b/test/model/story/updatestoryorderofplan.php old mode 100644 new mode 100755 index 03fb247ca6..221af2031a --- a/test/model/story/updatestoryorderofplan.php +++ b/test/model/story/updatestoryorderofplan.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ r($planStories1) && p("0:plan,story,order") && e('1,1,21'); // 把需求1 r(count($planStories1)) && p() && e('4'); // 把需求1迁移到计划1下,获取更新后的planstory数量 r($planStories2) && p("0:plan,story,order") && e('2,1,1'); // 把需求1迁移到计划2下,获取更新后的planstory r(count($planStories2)) && p() && e('1'); // 把需求1迁移到计划2下,获取更新后的planstory数量 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/updatestoryproduct.php b/test/model/story/updatestoryproduct.php old mode 100644 new mode 100755 index be13b670ba..3872953c98 --- a/test/model/story/updatestoryproduct.php +++ b/test/model/story/updatestoryproduct.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ $newStory = $tester->story->getByID(1); r($oldStory) && p('product') && e('1'); // 判断需求变更所属产品之前的产品ID r($newStory) && p('product') && e('2'); // 判断需求变更所属产品之后的产品ID -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/story/updatestoryversion.php b/test/model/story/updatestoryversion.php old mode 100644 new mode 100755 diff --git a/test/model/task/activate.php b/test/model/task/activate.php index 2db7f61fd2..0873daba5e 100755 --- a/test/model/task/activate.php +++ b/test/model/task/activate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($task->activateTest($taskIDList[1])) && p('0:field,old,new') && e('status,done r($task->activateTest($taskIDList[2])) && p('0:field,old,new') && e('status,pause,doing'); //pause状态任务激活 r($task->activateTest($taskIDList[3])) && p('0:field,old,new') && e('status,cancel,doing'); //cancel状态任务激活 r($task->activateTest($taskIDList[4])) && p('0:field,old,new') && e('status,closed,doing'); //closed状态任务激活 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/addtaskestimate.php b/test/model/task/addtaskestimate.php index 311fa4822f..4d060d3172 100755 --- a/test/model/task/addtaskestimate.php +++ b/test/model/task/addtaskestimate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,7 +11,7 @@ title=taskModel->addTaskEstimate(); cid=1 pid=1 -插入task为1 left为0 consumed为3的任务 >> 601,1,0,3 +插入task为1 left为0 consumed为3的任务 >> 601,1,0,3 插入task为601 left为0 consumed为3的任务 >> 602,601,0,3 插入task为601 left为1 consumed为4的任务 >> 603,602,1,4 插入task为904 left为3 consumed为6的任务 >> 604,904,3,6 @@ -54,4 +55,4 @@ r($task->addTaskEstimateTest($record2)) && p('id,task,left,consumed') && e("602, r($task->addTaskEstimateTest($record3)) && p('id,task,left,consumed') && e("603,602,1,4"); // 插入task为601 left为1 consumed为4的任务 r($task->addTaskEstimateTest($record4)) && p('id,task,left,consumed') && e("604,904,3,6"); // 插入task为904 left为3 consumed为6的任务 r($task->addTaskEstimateTest($record5)) && p('id,task,left,consumed') && e("605,907,6,9"); // 插入task为907 left为6 consumed为9的任务 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/assign.php b/test/model/task/assign.php index 12ccf55113..3b77bdf7e2 100755 --- a/test/model/task/assign.php +++ b/test/model/task/assign.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($task->assignTest($taskIDlist[2],$doneTask)) && p('0:field,old,new') && e('a r($task->assignTest($taskIDlist[3],$pauseTask)) && p('0:field,old,new') && e('assignedTo,,user95'); // pause状态任务指派 r($task->assignTest($taskIDlist[4],$cancelTask)) && p('0:field,old,new') && e('assignedTo,,user96'); // cancel状态任务指派 r($task->assignTest($taskIDlist[5],$closedTask)) && p('0:field,old,new') && e('assignedTo,,user97'); // closed状态任务指派 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/batchchangemodule.php b/test/model/task/batchchangemodule.php index 6bfc958676..28742086c9 100755 --- a/test/model/task/batchchangemodule.php +++ b/test/model/task/batchchangemodule.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $taskIDList = array('1','2','3'); $task = new taskTest(); r($task->batchChangeModuleTest($taskIDList,$moduleID)) && p('0:field,old,new') && e('module,21,22'); // 返回批量修改的第一个值 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/batchcreate.php b/test/model/task/batchcreate.php index 4108aee6b2..d5408fa650 100755 --- a/test/model/task/batchcreate.php +++ b/test/model/task/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ $task = new taskTest(); r($task->batchCreateObject($normal_create, $executionID)) && p('name') && e('批量任务三'); // 测试正常的创建开发任务 r($task->batchCreateObject($Exception_create, $executionID)) && p('message:0') && e('『任务类型』不能为空。'); // 测试正常的创建开发任务 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/batchupdate.php b/test/model/task/batchupdate.php index 65b239da78..9c46488cf3 100755 --- a/test/model/task/batchupdate.php +++ b/test/model/task/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -24,4 +25,4 @@ $normal = array('names' => $name, 'types' => $type,'statuses'=> $statuses); $task = new taskTest(); r($task->batchUpdateObject($normal, $taskID)) && p('1:field,old,new') && e('name,开发任务17,批量修改任务一'); // 测试批量修改任务 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/cancel.php b/test/model/task/cancel.php index 32a08e874e..1b0be87d35 100755 --- a/test/model/task/cancel.php +++ b/test/model/task/cancel.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($task->cancelTest($taskIDlist[1])) && p('0:field,old,new') && e('status,doing, r($task->cancelTest($taskIDlist[2])) && p('0:field,old,new') && e('status,done,cancel'); //done状态任务取消 r($task->cancelTest($taskIDlist[3])) && p('0:field,old,new') && e('status,pause,cancel'); //pause状态任务取消 r($task->cancelTest($taskIDlist[4])) && p('0:field,old,new') && e('status,closed,cancel'); //closed状态任务取消 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/closed.php b/test/model/task/closed.php index b35e2534d2..11b8854301 100755 --- a/test/model/task/closed.php +++ b/test/model/task/closed.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($task->closeTest($taskIDList[1])) && p('0:field,old,new') && e('status,doing,c r($task->closeTest($taskIDList[2])) && p('0:field,old,new') && e('status,done,closed'); //done状态任务关闭 r($task->closeTest($taskIDList[3])) && p('0:field,old,new') && e('status,pause,closed'); //pause状态任务关闭 r($task->closeTest($taskIDList[4])) && p('0:field,old,new') && e('status,cancel,closed'); //cancel状态任务关闭 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/computebeginandend.php b/test/model/task/computebeginandend.php index ad50088305..cf1a38320a 100755 --- a/test/model/task/computebeginandend.php +++ b/test/model/task/computebeginandend.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -12,7 +13,7 @@ pid=1 根据taskID计算没有父计划的开始结束时间 >> 0,6 根据taskID计算有父计划的父开始结束时间 >> 0,7 -根据不存在的taskID计划开始结束时间 >> 0 +根据不存在的taskID计算开始结束时间 >> 0 */ @@ -22,4 +23,4 @@ $task = new taskTest(); r($task->computeBeginAndEndTest($taskIDList[0])) && p('estStartedDiff,deadlineDiff') && e('0,6'); //根据taskID计算没有父计划的开始结束时间 r($task->computeBeginAndEndTest($taskIDList[1])) && p('estStartedDiff,deadlineDiff') && e('0,7'); //根据taskID计算有父计划的父开始结束时间 r($task->computeBeginAndEndTest($taskIDList[2])) && p('estStartedDiff,deadlineDiff') && e('0'); //根据不存在的taskID计算开始结束时间 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/computehours4multiple.php b/test/model/task/computehours4multiple.php index c28ec50421..ee76c8582b 100755 --- a/test/model/task/computehours4multiple.php +++ b/test/model/task/computehours4multiple.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,8 +24,7 @@ task状态为pause只有老task计算多人工时 >> 910,po82,doing,3,3,3 老task不存在的情况有新老task计算多人工时 >> 0 新task不存在的情况有新老task和团队计算多人工时 >> 10001,po82,doing,3,3,3 - - */ +*/ $task1 = new stdclass(); $task1->id = 1; $task1->status = 'wait'; @@ -102,4 +102,4 @@ r($task->computeHours4MultipleTest($task5, $task6, $team)) && p('id,ass r($task->computeHours4MultipleTest($task7)) && p('id,assignedTo,status,estimate,consumed,left') && e('0'); // 老task不存在的情况有新老task和团队计算多人工时 r($task->computeHours4MultipleTest($task7, $task8)) && p('id,assignedTo,status,estimate,consumed,left') && e('0'); // 老task不存在的情况有新老task计算多人工时 r($task->computeHours4MultipleTest($task1, $task8, $team)) && p('id,assignedTo,status,estimate,consumed,left') && e('10001,po82,doing,3,3,3'); // 新task不存在的情况有新老task和团队计算多人工时 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/computeworkinghours.php b/test/model/task/computeworkinghours.php index 19a5899fd1..9771334188 100755 --- a/test/model/task/computeworkinghours.php +++ b/test/model/task/computeworkinghours.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,7 +12,7 @@ cid=1 pid=1 根据taskID计算没有子任务的计划工时 >> 1,0,3,0 -根据taskID计算有子任务的父任务工时 >> 601,18,30,18 +根据taskID计算有父任务的子任务工时 >> 601,18,30,18 根据不存在的taskID计算工时 >> 0 */ @@ -22,4 +23,4 @@ $task = new taskTest(); r($task->computeWorkingHoursTest($taskIDList[0])) && p('id,estimate,consumed,left') && e('1,0,3,0'); //根据taskID计算没有子任务的计划工时 r($task->computeWorkingHoursTest($taskIDList[1])) && p('id,estimate,consumed,left') && e('601,18,30,18'); //根据taskID计算有父任务的子任务工时 r($task->computeWorkingHoursTest($taskIDList[2])) && p('id,estimate,consumed,left') && e('0'); //根据不存在的taskID计算工时 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/create.php b/test/model/task/create.php index 883eae3b8d..3dd46935d2 100755 --- a/test/model/task/create.php +++ b/test/model/task/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -58,4 +59,4 @@ r($task->createObject($t_notype, $executionID)) && p('type:0') && e('『 r($task->createObject($t_errortime, $executionID)) && p('deadline:0') && e('『截止日期』应当不小于『2021-04-10』。'); // 测试开始时间大于结束时间 r($task->createObject($t_assign, $executionID)) && p('assignedTo') && e('user92'); // 测试指派人任务 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/createtaskfromgitlabissue.php b/test/model/task/createtaskfromgitlabissue.php index fa73b7a9d1..7eda6a643b 100755 --- a/test/model/task/createtaskfromgitlabissue.php +++ b/test/model/task/createtaskfromgitlabissue.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -13,10 +14,10 @@ pid=1 测试正常的创建开发任务 >> gitlab中新建的问题01 测试正常的创建开发任务 >> 101 测试正常的创建开发任务 >> 11 -测试不输入执行创建开务 >> 『所属执行』不能为空。 +测试不输入执行创建任务 >> 『所属执行』不能为空。 测试不输入名称创建任务 >> 『任务名称』不能为空。 - */ +*/ $executionID = 101; @@ -46,4 +47,4 @@ r($task->createTaskFromGitlabIssueTest($task2, $executionID)) && p('execution') r($task->createTaskFromGitlabIssueTest($task3, $executionID)) && p('project') && e('11'); // 测试正常的创建开发任务 r($task->createTaskFromGitlabIssueTest($task4, $executionID)) && p('execution:0') && e('『所属执行』不能为空。'); // 测试不输入执行创建任务 r($task->createTaskFromGitlabIssueTest($task5, $executionID)) && p('name:0') && e('『任务名称』不能为空。'); // 测试不输入名称创建任务 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/deleteestimate.php b/test/model/task/deleteestimate.php index 51cdef1297..eed8f38f5d 100755 --- a/test/model/task/deleteestimate.php +++ b/test/model/task/deleteestimate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -18,4 +19,4 @@ $estimateID = '1'; $task = new taskTest(); r($task->deleteEstimateTest($estimateID)) && p('0:field,old,new') && e('consumed,3,2'); // 根据estimateID查看预计工时 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/finish.php b/test/model/task/finish.php index 5a428bf06d..06ce489856 100755 --- a/test/model/task/finish.php +++ b/test/model/task/finish.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -38,4 +39,4 @@ r($task->finishTest($taskIDList[4],$currencyTask)) && p('0:field,old,new' r($task->finishTest($taskIDList[5],$currencyTask)) && p('0:field,old,new') && e('status,closed,done'); //closed状态任务完成 r($task->finishTest($taskIDList[6],$consumedTask)) && p() && e('"总计消耗"必须大于之前消耗'); //总计消耗异常验证 r($task->finishTest($taskIDList[7],$currentConsumedTask)) && p() && e('"本次消耗"不能为0'); //本次消耗不为0 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/getbyid.php b/test/model/task/getbyid.php index 844d46ecfc..549f6eba7e 100755 --- a/test/model/task/getbyid.php +++ b/test/model/task/getbyid.php @@ -17,4 +17,4 @@ pid=1 $taskID = '50'; $task = new taskTest(); -r($task->getByIdTest($taskID)) && p('name') && e('开发任务60'); //根据taskID查找任务详情 +r($task->getByIdTest($taskID)) && p('name') && e('开发任务60'); //根据taskID查找任务详情 \ No newline at end of file diff --git a/test/model/task/getbylist.php b/test/model/task/getbylist.php index 760b9c9f7e..5dcbac16b1 100755 --- a/test/model/task/getbylist.php +++ b/test/model/task/getbylist.php @@ -17,4 +17,4 @@ pid=1 $taskID = '51'; $task = new taskTest(); -r($task->getByListTest($taskID)) && p('51:name') && e('开发任务61'); //根据taskID查找任务详情 +r($task->getByListTest($taskID)) && p('51:name') && e('开发任务61'); //根据taskID查找任务详情 \ No newline at end of file diff --git a/test/model/task/getdataoffinishedtasksperday.php b/test/model/task/getdataoffinishedtasksperday.php index ca492e4194..b7548835bf 100755 --- a/test/model/task/getdataoffinishedtasksperday.php +++ b/test/model/task/getdataoffinishedtasksperday.php @@ -14,6 +14,5 @@ pid=1 */ - $task = new taskTest(); -r($task->getDataOffinishedTasksPerDayTest()) && p() && e('0'); //统计没有每日完成的任务数量 +r($task->getDataOffinishedTasksPerDayTest()) && p() && e('0'); //统计没有每日完成的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperassignedto.php b/test/model/task/getdataoftasksperassignedto.php index 6bacdf81b3..6c8aa6fa73 100755 --- a/test/model/task/getdataoftasksperassignedto.php +++ b/test/model/task/getdataoftasksperassignedto.php @@ -14,6 +14,5 @@ pid=1 */ - $task = new taskTest(); -r($task->getDataOfTasksPerAssignedToTest()) && p('po82:name,value') && e('研发主管82,1'); //统计指派给为po82的任务数量 +r($task->getDataOfTasksPerAssignedToTest()) && p('po82:name,value') && e('研发主管82,1'); //统计指派给为po82的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperclosedreason.php b/test/model/task/getdataoftasksperclosedreason.php index 4c13e5da18..c717079fa5 100755 --- a/test/model/task/getdataoftasksperclosedreason.php +++ b/test/model/task/getdataoftasksperclosedreason.php @@ -14,6 +14,5 @@ pid=1 */ - $task = new taskTest(); -r($task->getDataOfTasksPerClosedReasonTest()) && p() && e('0'); //统计没有完成原因的任务数量 +r($task->getDataOfTasksPerClosedReasonTest()) && p() && e('0'); //统计没有完成原因的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperconsumed.php b/test/model/task/getdataoftasksperconsumed.php index f72d5c8155..106712a0ee 100755 --- a/test/model/task/getdataoftasksperconsumed.php +++ b/test/model/task/getdataoftasksperconsumed.php @@ -20,7 +20,6 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerConsumedTest()) && p('3:name,value') && e('3,90'); //统计消耗工时为3的任务数量 r($task->getDataOfTasksPerConsumedTest()) && p('4:name,value') && e('4,90'); //统计消耗工时为4的任务数量 @@ -28,4 +27,4 @@ r($task->getDataOfTasksPerConsumedTest()) && p('5:name,value') && e('5,90'); // r($task->getDataOfTasksPerConsumedTest()) && p('6:name,value') && e('6,91'); //统计消耗工时为6的任务数量 r($task->getDataOfTasksPerConsumedTest()) && p('7:name,value') && e('7,91'); //统计消耗工时为7的任务数量 r($task->getDataOfTasksPerConsumedTest()) && p('8:name,value') && e('8,91'); //统计消耗工时为8的任务数量 -r($task->getDataOfTasksPerConsumedTest()) && p('9:name,value') && e('9,91'); //统计消耗工时为9的任务数量 +r($task->getDataOfTasksPerConsumedTest()) && p('9:name,value') && e('9,91'); //统计消耗工时为9的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperdeadline.php b/test/model/task/getdataoftasksperdeadline.php index be8f71a5ed..95142c360a 100755 --- a/test/model/task/getdataoftasksperdeadline.php +++ b/test/model/task/getdataoftasksperdeadline.php @@ -10,14 +10,14 @@ title=taskModel->getDataOfTasksPerDeadline(); cid=1 pid=1 -统计日期为+1days的任务数量 >> 17 -统计日期为+2days的任务数量 >> 17 -统计日期为+3days的任务数量 >> 18 -统计日期为+4days的任务数量 >> 18 -统计日期为-1days的任务数量 >> 17 -统计日期为-2days的任务数量 >> 17 -统计日期为-3days的任务数量 >> 17 -统计日期为-4days的任务数量 >> 17 +统计日期为+1days的任务数量 >> 17 +统计日期为+2days的任务数量 >> 17 +统计日期为+3days的任务数量 >> 18 +统计日期为+4days的任务数量 >> 18 +统计日期为-1days的任务数量 >> 17 +统计日期为-2days的任务数量 >> 17 +统计日期为-3days的任务数量 >> 17 +统计日期为-4days的任务数量 >> 17 */ @@ -29,4 +29,4 @@ r($task->getDataOfTasksPerDeadlineTest(3)) && p("3:value") && e("18"); //统计 r($task->getDataOfTasksPerDeadlineTest(4)) && p("4:value") && e("17"); //统计日期为-1days的任务数量 r($task->getDataOfTasksPerDeadlineTest(5)) && p("5:value") && e("17"); //统计日期为-2days的任务数量 r($task->getdataoftasksperdeadlinetest(6)) && p("6:value") && e("17"); //统计日期为-3days的任务数量 -r($task->getdataoftasksperdeadlinetest(7)) && p("7:value") && e("17"); //统计日期为-4days的任务数量 +r($task->getdataoftasksperdeadlinetest(7)) && p("7:value") && e("17"); //统计日期为-4days的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperestimate.php b/test/model/task/getdataoftasksperestimate.php index 29d12f01a2..6f25b7c25c 100755 --- a/test/model/task/getdataoftasksperestimate.php +++ b/test/model/task/getdataoftasksperestimate.php @@ -21,7 +21,6 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerEstimateTest()) && p('0:name,value') && e('0,83'); //统计预计工时为0的任务数量 r($task->getDataOfTasksPerEstimateTest()) && p('1:name,value') && e('1,83'); //统计预计工时为1的任务数量 @@ -30,4 +29,4 @@ r($task->getDataOfTasksPerEstimateTest()) && p('3:name,value') && e('3,83'); // r($task->getDataOfTasksPerEstimateTest()) && p('4:name,value') && e('4,83'); //统计预计工时为4的任务数量 r($task->getDataOfTasksPerEstimateTest()) && p('5:name,value') && e('5,83'); //统计预计工时为5的任务数量 r($task->getDataOfTasksPerEstimateTest()) && p('6:name,value') && e('6,82'); //统计预计工时为6的任务数量 -r($task->getDataOfTasksPerEstimateTest()) && p('7:name,value') && e('7,82'); //统计预计工时为7的任务数量 +r($task->getDataOfTasksPerEstimateTest()) && p('7:name,value') && e('7,82'); //统计预计工时为7的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperexecution.php b/test/model/task/getdataoftasksperexecution.php index cb5a4b3627..8398ca746b 100755 --- a/test/model/task/getdataoftasksperexecution.php +++ b/test/model/task/getdataoftasksperexecution.php @@ -20,7 +20,6 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerExecutionTest()) && p('101:name,value') && e('迭代1,14'); //统计executionID为101的执行的任务数量 r($task->getDataOfTasksPerExecutionTest()) && p('102:name,value') && e('迭代2,4'); //统计executionID为102的执行的任务数量 @@ -28,4 +27,4 @@ r($task->getDataOfTasksPerExecutionTest()) && p('103:name,value') && e(' r($task->getDataOfTasksPerExecutionTest()) && p('104:name,value') && e('迭代4,4'); //统计executionID为104的执行的任务数量 r($task->getDataOfTasksPerExecutionTest()) && p('105:name,value') && e('迭代5,4'); //统计executionID为105的执行的任务数量 r($task->getDataOfTasksPerExecutionTest()) && p('106:name,value') && e('迭代6,4'); //统计executionID为106的执行的任务数量 -r($task->getDataOfTasksPerExecutionTest()) && p('107:name,value') && e('迭代7,4'); //统计executionID为107的执行的任务数量 +r($task->getDataOfTasksPerExecutionTest()) && p('107:name,value') && e('迭代7,4'); //统计executionID为107的执行的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperfinishedby.php b/test/model/task/getdataoftasksperfinishedby.php index a2c12873f4..ee45b06dd6 100755 --- a/test/model/task/getdataoftasksperfinishedby.php +++ b/test/model/task/getdataoftasksperfinishedby.php @@ -14,6 +14,5 @@ pid=1 */ - $task = new taskTest(); -r($task->getDataOfTasksPerFinishedByTest()) && p() && e('0'); //统计没有完成者的任务数量 +r($task->getDataOfTasksPerFinishedByTest()) && p() && e('0'); //统计没有完成者的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperleft.php b/test/model/task/getdataoftasksperleft.php index 9c12e86246..5618e2dbee 100755 --- a/test/model/task/getdataoftasksperleft.php +++ b/test/model/task/getdataoftasksperleft.php @@ -21,7 +21,6 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerLeftTest()) && p('0:name,value') && e('0,83'); //统计剩余工时为0的任务数量 r($task->getDataOfTasksPerLeftTest()) && p('1:name,value') && e('1,83'); //统计剩余工时为1的任务数量 @@ -30,4 +29,4 @@ r($task->getDataOfTasksPerLeftTest()) && p('3:name,value') && e('3,83'); //统 r($task->getDataOfTasksPerLeftTest()) && p('4:name,value') && e('4,83'); //统计剩余工时为4的任务数量 r($task->getDataOfTasksPerLeftTest()) && p('5:name,value') && e('5,83'); //统计剩余工时为5的任务数量 r($task->getDataOfTasksPerLeftTest()) && p('6:name,value') && e('6,82'); //统计剩余工时为6的任务数量 -r($task->getDataOfTasksPerLeftTest()) && p('7:name,value') && e('7,82'); //统计剩余工时为7的任务数量 +r($task->getDataOfTasksPerLeftTest()) && p('7:name,value') && e('7,82'); //统计剩余工时为7的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftaskspermodule.php b/test/model/task/getdataoftaskspermodule.php index 5d59c2f8f2..a8e81ea46d 100755 --- a/test/model/task/getdataoftaskspermodule.php +++ b/test/model/task/getdataoftaskspermodule.php @@ -10,15 +10,13 @@ title=taskModel->getDataOfTasksPerModule(); cid=1 pid=1 - -统计moduleID为21的模块的任务数量 >> /模块1,12 +统计moduleID为21的模块的任务数量 >> /模块1,12 统计moduleID为615的模块的任务数量 >> /模块595,2 统计moduleID为504的模块的任务数量 >> /模块484,2 */ - $task = new taskTest(); r($task->getDataOfTasksPerModuleTest()) && p('21:name,value') && e('/模块1,12'); //统计moduleID为21的模块的任务数量 r($task->getDataOfTasksPerModuleTest()) && p('615:name,value') && e('/模块595,2'); //统计moduleID为615的模块的任务数量 -r($task->getDataOfTasksPerModuleTest()) && p('504:name,value') && e('/模块484,2'); //统计moduleID为504的模块的任务数量 +r($task->getDataOfTasksPerModuleTest()) && p('504:name,value') && e('/模块484,2'); //统计moduleID为504的模块的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperpri.php b/test/model/task/getdataoftasksperpri.php index a5415a17ec..c37b20c35c 100755 --- a/test/model/task/getdataoftasksperpri.php +++ b/test/model/task/getdataoftasksperpri.php @@ -17,9 +17,8 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerPriTest()) && p('1:name,value') && e('1,228'); //统计优先级为1的任务数量 r($task->getDataOfTasksPerPriTest()) && p('2:name,value') && e('2,228'); //统计优先级为2的任务数量 r($task->getDataOfTasksPerPriTest()) && p('3:name,value') && e('3,227'); //统计优先级为3的任务数量 -r($task->getDataOfTasksPerPriTest()) && p('4:name,value') && e('4,227'); //统计优先级为4的任务数量 +r($task->getDataOfTasksPerPriTest()) && p('4:name,value') && e('4,227'); //统计优先级为4的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftasksperstatus.php b/test/model/task/getdataoftasksperstatus.php index ac93049e6c..40ab0b21f3 100755 --- a/test/model/task/getdataoftasksperstatus.php +++ b/test/model/task/getdataoftasksperstatus.php @@ -19,11 +19,10 @@ pid=1 */ - $task = new taskTest(); r($task->getDataOfTasksPerStatusTest()) && p('done:name,value') && e('已完成,152'); //统计状态为已完成的任务数量 r($task->getDataOfTasksPerStatusTest()) && p('wait:name,value') && e('未开始,152'); //统计状态为未开始的任务数量 r($task->getDataOfTasksPerStatusTest()) && p('doing:name,value') && e('进行中,152'); //统计状态为进行中的任务数量 r($task->getDataOfTasksPerStatusTest()) && p('pause:name,value') && e('已暂停,152'); //统计状态为已暂停的任务数量 r($task->getDataOfTasksPerStatusTest()) && p('cancel:name,value') && e('已取消,151'); //统计状态为已取消的任务数量 -r($task->getDataOfTasksPerStatusTest()) && p('closed:name,value') && e('已关闭,151'); //统计状态为已关闭的任务数量 +r($task->getDataOfTasksPerStatusTest()) && p('closed:name,value') && e('已关闭,151'); //统计状态为已关闭的任务数量 \ No newline at end of file diff --git a/test/model/task/getdataoftaskspertype.php b/test/model/task/getdataoftaskspertype.php index 9010746f89..6d46ae8b4d 100755 --- a/test/model/task/getdataoftaskspertype.php +++ b/test/model/task/getdataoftaskspertype.php @@ -10,17 +10,15 @@ title=taskModel->getDataOfTasksPerType(); cid=1 pid=1 -统计类型为devel的任务数量 >> 开发,115 -统计类型为study的任务数量 >> 研究,114 +统计类型为devel的任务数量 >> 开发,115 +统计类型为study的任务数量 >> 研究,114 统计类型为discuss的任务数量 >> 讨论,113 -统计类型为ui的任务数量 >> 界面,113 +统计类型为ui的任务数量 >> 界面,113 */ - $task = new taskTest(); r($task->getDataOfTasksPerTypeTest()) && p('devel:name,value') && e('开发,115'); //统计类型为devel的任务数量 r($task->getDataOfTasksPerTypeTest()) && p('study:name,value') && e('研究,114'); //统计类型为study的任务数量 r($task->getDataOfTasksPerTypeTest()) && p('discuss:name,value') && e('讨论,113'); //统计类型为discuss的任务数量 -r($task->getDataOfTasksPerTypeTest()) && p('ui:name,value') && e('界面,113'); //统计类型为ui的任务数量 - +r($task->getDataOfTasksPerTypeTest()) && p('ui:name,value') && e('界面,113'); //统计类型为ui的任务数量 \ No newline at end of file diff --git a/test/model/task/getestimatebyid.php b/test/model/task/getestimatebyid.php index 4bb147f53f..745ed6f3d1 100755 --- a/test/model/task/getestimatebyid.php +++ b/test/model/task/getestimatebyid.php @@ -17,4 +17,4 @@ pid=1 $estimateID = '1'; $task = new taskTest(); -r($task->getEstimateByIdTest($estimateID)) && p('work') && e('这里是工作内容1'); // 根据estimateID查看预计工时 +r($task->getEstimateByIdTest($estimateID)) && p('work') && e('这里是工作内容1'); // 根据estimateID查看预计工时 \ No newline at end of file diff --git a/test/model/task/getexecutiontaskpairs.php b/test/model/task/getexecutiontaskpairs.php index f5f4e27aae..2d53e7ccc0 100755 --- a/test/model/task/getexecutiontaskpairs.php +++ b/test/model/task/getexecutiontaskpairs.php @@ -17,4 +17,4 @@ pid=1 $executionID = '102'; $task = new taskTest(); -r($task->getExecutionTaskPairsTest($executionID)) && p('2') && e('2::开发任务12'); //根据执行id查出任务id与name +r($task->getExecutionTaskPairsTest($executionID)) && p('2') && e('2::开发任务12'); //根据执行id查出任务id与name \ No newline at end of file diff --git a/test/model/task/getexecutiontasks.php b/test/model/task/getexecutiontasks.php index b18fcf192b..5ff1fd5011 100755 --- a/test/model/task/getexecutiontasks.php +++ b/test/model/task/getexecutiontasks.php @@ -20,4 +20,4 @@ $count = array('0','1'); $task = new taskTest(); r($task->getExecutionTasksTest($executionID,$count[0])) && p('1:name') && e('开发任务11'); //根据执行id获取任务列表 -r($task->getExecutionTasksTest($executionID,$count[1])) && p() && e('4'); //根据执行id获取任务数量 +r($task->getExecutionTasksTest($executionID,$count[1])) && p() && e('4'); //根据执行id获取任务数量 \ No newline at end of file diff --git a/test/model/task/getfinishedusers.php b/test/model/task/getfinishedusers.php index 492618f9d5..8e36b2298d 100755 --- a/test/model/task/getfinishedusers.php +++ b/test/model/task/getfinishedusers.php @@ -20,4 +20,4 @@ $task = new taskTest(); $taskObject = $task->getByIDTest(1); r($task->getFinishedUsersTest()) && p() && e('0'); // 获取空数据 -r($task->getFinishedUsersTest($taskObject->id, $taskObject->team)) && p() && e('0'); // 获取完成多人任务ID为1的人员 +r($task->getFinishedUsersTest($taskObject->id, $taskObject->team)) && p() && e('0'); // 获取完成多人任务ID为1的人员 \ No newline at end of file diff --git a/test/model/task/getmemberpairs.php b/test/model/task/getmemberpairs.php index ab49f37c54..0ce84e255b 100755 --- a/test/model/task/getmemberpairs.php +++ b/test/model/task/getmemberpairs.php @@ -10,10 +10,10 @@ title=taskModel->getDataOfTasksPerEstimate(); cid=1 pid=1 -获取taskid为1的团队人员 po82 >> P:研发主管82 -获取taskid为1的团队人员 user92 >> U:测试92 -获取taskid为1的团队人员数量 >> 3 -获取taskid为601的团队人员数量 >> 1 +获取taskid为1的团队人员 po82 >> P:研发主管82 +获取taskid为1的团队人员 user92 >> U:测试92 +获取taskid为1的团队人员数量 >> 3 +获取taskid为601的团队人员数量 >> 1 获取taskid为不存在的100001的团队人员 >> 0 */ @@ -25,4 +25,4 @@ r($task->getMemberPairsTest($taskIDList[0])) && p('po82') && e('P:研发主管 r($task->getMemberPairsTest($taskIDList[0])) && p('user92') && e('U:测试92'); //获取taskid为1的团队人员 user92 r($task->getMemberPairsTest($taskIDList[0])) && p('count') && e('3'); //获取taskid为1的团队人员数量 r($task->getMemberPairsTest($taskIDList[1])) && p('count') && e('1'); //获取taskid为601的团队人员数量 -r($task->getMemberPairsTest($taskIDList[2])) && p() && e('0'); //获取taskid为不存在的100001的团队人员 +r($task->getMemberPairsTest($taskIDList[2])) && p() && e('0'); //获取taskid为不存在的100001的团队人员 \ No newline at end of file diff --git a/test/model/task/getnextuser.php b/test/model/task/getnextuser.php index 345257b8e4..ebcf5a92a5 100755 --- a/test/model/task/getnextuser.php +++ b/test/model/task/getnextuser.php @@ -22,7 +22,6 @@ pid=1 $users = array('admin', 'user1', 'user2', 'po1', 'po2', 'pm1', 'pm2'); - $task = new taskTest(); r($task->getNextUserTest($users, $users[0])) && p() && e('user1'); //计算current为0的下一个用户 r($task->getNextUserTest($users, $users[1])) && p() && e('user2'); //计算current为1的下一个用户 @@ -30,4 +29,4 @@ r($task->getNextUserTest($users, $users[2])) && p() && e('po1'); //计算curre r($task->getNextUserTest($users, $users[3])) && p() && e('po2'); //计算current为3的下一个用户 r($task->getNextUserTest($users, $users[4])) && p() && e('pm1'); //计算current为4的下一个用户 r($task->getNextUserTest($users, $users[5])) && p() && e('pm2'); //计算current为5的下一个用户 -r($task->getNextUserTest($users, $users[6])) && p() && e('admin'); //计算current为6的下一个用户 +r($task->getNextUserTest($users, $users[6])) && p() && e('admin'); //计算current为6的下一个用户 \ No newline at end of file diff --git a/test/model/task/getparenttaskpairs.php b/test/model/task/getparenttaskpairs.php index 91c5c7d6a9..05414f01fa 100755 --- a/test/model/task/getparenttaskpairs.php +++ b/test/model/task/getparenttaskpairs.php @@ -18,8 +18,8 @@ pid=1 查找有父任务的执行下的父任务 普通任务601 >> 更多任务1 查找有父任务的执行下的父任务 普通任务602 >> 更多任务2 查找有父任务的执行下的父任务 普通任务603 >> 更多任务3 -查找没有父任务的执行下的父任务 普通任务2 >> 开发任务12 -查找没有父任务的执行下的父任务 普通任务64 >> 更多任务4 +查找没有父任务的执行下的父任务 普通任务12 >> 开发任务12 +查找没有父任务的执行下的父任务 普通任务604 >> 更多任务4 查找不是执行的父任务 >> 0 查找不存在的执行下的父任务 >> 0 @@ -41,4 +41,4 @@ r($task->getParentTaskPairsTest($executionIDList[0])) && p('603') && e('更多 r($task->getParentTaskPairsTest($executionIDList[1])) && p('2') && e('开发任务12'); // 查找没有父任务的执行下的父任务 普通任务12 r($task->getParentTaskPairsTest($executionIDList[1])) && p('604') && e('更多任务4'); // 查找没有父任务的执行下的父任务 普通任务604 r($task->getParentTaskPairsTest($executionIDList[2])) && p('name') && e('0'); // 查找不是执行的父任务 -r($task->getParentTaskPairsTest($executionIDList[3])) && p('name') && e('0'); // 查找不存在的执行下的父任务 +r($task->getParentTaskPairsTest($executionIDList[3])) && p('name') && e('0'); // 查找不存在的执行下的父任务 \ No newline at end of file diff --git a/test/model/task/getprojectid.php b/test/model/task/getprojectid.php index 22c40dcad3..2beff448ce 100755 --- a/test/model/task/getprojectid.php +++ b/test/model/task/getprojectid.php @@ -17,4 +17,4 @@ pid=1 $executionID = '101'; $task = new taskTest(); -r($task->getProjectIDTest($executionID)) && p('project') && e('11'); //根据executionID查找projectID +r($task->getProjectIDTest($executionID)) && p('project') && e('11'); //根据executionID查找projectID \ No newline at end of file diff --git a/test/model/task/getstorycomments.php b/test/model/task/getstorycomments.php index 71dc32205c..70d3dab655 100755 --- a/test/model/task/getstorycomments.php +++ b/test/model/task/getstorycomments.php @@ -11,7 +11,7 @@ cid=1 pid=1 根据storyID查找comment >> 这是一个系统日志测试备注2 -根据storyID查找comment >> 0 +根据不存在的storyID查找comment >> 0 */ @@ -19,4 +19,4 @@ $storyIDList = array(2, 1000001); $task = new taskTest(); r($task->getStoryCommentsTest($storyIDList[0])) && p('0:comment') && e('这是一个系统日志测试备注2'); //根据storyID查找comment -r($task->getStoryCommentsTest($storyIDList[1])) && p('0:comment') && e('0'); //根据不存在的storyID查找comment +r($task->getStoryCommentsTest($storyIDList[1])) && p('0:comment') && e('0'); //根据不存在的storyID查找comment \ No newline at end of file diff --git a/test/model/task/getstorytaskcounts.php b/test/model/task/getstorytaskcounts.php index c4bd5d14c3..38fe34397f 100755 --- a/test/model/task/getstorytaskcounts.php +++ b/test/model/task/getstorytaskcounts.php @@ -21,4 +21,4 @@ $storyIDList = array('1','5','9'); $task = new taskTest(); r($task->getStoryTaskCountsTest($storyIDList)) && p('1') && e('6'); // 根据需求1查看任务数量 r($task->getStoryTaskCountsTest($storyIDList)) && p('5') && e('6'); // 根据需求5查看任务数量 -r($task->getStoryTaskCountsTest($storyIDList)) && p('9') && e('6'); // 根据需求9查看任务数量 +r($task->getStoryTaskCountsTest($storyIDList)) && p('9') && e('6'); // 根据需求9查看任务数量 \ No newline at end of file diff --git a/test/model/task/getstorytasks.php b/test/model/task/getstorytasks.php index 1b707d409e..a4193dfb0c 100755 --- a/test/model/task/getstorytasks.php +++ b/test/model/task/getstorytasks.php @@ -20,4 +20,4 @@ $count = array('0','1'); $task = new taskTest(); r($task->getStoryTasksTest($storyID,$count[0])) && p('1:name') && e('开发任务11'); // 根据需求查看任务 -r($task->getStoryTasksTest($storyID,$count[1])) && p() && e('6'); // 根据需求查看任务数量统计 +r($task->getStoryTasksTest($storyID,$count[1])) && p() && e('6'); // 根据需求查看任务数量统计 \ No newline at end of file diff --git a/test/model/task/gettaskestimate.php b/test/model/task/gettaskestimate.php index 49cbc35874..716213fd36 100755 --- a/test/model/task/gettaskestimate.php +++ b/test/model/task/gettaskestimate.php @@ -19,4 +19,4 @@ $waitstart = array('assignedTo' => 'user92','consumed' => '10'); $task = new taskTest(); $task->startTest($taskID,$waitstart); -r($task->getTaskEstimateTest($taskID)) && p('0:task') && e('55'); // 查看任务预计 +r($task->getTaskEstimateTest($taskID)) && p('0:task') && e('55'); // 查看任务预计 \ No newline at end of file diff --git a/test/model/task/gettasksbymodule.php b/test/model/task/gettasksbymodule.php index 8b30b27a6b..1453f8cda8 100755 --- a/test/model/task/gettasksbymodule.php +++ b/test/model/task/gettasksbymodule.php @@ -22,4 +22,4 @@ $count = array('0','1'); $task = new taskTest(); r($task->getTasksByModuleTest($executionID,$moduleIdList,$count[0])) && p('0:name') && e('子任务10'); //根据模块获取任务列表 -r($task->getTasksByModuleTest($executionID,$moduleIdList,$count[1])) && p() && e('1'); //根据模块获取任务数量 +r($task->getTasksByModuleTest($executionID,$moduleIdList,$count[1])) && p() && e('1'); //根据模块获取任务数量 \ No newline at end of file diff --git a/test/model/task/gettoandcclist.php b/test/model/task/gettoandcclist.php index f0519686c8..60f05119d1 100755 --- a/test/model/task/gettoandcclist.php +++ b/test/model/task/gettoandcclist.php @@ -14,17 +14,16 @@ pid=1 计算有assignedto 有mailto的发信列表1 >> user1,user2,user3 计算有assignedto 无mailto的发信列表2 >> po82 计算有assignedto 无mailto的发信列表1 >> 0 -计算无assignedto 无mailto的发信列表 >> 0 -计算不存在的task的发信列表 >> 0 +计算无assignedto 无mailto的发信列表 >> 0 +计算不存在的task的发信列表 >> 0 */ $taskIDList = array('1', '601', '100001'); - $task = new taskTest(); r($task->getToAndCcListTest($taskIDList[0])) && p('2') && e('po82'); //计算有assignedto 有mailto的发信列表2 r($task->getToAndCcListTest($taskIDList[0])) && p('1') && e('user1,user2,user3'); //计算有assignedto 有mailto的发信列表1 r($task->getToAndCcListTest($taskIDList[0], true)) && p('2') && e('po82'); //计算有assignedto 无mailto的发信列表2 r($task->getToAndCcListTest($taskIDList[0], true)) && p('1') && e('0'); //计算有assignedto 无mailto的发信列表1 r($task->getToAndCcListTest($taskIDList[1])) && p() && e('0'); //计算无assignedto 无mailto的发信列表 -r($task->getToAndCcListTest($taskIDList[2])) && p() && e('0'); //计算不存在的task的发信列表 +r($task->getToAndCcListTest($taskIDList[2])) && p() && e('0'); //计算不存在的task的发信列表 \ No newline at end of file diff --git a/test/model/task/getusersuspendedtasks.php b/test/model/task/getusersuspendedtasks.php index 9b45989f6b..bd2ed9f933 100755 --- a/test/model/task/getusersuspendedtasks.php +++ b/test/model/task/getusersuspendedtasks.php @@ -19,4 +19,4 @@ $assignedTo = 'test14'; $task = new taskTest(); //var_dump($task->getUserSuspendedTasksTest($taskID,$assignedTo));die; -r($task->getUserSuspendedTasksTest($taskID,$assignedTo)) && p(''.$taskID.':name') && e('开发任务33'); // 根据指派人员查看执行和任务对应关系 +r($task->getUserSuspendedTasksTest($taskID,$assignedTo)) && p(''.$taskID.':name') && e('开发任务33'); // 根据指派人员查看执行和任务对应关系 \ No newline at end of file diff --git a/test/model/task/getusertaskpairs.php b/test/model/task/getusertaskpairs.php index 44f3113b0d..de36150475 100755 --- a/test/model/task/getusertaskpairs.php +++ b/test/model/task/getusertaskpairs.php @@ -18,4 +18,4 @@ $taskID = '3'; $assignedTo = 'user95'; $task = new taskTest(); -r($task->getUserTaskPairsTest($taskID,$assignedTo)) && p('3') && e('迭代3 / 开发任务13'); // 根据指派人员查看执行和任务对应关系 +r($task->getUserTaskPairsTest($taskID,$assignedTo)) && p('3') && e('迭代3 / 开发任务13'); // 根据指派人员查看执行和任务对应关系 \ No newline at end of file diff --git a/test/model/task/getusertasks.php b/test/model/task/getusertasks.php index 828325c25c..871d41848b 100755 --- a/test/model/task/getusertasks.php +++ b/test/model/task/getusertasks.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -19,4 +20,4 @@ $assignedTo = 'user92'; $task = new taskTest(); r($task->getUserTasksTest($taskID,$assignedTo)) && p('2:name') && e('开发任务12'); // 根据指派人员查看任务 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/isclickable.php b/test/model/task/isclickable.php index 5e4d175f64..40ab7aef60 100755 --- a/test/model/task/isclickable.php +++ b/test/model/task/isclickable.php @@ -10,24 +10,25 @@ title=taskModel->isClickable(); cid=1 pid=1 -计算任务为父任务 状态为wait 能否进行start操作 >> 1 -计算任务为父任务 状态为doing 能否进行finished操作 >> 1 -计算任务为父任务 状态为done 能否进行pause操作 >> 2 -计算任务为父任务 状态为pause 能否进行assignto操作 >> 1 -计算任务为父任务 状态为closed 能否进行close操作 >> 2 -计算任务为父任务 状态为cancel 能否进行batchcreate操作 >> 1 +计算任务为父任务 状态为wait 能否进行start操作 >> 1 +计算任务为父任务 状态为doing 能否进行finished操作 >> 1 +计算任务为父任务 状态为done 能否进行pause操作 >> 2 +计算任务为父任务 状态为pause 能否进行assignto操作 >> 1 +计算任务为父任务 状态为closed 能否进行close操作 >> 2 +计算任务为父任务 状态为cancel 能否进行batchcreate操作 >> 1 计算任务为普通任务 状态为wait 能否进行recordestimate操作 >> 2 -计算任务为普通任务 状态为doing 能否进行delete操作 >> 2 -计算任务为普通任务 状态为done 能否进行start操作 >> 2 -计算任务为普通任务 状态为pause 能否进行finished操作 >> 1 -计算任务为普通任务 状态为closed 能否进行restart操作 >> 2 -计算任务为普通任务 状态为cancel 能否进行pause操作 >> 2 -计算任务为子任务 状态为wait 能否进行assignto操作 >> 1 -计算任务为子任务 状态为doing 能否进行close操作 >> 2 -计算任务为子任务 状态为done 能否进行batchcreate操作 >> 2 -计算任务为子任务 状态为pause 能否进行recordestimate操作 >> 1 -计算任务为子任务 状态为closed 能否进行delete操作 >> 1 -计算任务为子任务 状态为cancel 能否进行start操作 >> 2 +计算任务为普通任务 状态为doing 能否进行delete操作 >> 2 +计算任务为普通任务 状态为done 能否进行start操作 >> 2 +计算任务为普通任务 状态为pause 能否进行finished操作 >> 1 +计算任务为普通任务 状态为closed 能否进行restart操作 >> 2 +计算任务为普通任务 状态为cancel 能否进行pause操作 >> 2 +计算任务为子任务 状态为wait 能否进行assignto操作 >> 1 +计算任务为子任务 状态为doing 能否进行close操作 >> 2 +计算任务为子任务 状态为done 能否进行batchcreate操作 >> 2 +计算任务为子任务 状态为pause 能否进行recordestimate操作 >> 1 +计算任务为子任务 状态为closed 能否进行delete操作 >> 1 +计算任务为子任务 状态为cancel 能否进行start操作 >> 2 + */ $task1 = new stdclass(); @@ -120,4 +121,4 @@ r($task->isClickableTest($task14, 'close')) && p('2') && e("2"); //计 r($task->isClickableTest($task15, 'batchcreate')) && p('2') && e("2"); //计算任务为子任务 状态为done 能否进行batchcreate操作 r($task->isClickableTest($task16, 'recordestimate')) && p('1') && e("1"); //计算任务为子任务 状态为pause 能否进行recordestimate操作 r($task->isClickableTest($task17, 'delete')) && p('1') && e("1"); //计算任务为子任务 状态为closed 能否进行delete操作 -r($task->isClickableTest($task18, 'start')) && p('2') && e("2"); //计算任务为子任务 状态为cancel 能否进行start操作 +r($task->isClickableTest($task18, 'start')) && p('2') && e("2"); //计算任务为子任务 状态为cancel 能否进行start操作 \ No newline at end of file diff --git a/test/model/task/needupdatebugstatus.php b/test/model/task/needupdatebugstatus.php index a338ee30f7..85344ca026 100755 --- a/test/model/task/needupdatebugstatus.php +++ b/test/model/task/needupdatebugstatus.php @@ -10,8 +10,8 @@ title=taskModel->needUpdateBugStatus(); cid=1 pid=1 -计算不来源于bug的任务是否需要更新bug状态 >> 2 -计算来源于bug的任务是否需要更新bug状态 bug状态active >> 1 +计算不来源于bug的任务是否需要更新bug状态 >> 2 +计算来源于bug的任务是否需要更新bug状态 bug状态active >> 1 计算来源于bug的任务是否需要更新bug状态 bug状态resolved >> 2 */ @@ -28,4 +28,4 @@ $task3->fromBug = 51; $task = new taskTest(); r($task->needUpdateBugStatusTest($task1)) && p() && e('2'); //计算不来源于bug的任务是否需要更新bug状态 r($task->needUpdateBugStatusTest($task2)) && p() && e('1'); //计算来源于bug的任务是否需要更新bug状态 bug状态active -r($task->needUpdateBugStatusTest($task3)) && p() && e('2'); //计算来源于bug的任务是否需要更新bug状态 bug状态resolved +r($task->needUpdateBugStatusTest($task3)) && p() && e('2'); //计算来源于bug的任务是否需要更新bug状态 bug状态resolved \ No newline at end of file diff --git a/test/model/task/pause.php b/test/model/task/pause.php index 2e29aae650..dc64a5135c 100755 --- a/test/model/task/pause.php +++ b/test/model/task/pause.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ r($task->pauseTest($taskIDList[1])) && p('0:field,old,new') && e('status,doing,p r($task->pauseTest($taskIDList[2])) && p('0:field,old,new') && e('status,done,pause'); //done状态任务暂停 r($task->pauseTest($taskIDList[3])) && p('0:field,old,new') && e('status,cancel,pause'); //cancel状态任务暂停 r($task->pauseTest($taskIDList[4])) && p('0:field,old,new') && e('status,closed,pause'); //closed状态任务暂停 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/processdata4report.php b/test/model/task/processdata4report.php index 89be3ea6d7..689e18a6be 100755 --- a/test/model/task/processdata4report.php +++ b/test/model/task/processdata4report.php @@ -10,32 +10,30 @@ title=taskModel->processData4Report(); cid=1 pid=1 -计算executionID为101的执行下按迭代任务数统计的图表数据 101 >> 101,14 -计算executionID为101的执行下按模块任务统计的图表数据 27 >> 27,1 -计算executionID为101的执行下按模块任务统计的图表数据 21 >> 21,12 -计算executionID为101的执行下按指派给统计的图表数据 >> po82,1 -计算executionID为101的执行下按任务类型统计的图表数据 ui >> ui,1 -计算executionID为101的执行下按任务类型统计的图表数据 test >> test,2 -计算executionID为101的执行下按优先级统计的图表数据 1 >> 1,5 -计算executionID为101的执行下按优先级统计的图表数据 2 >> 2,4 -计算executionID为101的执行下按任务状态统计的图表数据 -8day >> 2 +计算executionID为101的执行下按迭代任务数统计的图表数据 101 >> 101,14 +计算executionID为101的执行下按模块任务统计的图表数据 27 >> 27,1 +计算executionID为101的执行下按模块任务统计的图表数据 21 >> 21,12 +计算executionID为101的执行下按指派给统计的图表数据 >> po82,1 +计算executionID为101的执行下按任务类型统计的图表数据 ui >> ui,1 +计算executionID为101的执行下按任务类型统计的图表数据 test >> test,2 +计算executionID为101的执行下按优先级统计的图表数据 1 >> 1,5 +计算executionID为101的执行下按优先级统计的图表数据 2 >> 2,4 +计算executionID为101的执行下按任务状态统计的图表数据 -8day >> 2 计算executionID为101的执行下按任务状态统计的图表数据 -15day >> 1 -计算executionID为101的执行下按截止时间统计的图表数据 0 >> 0,3 -计算executionID为101的执行下按截止时间统计的图表数据 5 >> 5,1 -计算executionID为101的执行下按预计时间统计的图表数据 0 >> 0,2 -计算executionID为101的执行下按预计时间统计的图表数据 6 >> 6,1 -计算executionID为101的执行下按剩余时间统计的图表数据 3 >> 3,2 -计算executionID为101的执行下按剩余时间统计的图表数据 7 >> 7,1 -计算executionID为101的执行下按消耗时间统计的图表数据 >> ,11 -计算executionID为101的执行下按由谁完成统计的图表数据 >> ,14 -计算executionID为101的执行下按关闭原因统计的图表数据 >> void -计算executionID为101的执行下按每天完成统计的图表数据 wait >> wait,4 -计算executionID为101的执行下按每天完成统计的图表数据 done >> done,3 +计算executionID为101的执行下按截止时间统计的图表数据 0 >> 0,3 +计算executionID为101的执行下按截止时间统计的图表数据 5 >> 5,1 +计算executionID为101的执行下按预计时间统计的图表数据 0 >> 0,2 +计算executionID为101的执行下按预计时间统计的图表数据 6 >> 6,1 +计算executionID为101的执行下按剩余时间统计的图表数据 3 >> 3,2 +计算executionID为101的执行下按剩余时间统计的图表数据 7 >> 7,1 +计算executionID为101的执行下按消耗时间统计的图表数据 >> ,11 +计算executionID为101的执行下按由谁完成统计的图表数据 >> ,14 +计算executionID为101的执行下按关闭原因统计的图表数据 >> void +计算executionID为101的执行下按每天完成统计的图表数据 wait >> wait,4 +计算executionID为101的执行下按每天完成统计的图表数据 done >> done,3 */ - - $task = new taskTest(); r($task->processData4ReportTest('', "execution")) && p('101:name,value') && e('101,14'); //计算executionID为101的执行下按迭代任务数统计的图表数据 101 r($task->processData4ReportTest('', 'module')) && p('27:name,value') && e('27,1'); //计算executionID为101的执行下按模块任务统计的图表数据 27 @@ -57,4 +55,4 @@ r($task->processData4ReportTest('1', 'finishedBy')) && p('void:name,value') && e r($task->processData4ReportTest('', 'closedReason')) && p('void:name,value') && e(',14'); //计算executionID为101的执行下按由谁完成统计的图表数据 r($task->processData4ReportTest('', 'date')) && p('void') && e('void'); //计算executionID为101的执行下按关闭原因统计的图表数据 r($task->processData4ReportTest('', 'status')) && p('wait:name,value') && e('wait,4'); //计算executionID为101的执行下按每天完成统计的图表数据 wait -r($task->processData4ReportTest('', 'status')) && p('done:name,value') && e('done,3'); //计算executionID为101的执行下按每天完成统计的图表数据 done +r($task->processData4ReportTest('', 'status')) && p('done:name,value') && e('done,3'); //计算executionID为101的执行下按每天完成统计的图表数据 done \ No newline at end of file diff --git a/test/model/task/processtask.php b/test/model/task/processtask.php index d4c83b4b8a..423ff5302e 100755 --- a/test/model/task/processtask.php +++ b/test/model/task/processtask.php @@ -10,12 +10,12 @@ title=taskModel->processTask(); cid=1 pid=1 -根据taskID计算wait 未延迟的任务进度 >> ,,normal,75 -根据taskID计算wait 延迟的任务进度 >> 1,,normal,75 -根据taskID计算doing 延迟的任务进度 >> 1,,normal,80 -根据taskID计算doing 未延迟的任务进度 >> ,,normal,80 -根据taskID计算done 延迟的任务进度 >> ,,normal,100 -根据taskID计算算done 未延迟的任务进度 >> ,,normal,100 +根据taskID计算wait 未延迟的任务进度 >> ,,normal,75 +根据taskID计算wait 延迟的任务进度 >> 1,,normal,75 +根据taskID计算doing 延迟的任务进度 >> 1,,normal,80 +根据taskID计算doing 未延迟的任务进度 >> ,,normal,80 +根据taskID计算done 延迟的任务进度 >> ,,normal,100 +根据taskID计算算done 未延迟的任务进度 >> ,,normal,100 */ @@ -91,5 +91,4 @@ r($task->processTaskTest($task2)) && p('delay,needConfirm,productType,progress') r($task->processTaskTest($task3)) && p('delay,needConfirm,productType,progress') && e('1,,normal,80'); //根据taskID计算doing 延迟的任务进度 r($task->processTaskTest($task4)) && p('delay,needConfirm,productType,progress') && e(',,normal,80'); //根据taskID计算doing 未延迟的任务进度 r($task->processTaskTest($task5)) && p('delay,needConfirm,productType,progress') && e(',,normal,100'); //根据taskID计算done 延迟的任务进度 -r($task->processTaskTest($task6)) && p('delay,needConfirm,productType,progress') && e(',,normal,100'); //根据taskID计算算done 未延迟的任务进度 - +r($task->processTaskTest($task6)) && p('delay,needConfirm,productType,progress') && e(',,normal,100'); //根据taskID计算算done 未延迟的任务进度 \ No newline at end of file diff --git a/test/model/task/processtasks.php b/test/model/task/processtasks.php index eadf4e9e55..cf0bfbca15 100755 --- a/test/model/task/processtasks.php +++ b/test/model/task/processtasks.php @@ -10,14 +10,14 @@ title=taskModel->processTasks(); cid=1 pid=1 -根据tasks计算executionID为1的执行下所有任务的进度 任务1 >> ,100 +根据tasks计算executionID为1的执行下所有任务的进度 任务1 >> ,100 根据tasks计算executionID为1的执行下所有任务的进度 任务601 >> 7,100 根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> 8,80 -根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> ,71 -根据tasks计算executionID为2的执行下所有任务的进度 任务2 >> ,80 -根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> 10,67 -根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> ,64 -根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> ,62 +根据tasks计算executionID为1的执行下所有任务的进度 任务603 >> ,71 +根据tasks计算executionID为2的执行下所有任务的进度 任务2 >> ,80 +根据tasks计算executionID为2的执行下所有任务的进度 任务604 >> 10,67 +根据tasks计算executionID为2的执行下所有任务的进度 任务605 >> ,64 +根据tasks计算executionID为2的执行下所有任务的进度 任务606 >> ,62 */ @@ -31,4 +31,4 @@ r($task->processTasksTest($executionID['0'])) && p('603:delay,progress') && e(', r($task->processTasksTest($executionID['1'])) && p('2:delay,progress') && e(',80'); //根据tasks计算executionID为2的执行下所有任务的进度 任务2 r($task->processTasksTest($executionID['1'])) && p('604:delay,progress') && e('10,67'); //根据tasks计算executionID为2的执行下所有任务的进度 任务604 r($task->processTasksTest($executionID['1'])) && p('605:delay,progress') && e(',64'); //根据tasks计算executionID为2的执行下所有任务的进度 任务605 -r($task->processTasksTest($executionID['1'])) && p('606:delay,progress') && e(',62'); //根据tasks计算executionID为2的执行下所有任务的进度 任务606 +r($task->processTasksTest($executionID['1'])) && p('606:delay,progress') && e(',62'); //根据tasks计算executionID为2的执行下所有任务的进度 任务606 \ No newline at end of file diff --git a/test/model/task/recordestimate.php b/test/model/task/recordestimate.php index 98e9e5e17f..96a1bb5117 100755 --- a/test/model/task/recordestimate.php +++ b/test/model/task/recordestimate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -25,4 +26,4 @@ $create = array('consumed' => $consumed, 'left' => $left, 'work' => $work); $task = new taskTest('admin'); r($task->recordEstimateTest($taskIDList[0],$create)) && p('2:field,old,new') && e('status,wait,doing'); // 正常记录工时 r($task->recordEstimateTest($taskIDList[1],$create)) && p('2:field,old,new') && e('status,pause,doing'); // pause任务记录工时 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/start.php b/test/model/task/start.php index e333cdfffe..531988deda 100755 --- a/test/model/task/start.php +++ b/test/model/task/start.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($task->startTest($taskIDList[0],$waitstart)) && p('0:field,old,new') && e('s r($task->startTest($taskIDList[0],$waitstart)) && p() && e('此任务已被启动,不能重复启动!'); // doing状态任务开始 r($task->startTest($taskIDList[1],$pausestart)) && p('0:field,old,new') && e('status,pause,doing'); // pause状态任务开始 r($task->startTest($taskIDList[2],$closedstart)) && p('0:field,old,new') && e('status,closed,doing'); // closed状态任务开始 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/update.php b/test/model/task/update.php index 8d9f3fb2c8..d78ecbbd62 100755 --- a/test/model/task/update.php +++ b/test/model/task/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -51,4 +52,4 @@ r($task->updateObject($taskIDList[6], $changeexecution)) && p('0:field,old,new' r($task->updateObject($taskIDList[8], $changedeadline)) && p('0:field,new') && e("deadline,2022-03-29"); // 测试修改任务截止时间 r($task->updateObject($taskIDList[0], $ckclosedReason)) && p('closedReason:0') && e(' 『关闭原因』必须为空。'); // 测试修改任务关闭原因 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/updateestimate.php b/test/model/task/updateestimate.php index b7c66a382d..bdb8a9e781 100755 --- a/test/model/task/updateestimate.php +++ b/test/model/task/updateestimate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($task->updateEstimateTest($estimateID, $updateDate)) && p('0:field,old,new r($task->updateEstimateTest($estimateID, $updateConsumed)) && p('0:field,old,new') && e('consumed,1,5'); // 根据estimateID查看预计工时 r($task->updateEstimateTest($estimateID, $updateLeft)) && p('0:field,old,new') && e('consumed,5,1'); // 根据estimateID查看预计工时 r($task->updateEstimateTest($estimateID, $noLeft)) && p('1:field,old,new') && e('status,doing,done'); // 根据estimateID查看预计工时 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/task/updateparentstatus.php b/test/model/task/updateparentstatus.php index 8adf00e110..ba8378784e 100755 --- a/test/model/task/updateparentstatus.php +++ b/test/model/task/updateparentstatus.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,15 +11,15 @@ title=taskModel->updateParentStatus(); cid=1 pid=1 -更新任务ID为1 创建动态的任务的父任务 >> 1 -更新任务ID为601 创建动态的任务的父任务 >> 1 -更新任务ID为601 父ID为601 创建动态的任务的父任务 >> doing,更多任务1 -更新任务ID为901 创建动态的任务的父任务 >> wait,子任务1 -更新任务ID为901 父ID为601 创建动态的任务的父任务 >> wait,子任务1 -更新任务ID为901 父ID为601 不创建动态的任务的父任务 >> wait,子任务1 -更新任务ID为901 父ID为902 创建动态的任务的父任务 >> 1 +更新任务ID为1 创建动态的任务的父任务 >> 1 +更新任务ID为601 创建动态的任务的父任务 >> 1 +更新任务ID为601 父ID为601 创建动态的任务的父任务 >> doing,更多任务1 +更新任务ID为901 创建动态的任务的父任务 >> wait,子任务1 +更新任务ID为901 父ID为601 创建动态的任务的父任务 >> wait,子任务1 +更新任务ID为901 父ID为601 不创建动态的任务的父任务 >> wait,子任务1 +更新任务ID为901 父ID为902 创建动态的任务的父任务 >> 1 更新任务ID为不存在的100001 父ID为601 创建动态的任务的父任务 >> 0 -更新任务ID为不存在的100001 父ID为601 不创建动态的任务的父任 >> 0 +更新任务ID为不存在的100001 父ID为601 不创建动态的任务的父任务 >> 0 更新任务ID为不存在的100001 父ID为902 创建动态的任务的父任务 >> 1 */ @@ -26,7 +27,6 @@ pid=1 $taskIDList = array('1', '601', '901', '100001'); $parentIDList = array('601', '902'); - $task = new taskTest(); r($task->updateParentStatusTest($taskIDList[0])) && p('status,name') && e('1'); //更新任务ID为1 创建动态的任务的父任务 r($task->updateParentStatusTest($taskIDList[1])) && p('status,name') && e('1'); //更新任务ID为601 创建动态的任务的父任务 @@ -38,4 +38,4 @@ r($task->updateParentStatusTest($taskIDList[2], $parentIDList[1])) && p(' r($task->updateParentStatusTest($taskIDList[3], $parentIDList[0])) && p('status,name') && e('0'); //更新任务ID为不存在的100001 父ID为601 创建动态的任务的父任务 r($task->updateParentStatusTest($taskIDList[3], $parentIDList[0], false)) && p('status,name') && e('0'); //更新任务ID为不存在的100001 父ID为601 不创建动态的任务的父任务 r($task->updateParentStatusTest($taskIDList[3], $parentIDList[1])) && p('status,name') && e('1'); //更新任务ID为不存在的100001 父ID为902 创建动态的任务的父任务 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchcasetypechange.php b/test/model/testcase/batchcasetypechange.php index 600cab7e28..fe7686574e 100755 --- a/test/model/testcase/batchcasetypechange.php +++ b/test/model/testcase/batchcasetypechange.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -31,4 +32,4 @@ r($testcase->batchCaseTypeChangeTest($caseIDList[3], $typeList[3])) && p('7:type r($testcase->batchCaseTypeChangeTest($caseIDList[4], $typeList[4])) && p('9:type;10:type') && e('security;security'); // 测试批量修改case 9 10 type为 security r($testcase->batchCaseTypeChangeTest($caseIDList[5], $typeList[5])) && p('11:type;12:type') && e('interface;interface'); // 测试批量修改case 11 12 type为 interface r($testcase->batchCaseTypeChangeTest($caseIDList[6], $typeList[6])) && p('13:type;14:type;15:type') && e('other;other;other'); // 测试批量修改case 13 14 15 type为 other -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchchangebranch.php b/test/model/testcase/batchchangebranch.php index 84ebcb6ce1..a9f019c52b 100755 --- a/test/model/testcase/batchchangebranch.php +++ b/test/model/testcase/batchchangebranch.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($testcase->batchChangeBranchTest($caseIDList[3], $branchList[3])) && p('167:br r($testcase->batchChangeBranchTest($caseIDList[4], $branchList[4])) && p('169:branch;170:branch') && e('5;5'); // 测试批量修改case 169 170 的branch为5 r($testcase->batchChangeBranchTest($caseIDList[5], $branchList[5])) && p('171:branch;172:branch') && e('6;6'); // 测试批量修改case 171 172 的branch为6 r($testcase->batchChangeBranchTest($caseIDList[6], $branchList[6])) && p('173:branch;174:branch') && e('7;7'); // 测试批量修改case 173 174 的branch为7 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchchangemodule.php b/test/model/testcase/batchchangemodule.php index d0c3ceff68..9ffbb6c58b 100755 --- a/test/model/testcase/batchchangemodule.php +++ b/test/model/testcase/batchchangemodule.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -31,4 +32,4 @@ r($testcase->batchChangeModuleTest($caseIDList[3], $moduleList[3])) && p('167:mo r($testcase->batchChangeModuleTest($caseIDList[4], $moduleList[4])) && p('169:module;170:module') && e('169;169'); // 测试批量修改case 169 170 的module为169 r($testcase->batchChangeModuleTest($caseIDList[5], $moduleList[5])) && p('171:module;172:module') && e('171;171'); // 测试批量修改case 171 172 的module为171 r($testcase->batchChangeModuleTest($caseIDList[6], $moduleList[6])) && p('173:module;174:module') && e('173;173'); // 测试批量修改case 173 174 的module为173 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchcreate.php b/test/model/testcase/batchcreate.php index 8fec5d990a..3547e7c787 100755 --- a/test/model/testcase/batchcreate.php +++ b/test/model/testcase/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($testcase->batchCreateTest(array('pri' => $pri, 'title' => $title3))) r($testcase->batchCreateTest(array('stage' => $stage, 'title' => $title4))) && p() && e('3'); // 测试批量创建用例4 r($testcase->batchCreateTest(array('needReview' => $needReview, 'title' => $title5))) && p() && e('3'); // 测试批量创建用例5 r($testcase->batchCreateTest(array('title' => $title1))) && p() && e('0'); // 测试重复批量创建用例1 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchreview.php b/test/model/testcase/batchreview.php index 6972c3a9cb..73ae48077b 100755 --- a/test/model/testcase/batchreview.php +++ b/test/model/testcase/batchreview.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($testcase->batchReviewTest($caseIDList[1], $resultList[1])) && p() && e(' r($testcase->batchReviewTest($caseIDList[2], $resultList[1])) && p('405') && e('106'); // 测试评审case 405 406 为pass r($testcase->batchReviewTest($caseIDList[3], $resultList[1])) && p() && e('0'); // 测试评审case 407 408 为pass r($testcase->batchReviewTest($caseIDList[4], $resultList[1])) && p('409') && e('107'); // 测试评审case 409 410 为pass -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/batchupdate.php b/test/model/testcase/batchupdate.php index de0dc481cd..bf02bc6c15 100755 --- a/test/model/testcase/batchupdate.php +++ b/test/model/testcase/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -53,4 +54,4 @@ r($testcase->batchUpdateTest(2, $changeTypes)) && p('field,old,new') && e r($testcase->batchUpdateTest(3, $changePrecondition)) && p('field,old,new') && e('precondition,这是前置条件3,修改后的前置条件3'); // 测试批量修改用例前置条件 r($testcase->batchUpdateTest(4, $changeKeywords)) && p('field,old,new') && e('keywords,这是关键词4,修改后的关键词4'); // 测试批量修改用例关键词 r($testcase->batchUpdateTest(1, $changeStages)) && p('field,old,new') && e('stage,unittest,unittest,feature'); // 测试批量修改用例阶段 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/create.php b/test/model/testcase/create.php index 22fbbb6f7f..6b7328c65d 100755 --- a/test/model/testcase/create.php +++ b/test/model/testcase/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -34,4 +35,4 @@ r($testcase->createTest($testcase3)) && p('status') && e('created'); r($testcase->createTest($testcase1)) && p('status') && e('exists'); // 测试创建重名用例1 r($testcase->createTest($no_title)) && p() && e('『用例标题』不能为空。'); // 测试创建没有填写名字的用例 r($testcase->createTest($no_type)) && p() && e('『用例类型』不能为空。'); // 测试创建没有填写类型的用例 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/createfromimport.php b/test/model/testcase/createfromimport.php index 538f743058..ff84c99923 100755 --- a/test/model/testcase/createfromimport.php +++ b/test/model/testcase/createfromimport.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -26,4 +27,4 @@ $testcase = new testcaseTest(); r($testcase->createFromImportTest($productID)) && p() && e('这个是测试用例1,这个是测试用例2,导入测试用例1,导入测试用例2'); // 测试直接导入数据 r($testcase->createFromImportTest($productID, $param1)) && p() && e('导入覆盖的用例1,导入覆盖的用例2,导入测试用例1,导入测试用例2'); // 测试导入数据覆盖原有数据 r($testcase->createFromImportTest($productID, $param2)) && p() && e('导入覆盖的用例1,导入覆盖的用例2,导入测试用例1,导入测试用例2,导入插入的用例1,导入插入的用例2'); // 测试导入数据不覆盖原有数据 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/importfromlib.php b/test/model/testcase/importfromlib.php index 931597fcc7..67070fb1a5 100755 --- a/test/model/testcase/importfromlib.php +++ b/test/model/testcase/importfromlib.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -28,4 +29,4 @@ r($testcase->importFromLibTest($productID, $caseIdList[1])) && p('0:title;1:titl r($testcase->importFromLibTest($productID, $caseIdList[2])) && p('0:title;1:title') && e('用例库用例5;用例库用例6'); // 测试导入用例库用例 405 406 r($testcase->importFromLibTest($productID, $caseIdList[3])) && p('0:title;1:title') && e('用例库用例7;用例库用例8'); // 测试导入用例库用例 407 408 r($testcase->importFromLibTest($productID, $caseIdList[4])) && p('0:title;1:title') && e('用例库用例9;用例库用例10'); // 测试导入用例库用例 409 410 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/review.php b/test/model/testcase/review.php index e5d73edec7..3509cce411 100755 --- a/test/model/testcase/review.php +++ b/test/model/testcase/review.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -52,4 +53,4 @@ r($testcase->reviewTest($caseIDList[1], $case2)) && p('0:field,old,new') && e('r r($testcase->reviewTest($caseIDList[2], $case3)) && p('0:field,old,new') && e('status,wait,normal'); // 测试评审用例 3 r($testcase->reviewTest($caseIDList[3], $case4)) && p('0:field,old,new') && e('reviewedBy,admin,test4'); // 测试评审用例 4 r($testcase->reviewTest($caseIDList[4], $case5)) && p('0:field,old,new') && e('status,wait,normal'); // 测试评审用例 5 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/synccase2project.php b/test/model/testcase/synccase2project.php index 0b0868a733..d93c38b546 100755 --- a/test/model/testcase/synccase2project.php +++ b/test/model/testcase/synccase2project.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($testcase->syncCase2ProjectTest($caseIDList[1])) && p() && e('2'); // 测试 r($testcase->syncCase2ProjectTest($caseIDList[2])) && p() && e('2'); // 测试同步用例 3 到关联项目中 r($testcase->syncCase2ProjectTest($caseIDList[3])) && p() && e('2'); // 测试同步用例 4 到关联项目中 r($testcase->syncCase2ProjectTest($caseIDList[4])) && p() && e('2'); // 测试同步用例 5 到关联项目中 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/update.php b/test/model/testcase/update.php index 683c8c6eaa..44668b1c7e 100755 --- a/test/model/testcase/update.php +++ b/test/model/testcase/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -30,4 +31,4 @@ r($testcase->updateTest($changeTitle)) && p('0:field,old,new') && e('没 r($testcase->updateTest($changePrecondition)) && p('0:field,old,new') && e('precondition,这是前置条件1,修改后的前置条件'); // 测试修改前置条件 r($testcase->updateTest($changeStatus)) && p('0:field,old,new') && e('status,wait,normal'); // 测试修改状态 r($testcase->updateTest($changePri)) && p('0:field,old,new') && e('pri,1,3'); // 测试修改优先级 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testcase/updatecase2project.php b/test/model/testcase/updatecase2project.php index 533fcbc21b..f8f847b7f2 100755 --- a/test/model/testcase/updatecase2project.php +++ b/test/model/testcase/updatecase2project.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -39,4 +40,4 @@ r($testcase->updateCase2ProjectTest($caseIDList[3], $objectTypeList[0], $objectI r($testcase->updateCase2ProjectTest($caseIDList[3], $objectTypeList[1], $objectIDList[3])) && p('0:project,product,case;1:project,product,case;2:project,product,case') && e('102,1,7;11,2,7;101,2,7'); // 测试修改用例 7 需求 r($testcase->updateCase2ProjectTest($caseIDList[4], $objectTypeList[0], $objectIDList[1])) && p('0:project,product,case') && e('103,1,9'); // 测试修改用例 9 产品 r($testcase->updateCase2ProjectTest($caseIDList[4], $objectTypeList[1], $objectIDList[3])) && p('0:project,product,case;1:project,product,case;2:project,product,case') && e('103,1,9;11,3,9;101,3,9'); // 测试修改用例 9 需求 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testreport/create.php b/test/model/testreport/create.php index 7ae5705303..e246f55395 100755 --- a/test/model/testreport/create.php +++ b/test/model/testreport/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($testreport->createTest($noOwner)) && p('owner:0') && e('『负责人』 r($testreport->createTest($noTitle)) && p('title:0') && e('『标题』不能为空。'); //标题为空测试 r($testreport->createTest($noMembers)) && p('id') && e('12'); //参与人员测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testreport/update.php b/test/model/testreport/update.php index ac8eafeacd..382d9bfe43 100755 --- a/test/model/testreport/update.php +++ b/test/model/testreport/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($testreport->updateTest($reportID, $noOwner)) && p('owner:0') && r($testreport->updateTest($reportID, $noMembers)) && p('id,title,members') && e('1,参与人员为空测试,'); //参与人员为空测试 r($testreport->updateTest($reportID, $noTitle)) && p('title:0') && e('『标题』不能为空。'); //标题为空测试 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testsuite/create.php b/test/model/testsuite/create.php index 707e7f9a46..8054e2555b 100755 --- a/test/model/testsuite/create.php +++ b/test/model/testsuite/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -42,4 +43,4 @@ r($testsuite->createTest($productID[1], $name[0], $type[1])) && p() && e('206'); r($testsuite->createTest($productID[1], $name[1], $type[1])) && p('name:0') && e('『名称』不能为空。'); //测试productID为0,name为空,type为public r($testsuite->createTest($productID[1], $name[0], $type[2])) && p() && e('207'); //测试productID为0,name正常存在,type为空 r($testsuite->createTest($productID[1], $name[1], $type[2])) && p('name:0') && e('『名称』不能为空。'); //测试productID为0,name为空,type为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testsuite/delete.php b/test/model/testsuite/delete.php index b07e584faa..f77e9e064d 100755 --- a/test/model/testsuite/delete.php +++ b/test/model/testsuite/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -22,4 +23,4 @@ $testsuite = new testsuiteTest(); r($testsuite->deleteTest($suiteID[0])) && p() && e('1'); //测试suiteID值为1 r($testsuite->deleteTest($suiteID[1])) && p() && e('1'); //测试suiteID值为1000 r($testsuite->deleteTest($suiteID[2])) && p() && e('1'); //测试suiteID值为0 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testsuite/linkcase.php b/test/model/testsuite/linkcase.php index 26c88e47bb..01d813b14e 100755 --- a/test/model/testsuite/linkcase.php +++ b/test/model/testsuite/linkcase.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($testsuite->linkCaseTest($suiteID[1], $cases[2])) && p('0:suite,case;1:suite,c r($testsuite->linkCaseTest($suiteID[2], $cases[0])) && p() && e('0'); //测试不存在的suiteID值为0,cases值为空 r($testsuite->linkCaseTest($suiteID[2], $cases[1])) && p('0:suite,case') && e('0,1'); //测试不存在的suiteID值为0,cases值为一个 r($testsuite->linkCaseTest($suiteID[2], $cases[2])) && p('0:suite,case;1:suite,case') && e('0,2;0,3'); //测试不存在的suiteID值为0,cases值为多个 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testsuite/update.php b/test/model/testsuite/update.php index f6f01d4798..94a414113a 100755 --- a/test/model/testsuite/update.php +++ b/test/model/testsuite/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -42,4 +43,4 @@ r($testsuite->updateTest($productID[1], $name[0], $type[1])) && p() r($testsuite->updateTest($productID[1], $name[1], $type[1])) && p('name:0') && e('『名称』不能为空。'); //测试productID为0,name为空,type为public r($testsuite->updateTest($productID[1], $name[0], $type[2])) && p() && e('0'); //测试productID为0,name正常存在,type为空 r($testsuite->updateTest($productID[1], $name[1], $type[2])) && p('name:0') && e('『名称』不能为空。'); //测试productID为0,name为空,type为空 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testtask/activate.php b/test/model/testtask/activate.php old mode 100644 new mode 100755 index b0dd7a65d7..ad952285f8 --- a/test/model/testtask/activate.php +++ b/test/model/testtask/activate.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->activate(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/batchrun.php b/test/model/testtask/batchrun.php old mode 100644 new mode 100755 index e6432d9995..2620a470a1 --- a/test/model/testtask/batchrun.php +++ b/test/model/testtask/batchrun.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->batchRun(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/block.php b/test/model/testtask/block.php old mode 100644 new mode 100755 index 9389ae2600..c7cc376332 --- a/test/model/testtask/block.php +++ b/test/model/testtask/block.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->block(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/close.php b/test/model/testtask/close.php old mode 100644 new mode 100755 index 6118e0e800..f96f7bf0ba --- a/test/model/testtask/close.php +++ b/test/model/testtask/close.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->close(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/create.php b/test/model/testtask/create.php old mode 100644 new mode 100755 index 580fe3c374..c99df0cb9c --- a/test/model/testtask/create.php +++ b/test/model/testtask/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,10 @@ title=测试 testtaskModel->create(); cid=1 pid=1 +新增一个正常的测试单 >> 11,新增测试报告,200,1,system +新增一个名称为空的测试单 >> 『名称』不能为空。 +新增一个结束日期小于开始日期的测试单 >> 『结束日期』应当不小于『2022-10-05』。 + */ $testtask = new testtaskTest(); @@ -36,4 +41,4 @@ r($testtask->create(11, $normalTask)) && p('id,name,execution,product,type') r($testtask->create(12, $emptyNameTask)) && p('name:0') && e('『名称』不能为空。'); // 新增一个名称为空的测试单 r($testtask->create(13, $beginGtEndTask)) && p('end:0') && e('『结束日期』应当不小于『2022-10-05』。'); // 新增一个结束日期小于开始日期的测试单 -system('./ztest init'); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/testtask/createresult.php b/test/model/testtask/createresult.php old mode 100644 new mode 100755 index 86b7d104d2..973336a88d --- a/test/model/testtask/createresult.php +++ b/test/model/testtask/createresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->createResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/getalllinkablecases.php b/test/model/testtask/getalllinkablecases.php old mode 100644 new mode 100755 index d497fe4d0f..8db2b47ae6 --- a/test/model/testtask/getalllinkablecases.php +++ b/test/model/testtask/getalllinkablecases.php @@ -9,6 +9,11 @@ title=测试 testtaskModel->getAllLinkableCases(); cid=1 pid=1 +获取可关联到测试单1的用例列表,每页10条,查看数量 >> 10 +获取可关联到测试单2的用例列表,查看数量 >> 307 +获取可关联到测试单2的用例列表,传入已关联的用例ID,查看数量 >> 305 +获取可关联到测试单2的用例列表,传入sql语句,查看数量 >> 74 + */ global $tester; @@ -27,4 +32,4 @@ $cases4 = $tester->testtask->getAllLinkableCases($task2, 'id < 100', '410,408', r(count($cases1)) && p() && e('10'); // 获取可关联到测试单1的用例列表,每页10条,查看数量 r(count($cases2)) && p() && e('307'); // 获取可关联到测试单2的用例列表,查看数量 r(count($cases3)) && p() && e('305'); // 获取可关联到测试单2的用例列表,传入已关联的用例ID,查看数量 -r(count($cases4)) && p() && e('74'); // 获取可关联到测试单2的用例列表,传入sql语句,查看数量 +r(count($cases4)) && p() && e('74'); // 获取可关联到测试单2的用例列表,传入sql语句,查看数量 \ No newline at end of file diff --git a/test/model/testtask/getbuginfo.php b/test/model/testtask/getbuginfo.php old mode 100644 new mode 100755 index 59e2335d35..6515f7c91b --- a/test/model/testtask/getbuginfo.php +++ b/test/model/testtask/getbuginfo.php @@ -10,6 +10,13 @@ title=测试 testtaskModel->getBugInfo(); cid=1 pid=1 +查看根据测试单的ID获取到的数据数量 >> 8 +查看根据测试单的ID获取到的数据数量 >> 1,1 +查看根据测试单的ID获取到的数据数量 >> 激活,1 +查看根据测试单的ID获取到的数据数量 >> 8 +查看根据测试单的ID获取到的数据数量 >> 2,1 +查看根据测试单的ID获取到的数据数量 >> admin,1 + */ global $tester; @@ -24,4 +31,4 @@ r($task1['bugStatusGroups']) && p('active:name,value') && e('激活,1'); // r(count($task2)) && p() && e('8'); // 查看根据测试单的ID获取到的数据数量 r($task2['bugSeverityGroups']) && p('2:name,value') && e('2,1'); // 查看根据测试单的ID获取到的数据数量 -r($task2['bugOpenedByGroups']) && p('admin:name,value') && e('admin,1'); // 查看根据测试单的ID获取到的数据数量 +r($task2['bugOpenedByGroups']) && p('admin:name,value') && e('admin,1'); // 查看根据测试单的ID获取到的数据数量 \ No newline at end of file diff --git a/test/model/testtask/getbyid.php b/test/model/testtask/getbyid.php old mode 100644 new mode 100755 index 83b0917ed6..9e1d5a4e19 --- a/test/model/testtask/getbyid.php +++ b/test/model/testtask/getbyid.php @@ -9,6 +9,11 @@ title=测试 testtaskModel->getById(); cid=1 pid=1 +获取ID为0的测试单,返回空 >> 0 +获取ID为1的测试单的详细信息 >> 测试单1,执行版本版本11,这是测试单描述1,2022-04-08,2022-04-15 +获取ID为2的测试单的详细信息 >> 测试单2,执行版本版本12,这是测试单描述2,2022-04-08,2022-04-15 +获取ID为3的测试单的详细信息 >> 测试单3,执行版本版本13,这是测试单描述3,2022-04-08,2022-04-15 + */ global $tester; @@ -17,4 +22,4 @@ $tester->loadModel('testtask'); r($tester->testtask->getById(0)) && p('') && e('0'); // 获取ID为0的测试单,返回空 r($tester->testtask->getById(1)) && p('name,buildName,desc,begin,end') && e('测试单1,执行版本版本11,这是测试单描述1,2022-04-08,2022-04-15'); // 获取ID为1的测试单的详细信息 r($tester->testtask->getById(2)) && p('name,buildName,desc,begin,end') && e('测试单2,执行版本版本12,这是测试单描述2,2022-04-08,2022-04-15'); // 获取ID为2的测试单的详细信息 -r($tester->testtask->getById(3)) && p('name,buildName,desc,begin,end') && e('测试单3,执行版本版本13,这是测试单描述3,2022-04-08,2022-04-15'); // 获取ID为3的测试单的详细信息 +r($tester->testtask->getById(3)) && p('name,buildName,desc,begin,end') && e('测试单3,执行版本版本13,这是测试单描述3,2022-04-08,2022-04-15'); // 获取ID为3的测试单的详细信息 \ No newline at end of file diff --git a/test/model/testtask/getbylist.php b/test/model/testtask/getbylist.php old mode 100644 new mode 100755 index 415921da8c..2854ca1d3e --- a/test/model/testtask/getbylist.php +++ b/test/model/testtask/getbylist.php @@ -9,6 +9,9 @@ title=测试 testtaskModel->getByList(); cid=1 pid=1 +查看按照ID列表获取的测试单的数量 >> 5 +查看按照ID列表获取的测试单的详情 >> 测试单1,,wait,2022-04-08,2022-04-15 + */ global $tester; @@ -17,4 +20,4 @@ $tester->loadModel('testtask'); $taskIdList = array(1, 2, 3, 4, 5); r(count($tester->testtask->getByList($taskIdList))) && p() && e('5'); // 查看按照ID列表获取的测试单的数量 -r($tester->testtask->getByList($taskIdList)) && p('1:name,type,status,begin,end') && e('测试单1,,wait,2022-04-08,2022-04-15'); // 查看按照ID列表获取的测试单的详情 +r($tester->testtask->getByList($taskIdList)) && p('1:name,type,status,begin,end') && e('测试单1,,wait,2022-04-08,2022-04-15'); // 查看按照ID列表获取的测试单的详情 \ No newline at end of file diff --git a/test/model/testtask/getbyuser.php b/test/model/testtask/getbyuser.php old mode 100644 new mode 100755 index 79f1eb22c6..cb63a3d10b --- a/test/model/testtask/getbyuser.php +++ b/test/model/testtask/getbyuser.php @@ -9,6 +9,15 @@ title=测试 testtaskModel->getByUser(); cid=1 pid=1 +获取用户user3的测试单数量 >> 1 +获取用户user4的测试单数量 >> 1 +获取用户user5的测试单数量 >> 1 +获取用户user6的测试单数量 >> 1 +获取用户user3的测试单详细信息 >> 测试单1,,wait,2022-04-08,2022-04-15 +获取用户user4的测试单详细信息 >> 测试单2,,doing,2022-04-08,2022-04-15 +获取用户user5的测试单详细信息 >> 测试单3,,done,2022-04-08,2022-04-15 +获取用户user6的测试单详细信息 >> 测试单4,,blocked,2022-04-08,2022-04-15 + */ global $tester; @@ -21,4 +30,4 @@ r(count($tester->testtask->getByUser('user6'))) && p() r($tester->testtask->getByUser('user3')) && p('0:name,type,status,begin,end') && e('测试单1,,wait,2022-04-08,2022-04-15'); // 获取用户user3的测试单详细信息 r($tester->testtask->getByUser('user4')) && p('0:name,type,status,begin,end') && e('测试单2,,doing,2022-04-08,2022-04-15'); // 获取用户user4的测试单详细信息 r($tester->testtask->getByUser('user5')) && p('0:name,type,status,begin,end') && e('测试单3,,done,2022-04-08,2022-04-15'); // 获取用户user5的测试单详细信息 -r($tester->testtask->getByUser('user6')) && p('0:name,type,status,begin,end') && e('测试单4,,blocked,2022-04-08,2022-04-15'); // 获取用户user6的测试单详细信息 +r($tester->testtask->getByUser('user6')) && p('0:name,type,status,begin,end') && e('测试单4,,blocked,2022-04-08,2022-04-15'); // 获取用户user6的测试单详细信息 \ No newline at end of file diff --git a/test/model/testtask/getdataoftesttaskpermodule.php b/test/model/testtask/getdataoftesttaskpermodule.php old mode 100644 new mode 100755 index 0afd473dc8..12c06bbaf2 --- a/test/model/testtask/getdataoftesttaskpermodule.php +++ b/test/model/testtask/getdataoftesttaskpermodule.php @@ -10,6 +10,10 @@ title=测试 testtaskModel->getDataOfTestTaskPerModule(); cid=1 pid=1 +获取测试单0的模块分组 >> 0 +获取测试单1模块分组,查看各个模块的数量 >> /,4 +获取测试单2模块分组,查看各个模块的数量 >> /,4 + */ global $tester; @@ -21,4 +25,4 @@ $result2 = $tester->testtask->getDataOfTestTaskPerModule(2); r($result0) && p() && e('0'); // 获取测试单0的模块分组 r($result1[0]) && p('name,value') && e('/,4'); // 获取测试单1模块分组,查看各个模块的数量 -r($result2[0]) && p('name,value') && e('/,4'); // 获取测试单2模块分组,查看各个模块的数量 +r($result2[0]) && p('name,value') && e('/,4'); // 获取测试单2模块分组,查看各个模块的数量 \ No newline at end of file diff --git a/test/model/testtask/getdataoftesttaskperrunner.php b/test/model/testtask/getdataoftesttaskperrunner.php old mode 100644 new mode 100755 index afb2a9484c..919eb3d702 --- a/test/model/testtask/getdataoftesttaskperrunner.php +++ b/test/model/testtask/getdataoftesttaskperrunner.php @@ -10,6 +10,10 @@ title=测试 testtaskModel->getDataOfTestTaskPerRunner(); cid=1 pid=1 +获取测试单0的执行人分组 >> 0 +获取测试单1执行人分组,查看各个执行人的执行数量 >> 未执行,4 +获取测试单2执行人分组,查看各个执行人的执行数量 >> 未执行,4 + */ global $tester; @@ -21,4 +25,4 @@ $result2 = $tester->testtask->getDataOfTestTaskPerRunner(2); r($result0) && p() && e('0'); // 获取测试单0的执行人分组 r(current($result1)) && p('name,value') && e('未执行,4'); // 获取测试单1执行人分组,查看各个执行人的执行数量 -r(current($result2)) && p('name,value') && e('未执行,4'); // 获取测试单2执行人分组,查看各个执行人的执行数量 +r(current($result2)) && p('name,value') && e('未执行,4'); // 获取测试单2执行人分组,查看各个执行人的执行数量 \ No newline at end of file diff --git a/test/model/testtask/getdataoftesttaskperrunresult.php b/test/model/testtask/getdataoftesttaskperrunresult.php old mode 100644 new mode 100755 index f950c7a5a2..0e8279d672 --- a/test/model/testtask/getdataoftesttaskperrunresult.php +++ b/test/model/testtask/getdataoftesttaskperrunresult.php @@ -9,6 +9,12 @@ title=测试 testtaskModel->getDataOfTestTaskPerRunResult(); cid=1 pid=1 +获取测试单0的执行结果 >> 0 +获取测试单1的成功执行结果 >> 2 +获取测试单1的失败执行结果 >> 2 +获取测试单2的成功执行结果 >> 2 +获取测试单2的失败执行结果 >> 2 + */ global $tester; @@ -22,4 +28,4 @@ r($result0) && p() && e('0'); // 获取测试单0的执行结果 r($result1) && p('pass:value') && e('2'); // 获取测试单1的成功执行结果 r($result1) && p('fail:value') && e('2'); // 获取测试单1的失败执行结果 r($result2) && p('pass:value') && e('2'); // 获取测试单2的成功执行结果 -r($result2) && p('fail:value') && e('2'); // 获取测试单2的失败执行结果 +r($result2) && p('fail:value') && e('2'); // 获取测试单2的失败执行结果 \ No newline at end of file diff --git a/test/model/testtask/getdataoftesttaskpertype.php b/test/model/testtask/getdataoftesttaskpertype.php old mode 100644 new mode 100755 index d2f5e37216..a1d37ebdf2 --- a/test/model/testtask/getdataoftesttaskpertype.php +++ b/test/model/testtask/getdataoftesttaskpertype.php @@ -10,6 +10,16 @@ title=测试 testtaskModel->getDataOfTestTaskPerType(); cid=1 pid=1 +获取测试单0的类型分组 >> 0 +获取测试单1的config类型数量 >> 1 +获取测试单1的feature类型数量 >> 1 +获取测试单1的install类型数量 >> 1 +获取测试单1的performance类型数量 >> 1 +获取测试单2的other类型数量 >> 1 +获取测试单2的security类型数量 >> 1 +获取测试单2的feature类型数量 >> 1 +获取测试单2的interface类型数量 >> 1 + */ global $tester; @@ -27,4 +37,4 @@ r($result1) && p('performance:value') && e('1'); // 获取测试单1的performan r($result2) && p('other:value') && e('1'); // 获取测试单2的other类型数量 r($result2) && p('security:value') && e('1'); // 获取测试单2的security类型数量 r($result2) && p('feature:value') && e('1'); // 获取测试单2的feature类型数量 -r($result2) && p('interface:value') && e('1'); // 获取测试单2的interface类型数量 +r($result2) && p('interface:value') && e('1'); // 获取测试单2的interface类型数量 \ No newline at end of file diff --git a/test/model/testtask/getexecutiontasks.php b/test/model/testtask/getexecutiontasks.php old mode 100644 new mode 100755 index c695907ba7..28de2da4c4 --- a/test/model/testtask/getexecutiontasks.php +++ b/test/model/testtask/getexecutiontasks.php @@ -9,6 +9,12 @@ title=测试 testtaskModel->getExecutionTasks(); cid=1 pid=1 +查看迭代101下的所有测试单数量 >> 1 +查看迭代110下的所有测试单数量 >> 1 +查看迭代120下的所有测试单数量 >> 0 +查看迭代101下的测试单1的详细信息 >> 测试单1,,wait,2022-04-08,2022-04-15 +查看迭代110下的所有测试单10的详细信息 >> 测试单10,,doing,2022-04-08,2022-04-15 + */ global $tester; @@ -22,4 +28,4 @@ r(count($execution101Tasks)) && p() && e('1'); r(count($execution110Tasks)) && p() && e('1'); // 查看迭代110下的所有测试单数量 r(count($execution120Tasks)) && p() && e('0'); // 查看迭代120下的所有测试单数量 r($execution101Tasks) && p('1:name,type,status,begin,end') && e('测试单1,,wait,2022-04-08,2022-04-15'); // 查看迭代101下的测试单1的详细信息 -r($execution110Tasks) && p('10:name,type,status,begin,end') && e('测试单10,,doing,2022-04-08,2022-04-15'); // 查看迭代110下的所有测试单10的详细信息 +r($execution110Tasks) && p('10:name,type,status,begin,end') && e('测试单10,,doing,2022-04-08,2022-04-15'); // 查看迭代110下的所有测试单10的详细信息 \ No newline at end of file diff --git a/test/model/testtask/getlinkablecasesbybug.php b/test/model/testtask/getlinkablecasesbybug.php old mode 100644 new mode 100755 index 621150268a..925c18a618 --- a/test/model/testtask/getlinkablecasesbybug.php +++ b/test/model/testtask/getlinkablecasesbybug.php @@ -10,6 +10,9 @@ title=测试 testtaskModel->getLinkableCasesByBug(); cid=1 pid=1 +通过测试单1关联的版本下的Bug,获取可关联到测试单1的用例数量 >> 0 +通过测试单2关联的版本下的Bug,获取可关联到测试单2的用例数量 >> 0 + */ global $tester; @@ -24,4 +27,4 @@ $cases1 = $tester->testtask->getLinkableCasesByBug(1, $task1, '1 = 1', '', $page $cases2 = $tester->testtask->getLinkableCasesByBug(2, $task2, '1 = 1', '', $pager); r(count($cases1)) && p() && e('0'); // 通过测试单1关联的版本下的Bug,获取可关联到测试单1的用例数量 -r(count($cases2)) && p() && e('0'); // 通过测试单2关联的版本下的Bug,获取可关联到测试单2的用例数量 +r(count($cases2)) && p() && e('0'); // 通过测试单2关联的版本下的Bug,获取可关联到测试单2的用例数量 \ No newline at end of file diff --git a/test/model/testtask/getlinkablecasesbystory.php b/test/model/testtask/getlinkablecasesbystory.php old mode 100644 new mode 100755 index 6ff58fcffb..6df215c5c7 --- a/test/model/testtask/getlinkablecasesbystory.php +++ b/test/model/testtask/getlinkablecasesbystory.php @@ -9,6 +9,9 @@ title=测试 testtaskModel->getLinkableCasesByStory(); cid=1 pid=1 +通过测试单1关联的版本下的需求,获取可关联到测试单1的用例数量 >> 0 +通过测试单2关联的版本下的需求,获取可关联到测试单2的用例数量 >> 0 + */ global $tester; @@ -23,4 +26,4 @@ $cases1 = $tester->testtask->getLinkableCasesByStory(1, $task1, '1 = 1', '', $pa $cases2 = $tester->testtask->getLinkableCasesByStory(2, $task2, '1 = 1', '', $pager); r(count($cases1)) && p() && e('0'); // 通过测试单1关联的版本下的需求,获取可关联到测试单1的用例数量 -r(count($cases2)) && p() && e('0'); // 通过测试单2关联的版本下的需求,获取可关联到测试单2的用例数量 +r(count($cases2)) && p() && e('0'); // 通过测试单2关联的版本下的需求,获取可关联到测试单2的用例数量 \ No newline at end of file diff --git a/test/model/testtask/getlinkablecasesbysuite.php b/test/model/testtask/getlinkablecasesbysuite.php old mode 100644 new mode 100755 index 7090ae1767..f57012bee6 --- a/test/model/testtask/getlinkablecasesbysuite.php +++ b/test/model/testtask/getlinkablecasesbysuite.php @@ -10,6 +10,11 @@ title=测试 testtaskModel->getLinkableCasesBySuite(); cid=1 pid=1 +根据测试套件1获取测试单1可关联的用例数量 >> 1 +根据测试套件2获取测试单2可关联的用例数量 >> 1 +根据测试套件1获取测试单1可关联的用例详情 >> 2,这个是测试用例2,normal,performance +根据测试套件2获取测试单2可关联的用例详情 >> 6,这个是测试用例6,normal,interface + */ global $tester; @@ -26,4 +31,4 @@ $cases2 = $tester->testtask->getLinkableCasesBySuite(2, $task2, '1 = 1', 3, '', r(count($cases1)) && p() && e('1'); // 根据测试套件1获取测试单1可关联的用例数量 r(count($cases2)) && p() && e('1'); // 根据测试套件2获取测试单2可关联的用例数量 r($cases1) && p('0:id,title,status,type') && e('2,这个是测试用例2,normal,performance'); // 根据测试套件1获取测试单1可关联的用例详情 -r($cases2) && p('0:id,title,status,type') && e('6,这个是测试用例6,normal,interface'); // 根据测试套件2获取测试单2可关联的用例详情 +r($cases2) && p('0:id,title,status,type') && e('6,这个是测试用例6,normal,interface'); // 根据测试套件2获取测试单2可关联的用例详情 \ No newline at end of file diff --git a/test/model/testtask/getlinkablecasesbytesttask.php b/test/model/testtask/getlinkablecasesbytesttask.php old mode 100644 new mode 100755 index 00b35fb497..a338795373 --- a/test/model/testtask/getlinkablecasesbytesttask.php +++ b/test/model/testtask/getlinkablecasesbytesttask.php @@ -10,6 +10,13 @@ title=测试 testtaskModel->getLinkableCasesByTestTask(); cid=1 pid=1 +直接获取测试单1可关联的用例数量,排除掉ID为2的用例,查看数量 >> 2 +直接获取测试单2可关联的用例数量,查看数量 >> 3 +直接获取测试单3可关联的用例数量,查看数量 >> 3 +直接获取测试单1可关联的用例数量,排除掉ID为2的用例,查看获取到的第一个用例的详情 >> 3,这个是测试用例3,config,intergrate +直接获取测试单2可关联的用例数量,查看获取到的第一个用例的详情 >> 6,这个是测试用例6,interface,bvt +直接获取测试单3可关联的用例数量,查看获取到的第一个用例的详情 >> 10,这个是测试用例10,config,system + */ global $tester; @@ -29,4 +36,4 @@ r(count($cases2)) && p() && e('3'); // 直接获取测试 r(count($cases3)) && p() && e('3'); // 直接获取测试单3可关联的用例数量,查看数量 r($cases1) && p('0:id,title,type,stage') && e('3,这个是测试用例3,config,intergrate'); // 直接获取测试单1可关联的用例数量,排除掉ID为2的用例,查看获取到的第一个用例的详情 r($cases2) && p('0:id,title,type,stage') && e('6,这个是测试用例6,interface,bvt'); // 直接获取测试单2可关联的用例数量,查看获取到的第一个用例的详情 -r($cases3) && p('0:id,title,type,stage') && e('10,这个是测试用例10,config,system'); // 直接获取测试单3可关联的用例数量,查看获取到的第一个用例的详情 +r($cases3) && p('0:id,title,type,stage') && e('10,这个是测试用例10,config,system'); // 直接获取测试单3可关联的用例数量,查看获取到的第一个用例的详情 \ No newline at end of file diff --git a/test/model/testtask/getpairs.php b/test/model/testtask/getpairs.php old mode 100644 new mode 100755 index c4cfb4428c..60cbc156e0 --- a/test/model/testtask/getpairs.php +++ b/test/model/testtask/getpairs.php @@ -9,6 +9,8 @@ title=测试 testtaskModel->getPairs(); cid=1 pid=1 + + */ global $tester; @@ -25,4 +27,4 @@ r(count($taskPairs2)) && p() && e(''); // 获取产品1下的测试单的数量 r(count($taskPairs3)) && p() && e(''); // 获取产品1下的测试单的数量 r($taskPairs1) && p() && e(''); // 获取产品1下的测试单的数量 r($taskPairs2) && p() && e(''); // 获取产品1下的测试单的数量 -r($taskPairs3) && p() && e(''); // 获取产品1下的测试单的数量 +r($taskPairs3) && p() && e(''); // 获取产品1下的测试单的数量 \ No newline at end of file diff --git a/test/model/testtask/getproducttasks.php b/test/model/testtask/getproducttasks.php old mode 100644 new mode 100755 index 59008cfa3a..d0e5400f9d --- a/test/model/testtask/getproducttasks.php +++ b/test/model/testtask/getproducttasks.php @@ -9,6 +9,12 @@ title=测试 testtaskModel->getProductTasks(); cid=1 pid=1 +查看产品1下的测试单的数量 >> 2 +查看系统中所有测试单的数量 >> 11 +查看系统中所有截止日期大于2023-01-01的测试单的数量 >> 0 +查看ID为11的测试单的详细信息 >> 新增测试报告,system,2022-03-05,2022-09-05 +查看ID为3的测试单的详细信息 >> 测试单3,,2022-04-08,2022-04-15 + */ global $tester; @@ -25,4 +31,4 @@ r(count($tasks1)) && p() && e('2'); r(count($tasks2)) && p() && e('11'); // 查看系统中所有测试单的数量 r(count($tasks3)) && p() && e('0'); // 查看系统中所有截止日期大于2023-01-01的测试单的数量 r($tasks1) && p('11:name,type,begin,end') && e('新增测试报告,system,2022-03-05,2022-09-05'); // 查看ID为11的测试单的详细信息 -r($tasks2) && p('3:name,type,begin,end') && e('测试单3,,2022-04-08,2022-04-15'); // 查看ID为3的测试单的详细信息 +r($tasks2) && p('3:name,type,begin,end') && e('测试单3,,2022-04-08,2022-04-15'); // 查看ID为3的测试单的详细信息 \ No newline at end of file diff --git a/test/model/testtask/getproductunittasks.php b/test/model/testtask/getproductunittasks.php old mode 100644 new mode 100755 index 004a85bb86..0a9c7faf39 --- a/test/model/testtask/getproductunittasks.php +++ b/test/model/testtask/getproductunittasks.php @@ -9,6 +9,8 @@ title=测试 testtaskModel->getProductUnitTasks(); cid=1 pid=1 + + */ global $tester; @@ -16,4 +18,4 @@ $tester->loadModel('testtask'); $tasks = $tester->testtask->getProductUnitTasks(1, 'all'); -r($testtask->getProductUnitTasksTest()) && p() && e(); +r($testtask->getProductUnitTasksTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/testtask/getprojecttasks.php b/test/model/testtask/getprojecttasks.php old mode 100644 new mode 100755 index f712177ff5..336b8a8023 --- a/test/model/testtask/getprojecttasks.php +++ b/test/model/testtask/getprojecttasks.php @@ -9,6 +9,12 @@ title=测试 testtaskModel->getProjectTasks(); cid=1 pid=1 +查看项目11下的所有测试单数量 >> 1 +查看项目20下的所有测试单数量 >> 1 +查看项目100下的所有测试单数量 >> 0 +查看项目11下的测试单1的详细信息 >> 测试单1,,wait,2022-04-08,2022-04-15 +查看项目20下的所有测试单10的详细信息 >> 测试单10,,doing,2022-04-08,2022-04-15 + */ global $tester; @@ -22,4 +28,4 @@ r(count($project11Tasks)) && p() && e('1'); r(count($project20Tasks)) && p() && e('1'); // 查看项目20下的所有测试单数量 r(count($project100Tasks)) && p() && e('0'); // 查看项目100下的所有测试单数量 r($project11Tasks) && p('1:name,type,status,begin,end') && e('测试单1,,wait,2022-04-08,2022-04-15'); // 查看项目11下的测试单1的详细信息 -r($project20Tasks) && p('10:name,type,status,begin,end') && e('测试单10,,doing,2022-04-08,2022-04-15'); // 查看项目20下的所有测试单10的详细信息 +r($project20Tasks) && p('10:name,type,status,begin,end') && e('测试单10,,doing,2022-04-08,2022-04-15'); // 查看项目20下的所有测试单10的详细信息 \ No newline at end of file diff --git a/test/model/testtask/getrelatedtesttasks.php b/test/model/testtask/getrelatedtesttasks.php old mode 100644 new mode 100755 index 171a23b1f4..3fc4d38ff4 --- a/test/model/testtask/getrelatedtesttasks.php +++ b/test/model/testtask/getrelatedtesttasks.php @@ -9,6 +9,12 @@ title=测试 testtaskModel->getRelatedTestTasks(); cid=1 pid=1 +查看产品1下相关的测试单,排除掉测试单1,查看数量 >> 0 +查看产品1下相关的测试单,不排除任何测试单,查看数量 >> 1 +查看产品2下相关的测试单,不排除任何测试单,查看数量 >> 1 +查看产品2下相关的测试单,不排除任何测试单,查看数量 >> 测试单1 +查看产品2下相关的测试单,不排除任何测试单,查看数量 >> 测试单2 + */ global $tester; @@ -22,4 +28,4 @@ r(count($tasks1)) && p() && e('0'); //查看产品1下相关的测试 r(count($tasks2)) && p() && e('1'); //查看产品1下相关的测试单,不排除任何测试单,查看数量 r(count($tasks3)) && p() && e('1'); //查看产品2下相关的测试单,不排除任何测试单,查看数量 r($tasks2) && p('1') && e('测试单1'); //查看产品2下相关的测试单,不排除任何测试单,查看数量 -r($tasks3) && p('2') && e('测试单2'); //查看产品2下相关的测试单,不排除任何测试单,查看数量 +r($tasks3) && p('2') && e('测试单2'); //查看产品2下相关的测试单,不排除任何测试单,查看数量 \ No newline at end of file diff --git a/test/model/testtask/getresults.php b/test/model/testtask/getresults.php old mode 100644 new mode 100755 index c94bb37b9d..6e8b997a72 --- a/test/model/testtask/getresults.php +++ b/test/model/testtask/getresults.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getResults(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/getrunbyid.php b/test/model/testtask/getrunbyid.php old mode 100644 new mode 100755 index 8c0a618b55..7457f18d7f --- a/test/model/testtask/getrunbyid.php +++ b/test/model/testtask/getrunbyid.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getRunById(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/getruns.php b/test/model/testtask/getruns.php old mode 100644 new mode 100755 index fd2c2f5ebc..7dcda32d1c --- a/test/model/testtask/getruns.php +++ b/test/model/testtask/getruns.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getRuns(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/gettaskcases.php b/test/model/testtask/gettaskcases.php old mode 100644 new mode 100755 index 5bfc555b8c..f46582d7f6 --- a/test/model/testtask/gettaskcases.php +++ b/test/model/testtask/gettaskcases.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getTaskCases(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/gettoandcclist.php b/test/model/testtask/gettoandcclist.php old mode 100644 new mode 100755 index 83f0d44ce5..30111c27fd --- a/test/model/testtask/gettoandcclist.php +++ b/test/model/testtask/gettoandcclist.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getToAndCcList(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/getuserruns.php b/test/model/testtask/getuserruns.php old mode 100644 new mode 100755 index fa13907f6e..2deb388486 --- a/test/model/testtask/getuserruns.php +++ b/test/model/testtask/getuserruns.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getUserRuns(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/getusertesttaskpairs.php b/test/model/testtask/getusertesttaskpairs.php old mode 100644 new mode 100755 index 0eba1ec5f3..8fe8beaf65 --- a/test/model/testtask/getusertesttaskpairs.php +++ b/test/model/testtask/getusertesttaskpairs.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->getUserTestTaskPairs(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/importunitresult.php b/test/model/testtask/importunitresult.php old mode 100644 new mode 100755 index 1bdf1f153c..37d7d69983 --- a/test/model/testtask/importunitresult.php +++ b/test/model/testtask/importunitresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->importUnitResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/linkcase.php b/test/model/testtask/linkcase.php old mode 100644 new mode 100755 index 945753da2c..79c298791e --- a/test/model/testtask/linkcase.php +++ b/test/model/testtask/linkcase.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->linkCase(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/mergechartoption.php b/test/model/testtask/mergechartoption.php old mode 100644 new mode 100755 index ac81f6b450..6fac07a38c --- a/test/model/testtask/mergechartoption.php +++ b/test/model/testtask/mergechartoption.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->mergeChartOption(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/parsecppxmlresult.php b/test/model/testtask/parsecppxmlresult.php old mode 100644 new mode 100755 index 32f93a51bb..979544d1c9 --- a/test/model/testtask/parsecppxmlresult.php +++ b/test/model/testtask/parsecppxmlresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->parseCppXMLResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/parsexmlresult.php b/test/model/testtask/parsexmlresult.php old mode 100644 new mode 100755 index 152284d716..aac5187722 --- a/test/model/testtask/parsexmlresult.php +++ b/test/model/testtask/parsexmlresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->parseXMLResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/parseztffuncresult.php b/test/model/testtask/parseztffuncresult.php old mode 100644 new mode 100755 index 4b342e240d..026aa37303 --- a/test/model/testtask/parseztffuncresult.php +++ b/test/model/testtask/parseztffuncresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->parseZTFFuncResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/parseztfunitresult.php b/test/model/testtask/parseztfunitresult.php old mode 100644 new mode 100755 index 7b46b6ea48..9fdefc061d --- a/test/model/testtask/parseztfunitresult.php +++ b/test/model/testtask/parseztfunitresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->parseZTFUnitResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/printcell.php b/test/model/testtask/printcell.php old mode 100644 new mode 100755 index 8cebbe25cd..69400ed21b --- a/test/model/testtask/printcell.php +++ b/test/model/testtask/printcell.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->printCell(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/processautoresult.php b/test/model/testtask/processautoresult.php old mode 100644 new mode 100755 index b0e87cc8e2..ae0ac34fac --- a/test/model/testtask/processautoresult.php +++ b/test/model/testtask/processautoresult.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->processAutoResult(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/start.php b/test/model/testtask/start.php old mode 100644 new mode 100755 index 7f4173178c..4d92cdfbb0 --- a/test/model/testtask/start.php +++ b/test/model/testtask/start.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->start(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/testtask/update.php b/test/model/testtask/update.php old mode 100644 new mode 100755 index 089ba79348..5b3b8f359b --- a/test/model/testtask/update.php +++ b/test/model/testtask/update.php @@ -10,6 +10,8 @@ title=测试 testtaskModel->update(); cid=1 pid=1 + + */ $testtask = new testtaskTest(); diff --git a/test/model/todo/activate.php b/test/model/todo/activate.php index bdf2c70a19..d355d6470e 100755 --- a/test/model/todo/activate.php +++ b/test/model/todo/activate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,10 @@ title=测试 todoModel->activate(); cid=1 pid=1 -激活一个状态为wait的todo >> wait +激活一个状态为wait的todo >> wait 激活一个状态为doing的todo >> wait -激活一个状态为done的todo >> wait +激活一个状态为done的todo >> wait + */ $todoIDList = array('1', '2', '3'); @@ -22,4 +24,4 @@ $todo = new todoTest(); r($todo->activateTest($todoIDList[0])) && p('status') && e('wait'); // 激活一个状态为wait的todo r($todo->activateTest($todoIDList[1])) && p('status') && e('wait'); // 激活一个状态为doing的todo r($todo->activateTest($todoIDList[2])) && p('status') && e('wait'); // 激活一个状态为done的todo -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/assignto.php b/test/model/todo/assignto.php index 019e3ac838..52576ec2b3 100755 --- a/test/model/todo/assignto.php +++ b/test/model/todo/assignto.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -38,4 +39,4 @@ $todo = new todoTest(); r($todo->assignToTest($todoIDList[0], $todo1)) && p('assignedTo,date,begin,end') && e('test1,20300101,1000,1400'); // 指派todo 1给test1 r($todo->assignToTest($todoIDList[1], $todo2)) && p('assignedTo,begin,end') && e('test1,2400,2400'); // 指派todo 2给test1 r($todo->assignToTest($todoIDList[2], $todo3)) && p('assignedTo,begin,end') && e('test1,1002,1402'); // 指派todo 3给test1 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/batchcreate.php b/test/model/todo/batchcreate.php index 8934619fb1..06ffc578f9 100755 --- a/test/model/todo/batchcreate.php +++ b/test/model/todo/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,7 +12,7 @@ cid=1 pid=1 批量创建有个没有名字的待办 >> 批量创建待办1,desc1,1,custom,0;批量创建待办2,desc2,2,custom,0;批量创建待办3,desc4,4,custom,0 -批量创建的待办 >> 测试单转Bug13,desc1,1,bug,313;用户需求版本一61,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1 +批量创建的待办 >> 测试单转Bug13,desc1,1,bug,313;用户需求版本一61,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1 */ @@ -38,4 +39,4 @@ $todo = new todoTest(); r($todo->batchCreateTest($noname_create)) && p('2006:name,desc,pri,type,idvalue;2007:name,desc,pri,type,idvalue;2008:name,desc,pri,type,idvalue') && e('批量创建待办1,desc1,1,custom,0;批量创建待办2,desc2,2,custom,0;批量创建待办3,desc4,4,custom,0'); // 批量创建有个没有名字的待办 r($todo->batchCreateTest($except_create)) && p('2009:name,desc,pri,type,idvalue;2010:name,desc,pri,type,idvalue;2011:name,desc,pri,type,idvalue;2012:name,desc,pri,type,idvalue') && e('测试单转Bug13,desc1,1,bug,313;用户需求版本一61,desc2,2,story,1;开发任务11,desc3,3,task,1;测试单1,desc4,4,testtask,1'); // 批量创建的待办 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/batchupdate.php b/test/model/todo/batchupdate.php index f0827a0bcb..3c8c5434e4 100755 --- a/test/model/todo/batchupdate.php +++ b/test/model/todo/batchupdate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试 todoModel->batchUpdate(); cid=1 pid=1 -批量修改todo类型 >> type,task,custom +批量修改todo类型 >> type,task,custom 批量修改todo优先级 >> pri,2,1 -批量修改todo状态 >> status,wait,doing +批量修改todo状态 >> status,wait,doing */ @@ -31,4 +32,4 @@ $todo = new todoTest(); r($todo->batchUpdateTest($changeType, '3')) && p('0:field,old,new') && e('type,task,custom'); // 批量修改todo类型 r($todo->batchUpdateTest($changePri, '2')) && p('0:field,old,new') && e('pri,2,1'); // 批量修改todo优先级 r($todo->batchUpdateTest($changeStatus, '1')) && p('0:field,old,new') && e('status,wait,doing'); // 批量修改todo状态 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/close.php b/test/model/todo/close.php index 6fa2f73d80..4759559089 100755 --- a/test/model/todo/close.php +++ b/test/model/todo/close.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试 todoModel->close(); cid=1 pid=1 -关闭一个状态为wait的todo >> closed +关闭一个状态为wait的todo >> closed 关闭一个状态为doing的todo >> closed -关闭一个状态为done的todo >> closed +关闭一个状态为done的todo >> closed */ @@ -23,4 +24,4 @@ $todo = new todoTest(); r($todo->closeTest($todoIDList[0])) && p('status') && e('closed'); // 关闭一个状态为wait的todo r($todo->closeTest($todoIDList[1])) && p('status') && e('closed'); // 关闭一个状态为doing的todo r($todo->closeTest($todoIDList[2])) && p('status') && e('closed'); // 关闭一个状态为done的todo -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/create.php b/test/model/todo/create.php index afb87877ce..5c4df651dc 100755 --- a/test/model/todo/create.php +++ b/test/model/todo/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -11,10 +12,10 @@ cid=1 pid=1 创建没有名字的待办 >> 『待办名称』不能为空。 -创建自定义待办 >> 时间待定的月周期待办,custom,wait -创建bug待办 >> 测试单转Bug13,bug,doing -创建task待办 >> 开发任务11,task,done -创建story待办 >> 用户需求1,story,closed +创建自定义待办 >> 时间待定的月周期待办,custom,wait +创建bug待办 >> 测试单转Bug13,bug,doing +创建task待办 >> 开发任务11,task,done +创建story待办 >> 用户需求1,story,closed */ @@ -62,4 +63,4 @@ r($todo->createTest($accountList[1], $todo1)) && p('name,type,status') && e(' r($todo->createTest($accountList[2], $todo2)) && p('name,type,status') && e('测试单转Bug13,bug,doing'); //创建bug待办 r($todo->createTest($accountList[0], $todo3)) && p('name,type,status') && e('开发任务11,task,done'); //创建task待办 r($todo->createTest($accountList[0], $todo4)) && p('name,type,status') && e('用户需求1,story,closed'); //创建story待办 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/createbycycle.php b/test/model/todo/createbycycle.php index 959f65f5d6..baf4459054 100755 --- a/test/model/todo/createbycycle.php +++ b/test/model/todo/createbycycle.php @@ -11,6 +11,7 @@ title=测试 todoModel->createByCycle(); cid=1 pid=1 + >> + days 测试创建周期日待办 >> 11 测试创建周期周待办 >> 9 测试创建周期月待办 >> `%d` @@ -37,4 +38,4 @@ $todo = new todoTest(); r($todo->createByCycleTest($todo1)) && p() && e('11'); // 测试创建周期日待办 r($todo->createByCycleTest($todo2)) && p() && e('9'); // 测试创建周期周待办 r($todo->createByCycleTest($todo3)) && p() && e('`%d`'); // 测试创建周期月待办 -$db->restoreDB(); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/finish.php b/test/model/todo/finish.php index d68cb798da..98f8421eab 100755 --- a/test/model/todo/finish.php +++ b/test/model/todo/finish.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试 todoModel->finish(); cid=1 pid=1 -结束一个状态为wait的todo >> done +结束一个状态为wait的todo >> done 结束一个状态为doing的todo >> done -结束一个状态为done的todo >> done +结束一个状态为done的todo >> done */ @@ -23,4 +24,4 @@ $todo = new todoTest(); r($todo->finishTest($todoIDList[0])) && p('status') && e('done'); // 结束一个状态为wait的todo r($todo->finishTest($todoIDList[1])) && p('status') && e('done'); // 结束一个状态为doing的todo r($todo->finishTest($todoIDList[2])) && p('status') && e('done'); // 结束一个状态为done的todo -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/getbyid.php b/test/model/todo/getbyid.php index edba4adc28..309866ecc8 100755 --- a/test/model/todo/getbyid.php +++ b/test/model/todo/getbyid.php @@ -10,10 +10,10 @@ title=测试 todoModel->getById(); cid=1 pid=1 -获取id为1的todo信息 >> 自定义1的待办,custom,wait -获取id为2的todo信息 >> BUG1,bug,doing -获取id为3的todo信息 >> 开发任务12,task,done -获取id为4的todo信息 >> 用户需求3,story,closed +获取id为1的todo信息 >> 自定义1的待办,custom,wait +获取id为2的todo信息 >> BUG1,bug,doing +获取id为3的todo信息 >> 开发任务12,task,done +获取id为4的todo信息 >> 用户需求3,story,closed 获取id不存在的todo信息 >> 0 */ @@ -26,4 +26,4 @@ r($todo->getByIdTest($todoIDList[0])) && p('name,type,status') && e('自定义1 r($todo->getByIdTest($todoIDList[1])) && p('name,type,status') && e('BUG1,bug,doing'); // 获取id为2的todo信息 r($todo->getByIdTest($todoIDList[2])) && p('name,type,status') && e('开发任务12,task,done'); // 获取id为3的todo信息 r($todo->getByIdTest($todoIDList[3])) && p('name,type,status') && e('用户需求3,story,closed'); // 获取id为4的todo信息 -r($todo->getByIdTest($todoIDList[4])) && p('name,type,status') && e('0'); // 获取id不存在的todo信息 +r($todo->getByIdTest($todoIDList[4])) && p('name,type,status') && e('0'); // 获取id不存在的todo信息 \ No newline at end of file diff --git a/test/model/todo/getbylist.php b/test/model/todo/getbylist.php index 286dcb5cfb..019c2fd6bd 100755 --- a/test/model/todo/getbylist.php +++ b/test/model/todo/getbylist.php @@ -10,8 +10,8 @@ title=测试 todoModel->getByList(); cid=1 pid=1 -获取todo 1 2 3 4的名称 >> 自定义1的待办,BUG2的待办,任务3的待办,需求4的待办 -获取todo 5 6 7 8的名称 >> 测试单5的待办,自定义6的待办,BUG7的待办,任务8的待办 +获取todo 1 2 3 4的名称 >> 自定义1的待办,BUG2的待办,任务3的待办,需求4的待办 +获取todo 5 6 7 8的名称 >> 测试单5的待办,自定义6的待办,BUG7的待办,任务8的待办 获取todo 9 10 11 12的名称 >> 需求9的待办,测试单10的待办,自定义11的待办,BUG12的待办 */ @@ -24,4 +24,4 @@ $todo = new todoTest(); r($todo->getByListTest($todoIDList1)) && p() && e('自定义1的待办,BUG2的待办,任务3的待办,需求4的待办'); // 获取todo 1 2 3 4的名称 r($todo->getByListTest($todoIDList2)) && p() && e('测试单5的待办,自定义6的待办,BUG7的待办,任务8的待办'); // 获取todo 5 6 7 8的名称 -r($todo->getByListTest($todoIDList3)) && p() && e('需求9的待办,测试单10的待办,自定义11的待办,BUG12的待办'); // 获取todo 9 10 11 12的名称 +r($todo->getByListTest($todoIDList3)) && p() && e('需求9的待办,测试单10的待办,自定义11的待办,BUG12的待办'); // 获取todo 9 10 11 12的名称 \ No newline at end of file diff --git a/test/model/todo/getcount.php b/test/model/todo/getcount.php index 2e16529e06..118fb7356d 100755 --- a/test/model/todo/getcount.php +++ b/test/model/todo/getcount.php @@ -10,10 +10,10 @@ title=测试 todoModel->getCount(); cid=1 pid=1 -获取用户admin的所有待办个数 >> 2 -获取用户user1的所有待办个数 >> 2 -获取用户user2的所有待办个数 >> 2 -获取用户user3的所有待办个数 >> 2 +获取用户admin的所有待办个数 >> 2 +获取用户user1的所有待办个数 >> 2 +获取用户user2的所有待办个数 >> 2 +获取用户user3的所有待办个数 >> 2 获取不存在的用户所有待办个数 >> 0 */ @@ -26,4 +26,4 @@ r($todo->getCountTest($accountList[0])) && p() && e('2'); // 获取用户admin r($todo->getCountTest($accountList[1])) && p() && e('2'); // 获取用户user1的所有待办个数 r($todo->getCountTest($accountList[2])) && p() && e('2'); // 获取用户user2的所有待办个数 r($todo->getCountTest($accountList[3])) && p() && e('2'); // 获取用户user3的所有待办个数 -r($todo->getCountTest($accountList[4])) && p() && e('0'); // 获取不存在的用户所有待办个数 +r($todo->getCountTest($accountList[4])) && p() && e('0'); // 获取不存在的用户所有待办个数 \ No newline at end of file diff --git a/test/model/todo/getlist.php b/test/model/todo/getlist.php index 4886f1ac42..6dcb869170 100755 --- a/test/model/todo/getlist.php +++ b/test/model/todo/getlist.php @@ -10,28 +10,28 @@ title=测试 todoModel->getList(); cid=1 pid=1 -获取type为today 当前用户的代办数量 >> 0 -获取type为yesterday 当前用户的代办数量 >> 0 -获取type为thisweek 当前用户的代办数量 >> 0 -获取type为lastweek 当前用户的代办数量 >> 1 -获取type为thismonth 当前用户的代办数量 >> 1 -获取type为lastmonth 当前用户的代办数量 >> 1 +获取type为today 当前用户的代办数量 >> 0 +获取type为yesterday 当前用户的代办数量 >> 0 +获取type为thisweek 当前用户的代办数量 >> 0 +获取type为lastweek 当前用户的代办数量 >> 1 +获取type为thismonth 当前用户的代办数量 >> 1 +获取type为lastmonth 当前用户的代办数量 >> 1 获取type为thisseason 当前用户的代办数量 >> 2 -获取type为thisyear 当前用户的代办数量 >> 2 -获取type为future 当前用户的代办数量 >> 0 -获取type为before 当前用户的代办数量 >> 2 -获取type为cycle 当前用户的代办数量 >> 1 -获取type为today user1的代办数量 >> 0 -获取type为yesterday user1的代办数量 >> 0 -获取type为thisweek user1的代办数量 >> 0 -获取type为lastweek user1的代办数量 >> 1 -获取type为thismonth user1的代办数量 >> 1 -获取type为lastmonth user1的代办数量 >> 1 -获取type为thisseason user1的代办数量 >> 2 -获取type为thisyear user1的代办数量 >> 2 -获取type为future user1的代办数量 >> 0 -获取type为before user1的代办数量 >> 2 -获取type为cycle user1的代办数量 >> 1 +获取type为thisyear 当前用户的代办数量 >> 2 +获取type为future 当前用户的代办数量 >> 0 +获取type为before 当前用户的代办数量 >> 2 +获取type为cycle 当前用户的代办数量 >> 1 +获取type为today user1的代办数量 >> 0 +获取type为yesterday user1的代办数量 >> 0 +获取type为thisweek user1的代办数量 >> 0 +获取type为lastweek user1的代办数量 >> 1 +获取type为thismonth user1的代办数量 >> 1 +获取type为lastmonth user1的代办数量 >> 1 +获取type为thisseason user1的代办数量 >> 2 +获取type为thisyear user1的代办数量 >> 2 +获取type为future user1的代办数量 >> 0 +获取type为before user1的代办数量 >> 2 +获取type为cycle user1的代办数量 >> 1 */ @@ -61,4 +61,4 @@ r($todo->getListTest($typeList[6], $account)) && p() && e('2'); // 获取type r($todo->getListTest($typeList[7], $account)) && p() && e('2'); // 获取type为thisyear user1的代办数量 r($todo->getListTest($typeList[8], $account)) && p() && e('0'); // 获取type为future user1的代办数量 r($todo->getListTest($typeList[9], $account)) && p() && e('2'); // 获取type为before user1的代办数量 -r($todo->getListTest($typeList[10], $account)) && p() && e('1'); // 获取type为cycle user1的代办数量 +r($todo->getListTest($typeList[10], $account)) && p() && e('1'); // 获取type为cycle user1的代办数量 \ No newline at end of file diff --git a/test/model/todo/start.php b/test/model/todo/start.php index e87837b801..6f96e4f704 100755 --- a/test/model/todo/start.php +++ b/test/model/todo/start.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,9 @@ title=测试 todoModel->start(); cid=1 pid=1 -开始一个状态为wait的todo >> doing +开始一个状态为wait的todo >> doing 开始一个状态为doing的todo >> doing -开始一个状态为done的todo >> doing +开始一个状态为done的todo >> doing */ @@ -23,4 +24,4 @@ $todo = new todoTest(); r($todo->startTest($todoIDList[0])) && p('status') && e('doing'); // 开始一个状态为wait的todo r($todo->startTest($todoIDList[1])) && p('status') && e('doing'); // 开始一个状态为doing的todo r($todo->startTest($todoIDList[2])) && p('status') && e('doing'); // 开始一个状态为done的todo -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/todo/update.php b/test/model/todo/update.php index 8695409916..336722a5c9 100755 --- a/test/model/todo/update.php +++ b/test/model/todo/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,8 +11,8 @@ title=测试 todoModel->update(); cid=1 pid=1 -测试更新todo名称 >> name,自定义1的待办,john -测试更新todo类型 >> type,custom,bug +测试更新todo名称 >> name,自定义1的待办,john +测试更新todo类型 >> type,custom,bug 测试更新todo名称和类型 >> type,bug,custom;name,BUG2的待办,jack 测试不更新todo任何数据 >> 没有数据更新 @@ -24,11 +25,10 @@ $t_uptype = array('type' => 'bug', 'idvalue' => '1'); $t_typename = array('name' => 'jack', 'type' => 'custom'); $t_unname = array('name' => 'john'); - $todo = new todoTest(); r($todo->updateTest($todoIDList[0], $t_upname)) && p('0:field,old,new') && e('name,自定义1的待办,john'); // 测试更新todo名称 r($todo->updateTest($todoIDList[0], $t_uptype)) && p('0:field,old,new') && e('type,custom,bug'); // 测试更新todo类型 r($todo->updateTest($todoIDList[1], $t_typename)) && p('0:field,old,new;1:field,old,new') && e('type,bug,custom;name,BUG2的待办,jack'); // 测试更新todo名称和类型 r($todo->updateTest($todoIDList[0], $t_unname)) && p() && e('没有数据更新'); // 测试不更新todo任何数据 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/changeroot.php b/test/model/tree/changeroot.php index 0e44707ca9..91da483bc1 100755 --- a/test/model/tree/changeroot.php +++ b/test/model/tree/changeroot.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -42,4 +43,4 @@ r($tree->changeRootTest($moduleID[8], $root[4], $root[5], $type[1])) && p('id,r r($tree->changeRootTest($moduleID[9], $root[4], $root[5], $type[1])) && p('id,root') && e('0'); // 测试修改module 22 的root从 101 修改为 102 r($tree->changeRootTest($moduleID[10], $root[5], $root[4], $type[1])) && p('id,root') && e('0'); // 测试修改module 24 的root从 102 修改为 101 r($tree->changeRootTest($moduleID[11], $root[5], $root[4], $type[1])) && p('id,root') && e('0'); // 测试修改module 25 的root从 102 修改为 101 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/delete.php b/test/model/tree/delete.php index 97ae33c36a..08c6ca1af1 100755 --- a/test/model/tree/delete.php +++ b/test/model/tree/delete.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($tree->deleteTest($moduleID[5])) && p('deleted') && e('1'); // 测试删除mod r($tree->deleteTest($moduleID[6])) && p('deleted') && e('1'); // 测试删除module 21 r($tree->deleteTest($moduleID[7])) && p('deleted') && e('1'); // 测试删除module 22 ob_end_flush(); -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/fixmodulepath.php b/test/model/tree/fixmodulepath.php index 187d095a11..7e976637bd 100755 --- a/test/model/tree/fixmodulepath.php +++ b/test/model/tree/fixmodulepath.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -35,4 +36,4 @@ r($tree->fixModulePathTest($root[5], $type[0])) && p('1989:path;2705:path;2905:p r($tree->fixModulePathTest($root[6], $type[1])) && p('21:path;22:path;3021:path') && e(',21,;,22,;,21,3021,'); // 修复root为 101 的module path r($tree->fixModulePathTest($root[7], $type[1])) && p('24:path;25:path;3022:path') && e(',24,;,25,;,23,3022'); // 修复root为 102 的module path r($tree->fixModulePathTest($root[8], $type[1])) && p('27:path;28:path;3023:path') && e(',27,;,28,;,25,3023'); // 修复root为 103 的module path -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/managechild.php b/test/model/tree/managechild.php index 577c94d4bc..b935eea57b 100755 --- a/test/model/tree/managechild.php +++ b/test/model/tree/managechild.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -47,4 +48,4 @@ r($tree->manageChildTest($root[0], $type, $tree1)) && p() && e(',修改名称的 r($tree->manageChildTest($root[0], $type, $tree2)) && p() && e(',新建产品子模块3,新建产品子模块4'); // 测试管理module 2621 的子模块 r($tree->manageChildTest($root[1], $type, $tree3)) && p() && e(',修改名称的产品子模块81,产品子模块82,新建产品子模块5,新建产品子模块6'); // 测试管理module 1981 的子模块 r($tree->manageChildTest($root[1], $type, $tree4)) && p() && e(',新建产品子模块7,新建产品子模块8'); // 测试管理module 1982 的子模块 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/update.php b/test/model/tree/update.php index 14b8c1c35a..063e92df7a 100755 --- a/test/model/tree/update.php +++ b/test/model/tree/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -32,4 +33,4 @@ r($tree->updateTest($moduleID[0], $changeParent)) && p('root,branch,parent,name, r($tree->updateTest($moduleID[0], $changeName)) && p('root,branch,parent,name,short') && e('2,0,1822,修改后的模块名,模块简称1'); // 测试更新module 1821 的 root r($tree->updateTest($moduleID[0], $changeShort)) && p('root,branch,parent,name,short') && e('2,0,1822,修改后的模块名,修改后的简称'); // 测试更新module 1821 的 root r($tree->updateTest($moduleID[1], $changeBranch)) && p('root,branch,parent,name,short') && e('41,1,0,产品模块161,模块简称161'); // 测试更新module 1981 的 root -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tree/updateorder.php b/test/model/tree/updateorder.php index 1d1b0c8829..69a252861b 100755 --- a/test/model/tree/updateorder.php +++ b/test/model/tree/updateorder.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ r($tree->updateOrderTest($orders1)) && p() && e(',2221,2821,1822,2822,1823,2222, r($tree->updateOrderTest($orders2)) && p() && e(',2221,2821,1822,2822,1823,1824,2222,2223,2224'); // 测试更新模块顺序 2 r($tree->updateOrderTest($orders3)) && p() && e(',2221,2822,1822,2821,1823,1824,2222,2223,2224'); // 测试更新模块顺序 3 r($tree->updateOrderTest($orders4)) && p() && e(',1984,2901,2381,2902,2382,2383,2384'); // 测试更新模块顺序 4 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/tutorial/checknovice.php b/test/model/tutorial/checknovice.php old mode 100644 new mode 100755 index c88b9f36ee..2cad7b78eb --- a/test/model/tutorial/checknovice.php +++ b/test/model/tutorial/checknovice.php @@ -10,6 +10,10 @@ title=测试 tutorialModel->checkNovice(); cid=1 pid=1 +检查当account是admin的时候的返回值。 >> 0 +检查当->app->user->modifyPassword是不为空的时候的返回值。 >> 0 +检查当account是guest的时候的返回值。 >> 0 + */ $tutorial = new tutorialTest(); @@ -17,4 +21,4 @@ $tutorial = new tutorialTest(); r($tutorial->checkNoviceTest()) && p() && e('0'); //检查当account是admin的时候的返回值。 r($tutorial->checkNoviceTest()) && p() && e('0'); //检查当$this->app->user->modifyPassword是不为空的时候的返回值。 su('guest'); -r($tutorial->checkNoviceTest()) && p() && e('0'); //检查当account是guest的时候的返回值。 +r($tutorial->checkNoviceTest()) && p() && e('0'); //检查当account是guest的时候的返回值。 \ No newline at end of file diff --git a/test/model/tutorial/getexecution.php b/test/model/tutorial/getexecution.php old mode 100644 new mode 100755 index 862226215c..6f17582909 --- a/test/model/tutorial/getexecution.php +++ b/test/model/tutorial/getexecution.php @@ -10,10 +10,14 @@ title=测试 tutorialModel->getExecution(); cid=1 pid=1 +检查获取数据的id >> 3 +检查获取数据的PM >> admin +检查获取数据的burns >> 35 + */ $tutorial = new tutorialTest(); r($tutorial->getExecutionTest()) && p('id') && e('3'); //检查获取数据的id r($tutorial->getExecutionTest()) && p('PM') && e('admin'); //检查获取数据的PM -r($tutorial->getExecutionTest()) && p('burns:0') && e('35'); //检查获取数据的burns +r($tutorial->getExecutionTest()) && p('burns:0') && e('35'); //检查获取数据的burns \ No newline at end of file diff --git a/test/model/tutorial/getexecutionpairs.php b/test/model/tutorial/getexecutionpairs.php old mode 100644 new mode 100755 index 3e058f1586..4d3384389b --- a/test/model/tutorial/getexecutionpairs.php +++ b/test/model/tutorial/getexecutionpairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getExecutionPairs(); cid=1 pid=1 +检查获取的数据信息 >> Test execution + */ $tutorial = new tutorialTest(); -r($tutorial->getExecutionPairsTest()) && p('3') && e('Test execution'); //检查获取的数据信息 +r($tutorial->getExecutionPairsTest()) && p('3') && e('Test execution'); //检查获取的数据信息 \ No newline at end of file diff --git a/test/model/tutorial/getexecutionproducts.php b/test/model/tutorial/getexecutionproducts.php old mode 100644 new mode 100755 index a55baa9884..09bcc56707 --- a/test/model/tutorial/getexecutionproducts.php +++ b/test/model/tutorial/getexecutionproducts.php @@ -10,10 +10,14 @@ title=测试 tutorialModel->getExecutionProducts(); cid=1 pid=1 +测试拿到的数据是否正确 >> normal +测试拿到的数据是否正确 >> Test branch +测试拿到的数据是否正确 >> Test plan + */ $tutorial = new tutorialTest(); r($tutorial->getExecutionProductsTest()) && p('1:type') && e('normal'); //测试拿到的数据是否正确 r($tutorial->getExecutionProductsTest()) && p('1[branches]:1') && e('Test branch'); //测试拿到的数据是否正确 -r($tutorial->getExecutionProductsTest()) && p('1[plans]:1') && e('Test plan'); //测试拿到的数据是否正确 +r($tutorial->getExecutionProductsTest()) && p('1[plans]:1') && e('Test plan'); //测试拿到的数据是否正确 \ No newline at end of file diff --git a/test/model/tutorial/getexecutionstories.php b/test/model/tutorial/getexecutionstories.php old mode 100644 new mode 100755 index c635786a6b..b6fdc35cbe --- a/test/model/tutorial/getexecutionstories.php +++ b/test/model/tutorial/getexecutionstories.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getExecutionStories(); cid=1 pid=1 +检查是否获取到数据 >> wait + */ $tutorial = new tutorialTest(); -r($tutorial->getExecutionStoriesTest()) && p('1:stage') && e('wait'); //检查是否获取到数据 +r($tutorial->getExecutionStoriesTest()) && p('1:stage') && e('wait'); //检查是否获取到数据 \ No newline at end of file diff --git a/test/model/tutorial/getexecutionstorypairs.php b/test/model/tutorial/getexecutionstorypairs.php old mode 100644 new mode 100755 index 186628d4a0..7b287e49c2 --- a/test/model/tutorial/getexecutionstorypairs.php +++ b/test/model/tutorial/getexecutionstorypairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getExecutionStoryPairs(); cid=1 pid=1 +测试是否能拿到数据 >> Test story + */ $tutorial = new tutorialTest(); -r($tutorial->getExecutionStoryPairsTest()) && p('1') && e('Test story'); //测试是否能拿到数据 +r($tutorial->getExecutionStoryPairsTest()) && p('1') && e('Test story'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getmodulepairs.php b/test/model/tutorial/getmodulepairs.php old mode 100644 new mode 100755 index 119538b2f8..b342348308 --- a/test/model/tutorial/getmodulepairs.php +++ b/test/model/tutorial/getmodulepairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getModulePairs(); cid=1 pid=1 +测试是否能拿到数据 >> Test module + */ $tutorial = new tutorialTest(); -r($tutorial->getModulePairsTest()) && p('1') && e('Test module'); //测试是否能拿到数据 +r($tutorial->getModulePairsTest()) && p('1') && e('Test module'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getproduct.php b/test/model/tutorial/getproduct.php old mode 100644 new mode 100755 index e0c51c7741..62ad3a77e9 --- a/test/model/tutorial/getproduct.php +++ b/test/model/tutorial/getproduct.php @@ -10,9 +10,12 @@ title=测试 tutorialModel->getProduct(); cid=1 pid=1 +测试是否能拿到数据 >> 1 +测试是否能拿到数据 >> Test branch + */ $tutorial = new tutorialTest(); r($tutorial->getProductTest()) && p('id') && e('1'); //测试是否能拿到数据 -r($tutorial->getProductTest()) && p('branches:1') && e('Test branch'); //测试是否能拿到数据 +r($tutorial->getProductTest()) && p('branches:1') && e('Test branch'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getproductpairs.php b/test/model/tutorial/getproductpairs.php old mode 100644 new mode 100755 index 58248fe8f1..68757f6bb0 --- a/test/model/tutorial/getproductpairs.php +++ b/test/model/tutorial/getproductpairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getProductPairs(); cid=1 pid=1 +测试是否能拿到数据 >> Test product + */ $tutorial = new tutorialTest(); -r($tutorial->getProductPairsTest()) && p('1') && e('Test product'); //测试是否能拿到数据 +r($tutorial->getProductPairsTest()) && p('1') && e('Test product'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getproductstats.php b/test/model/tutorial/getproductstats.php old mode 100644 new mode 100755 index 7308866323..0ed86ad0bc --- a/test/model/tutorial/getproductstats.php +++ b/test/model/tutorial/getproductstats.php @@ -10,9 +10,12 @@ title=测试 tutorialModel->getProductStats(); cid=1 pid=1 +测试是否能拿到数据 >> test +测试是否能拿到数据 >> Test branch + */ $tutorial = new tutorialTest(); r($tutorial->getProductStatsTest()) && p('1:code') && e('test'); //测试是否能拿到数据 -r($tutorial->getProductStatsTest()) && p('1[branches]:1') && e('Test branch'); //测试是否能拿到数据 +r($tutorial->getProductStatsTest()) && p('1[branches]:1') && e('Test branch'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getproject.php b/test/model/tutorial/getproject.php old mode 100644 new mode 100755 index d2962ce551..93a6c6788c --- a/test/model/tutorial/getproject.php +++ b/test/model/tutorial/getproject.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getProject(); cid=1 pid=1 +测试是否能拿到数据 >> project + */ $tutorial = new tutorialTest(); -r($tutorial->getProjectTest()) && p('type') && e('project'); //测试是否能拿到数据 +r($tutorial->getProjectTest()) && p('type') && e('project'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getprojectpairs.php b/test/model/tutorial/getprojectpairs.php old mode 100644 new mode 100755 index 26ddf80e1d..ca28b1126f --- a/test/model/tutorial/getprojectpairs.php +++ b/test/model/tutorial/getprojectpairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getProjectPairs(); cid=1 pid=1 +测试是否能拿到数据 >> Test Project + */ $tutorial = new tutorialTest(); -r($tutorial->getProjectPairsTest()) && p('2') && e('Test Project'); //测试是否能拿到数据 +r($tutorial->getProjectPairsTest()) && p('2') && e('Test Project'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getprojectstats.php b/test/model/tutorial/getprojectstats.php old mode 100644 new mode 100755 index 4c6b2613d0..ed6394cb3a --- a/test/model/tutorial/getprojectstats.php +++ b/test/model/tutorial/getprojectstats.php @@ -10,10 +10,14 @@ title=测试 tutorialModel->getProjectStats(); cid=1 pid=1 +测试是否能拿到数据 >> scrum +测试是否能拿到数据 >> 0 +测试是否能拿到数据 >> admin + */ $tutorial = new tutorialTest(); r($tutorial->getProjectStatsTest()) && p('2:model') && e('scrum'); //测试是否能拿到数据 r($tutorial->getProjectStatsTest()) && p('2[hours]:totalLeft') && e('0'); //测试是否能拿到数据 -r($tutorial->getProjectStatsTest()) && p('2[teamMembers]:0') && e('admin'); //测试是否能拿到数据 +r($tutorial->getProjectStatsTest()) && p('2[teamMembers]:0') && e('admin'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getstories.php b/test/model/tutorial/getstories.php old mode 100644 new mode 100755 index 8485a1248a..ff653a2d15 --- a/test/model/tutorial/getstories.php +++ b/test/model/tutorial/getstories.php @@ -10,9 +10,12 @@ title=测试 tutorialModel->getStories(); cid=1 pid=1 +测试是否能拿到数据 >> 1 +测试是否能拿到数据 >> 3 + */ $tutorial = new tutorialTest(); r($tutorial->getStoriesTest()) && p('0:module') && e('1'); //测试是否能拿到数据 -r($tutorial->getStoriesTest()) && p('1:pri') && e('3'); //测试是否能拿到数据 +r($tutorial->getStoriesTest()) && p('1:pri') && e('3'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getteammembers.php b/test/model/tutorial/getteammembers.php old mode 100644 new mode 100755 index 1672027d2a..bc17ecc5d0 --- a/test/model/tutorial/getteammembers.php +++ b/test/model/tutorial/getteammembers.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getTeamMembers(); cid=1 pid=1 +测试是否能拿到数据 >> 10 + */ $tutorial = new tutorialTest(); -r($tutorial->getTeamMembersTest()) && p('admin:days') && e('10'); //测试是否能拿到数据 +r($tutorial->getTeamMembersTest()) && p('admin:days') && e('10'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getteammemberspairs.php b/test/model/tutorial/getteammemberspairs.php old mode 100644 new mode 100755 index ce359fa5eb..69f753fd20 --- a/test/model/tutorial/getteammemberspairs.php +++ b/test/model/tutorial/getteammemberspairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getTeamMembersPairs(); cid=1 pid=1 +测试是否能拿到数据 >> admin + */ $tutorial = new tutorialTest(); -r($tutorial->getTeamMembersPairsTest()) && p('admin') && e('admin'); //测试是否能拿到数据 +r($tutorial->getTeamMembersPairsTest()) && p('admin') && e('admin'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/gettutorialed.php b/test/model/tutorial/gettutorialed.php old mode 100644 new mode 100755 index 2db34cf134..c6d30d35d7 --- a/test/model/tutorial/gettutorialed.php +++ b/test/model/tutorial/gettutorialed.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getTutorialed(); cid=1 pid=1 +测试是否能拿到数据 >> 0 + */ $tutorial = new tutorialTest(); -r($tutorial->getTutorialedTest()) && p() && e('0'); //测试是否能拿到数据 +r($tutorial->getTutorialedTest()) && p() && e('0'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/tutorial/getuserpairs.php b/test/model/tutorial/getuserpairs.php old mode 100644 new mode 100755 index 12634a76d5..c0a0b5d031 --- a/test/model/tutorial/getuserpairs.php +++ b/test/model/tutorial/getuserpairs.php @@ -10,8 +10,10 @@ title=测试 tutorialModel->getUserPairs(); cid=1 pid=1 +测试是否能拿到数据 >> admin + */ $tutorial = new tutorialTest(); -r($tutorial->getUserPairsTest()) && p('admin') && e('admin'); //测试是否能拿到数据 +r($tutorial->getUserPairsTest()) && p('admin') && e('admin'); //测试是否能拿到数据 \ No newline at end of file diff --git a/test/model/user/authorize.php b/test/model/user/authorize.php index f18ddb114e..7fab1dd68c 100755 --- a/test/model/user/authorize.php +++ b/test/model/user/authorize.php @@ -10,8 +10,8 @@ title=测试 userModel->authorize(); cid=1 pid=1 -获取用户的权限,返回权限列表 >> 1 -获取用户的权限,返回权限列表 >> 1 +获取用户的权限,返回权限列表,是否有备注权限 >> 1 +获取用户的权限,返回权限列表,是否有激活测试单权限 >> 1 获取空用户名的权限,返回空 >> 0 */ @@ -22,4 +22,4 @@ $rights = $user->authorizeTest('test2'); r($rights['rights']) && p('action:comment') && e('1'); //获取用户的权限,返回权限列表,是否有备注权限 r($rights['rights']) && p('testtask:activate') && e('1'); //获取用户的权限,返回权限列表,是否有激活测试单权限 r($user->authorizeTest('sadf!!@#a')) && p('projects') && e(''); //获取不存在的用户的权限,返回空 -r($user->authorizeTest('')) && p('') && e('0'); //获取空用户名的权限,返回空 +r($user->authorizeTest('')) && p('') && e('0'); //获取空用户名的权限,返回空 \ No newline at end of file diff --git a/test/model/user/batchcreate.php b/test/model/user/batchcreate.php index b2cd91abf9..e1e64e73fc 100755 --- a/test/model/user/batchcreate.php +++ b/test/model/user/batchcreate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ $normalUser['password'] = array(1 => 'e10adc3949ba59abbe56e057f20f883e', 2 => 'e r($user->batchCreateUserTest($normalUser)) && p('0:account') && e('newtestuser1'); //获取插入的第一个用户的account r($user->batchCreateUserTest($normalUser)) && p('2:realname') && e('新测试用户3'); //获取插入的最后一个用户的realname -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/batchedit.php b/test/model/user/batchedit.php index 0dd027f8c0..af4d939067 100755 --- a/test/model/user/batchedit.php +++ b/test/model/user/batchedit.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -27,4 +28,4 @@ $normalUser['password'] = array(998 => 'e10adc3949ba59abbe56e057f20f883e', 999 = r($user->batchEditUserTest($normalUser)) && p('998:account') && e('newtestuser1'); //获取编辑后的第一个用户的account r($user->batchEditUserTest($normalUser)) && p('1000:realname') && e('新测试用户3'); //获取编辑的最后一个用户的真实姓名 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/checkpassword.php b/test/model/user/checkpassword.php index 756acc6773..e56830730e 100755 --- a/test/model/user/checkpassword.php +++ b/test/model/user/checkpassword.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -37,4 +38,4 @@ r($user->checkPasswordTest($normalUser)) && p('password') && e('无 r($user->checkPasswordTest($differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->checkPasswordTest($weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码强度小于系统设定 r($user->checkPasswordTest($simplePassword)) && p('password1:0') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/checkproductpriv.php b/test/model/user/checkproductpriv.php index 96cf3d64cd..c15930dd19 100755 --- a/test/model/user/checkproductpriv.php +++ b/test/model/user/checkproductpriv.php @@ -10,6 +10,12 @@ title=测试 userModel->checkProductPriv(); cid=1 pid=1 +传入admin,判断admin用户是否有权限 >> 1 +传入产品、用户名,判断test3用户是否对此产品有权限 >> 0 +传入产品、用户名,判断test2用户是否对此产品有权限 >> 1 +传入产品、用户名、干系人、白名单,判断user10用户是否对此产品有权限 >> 1 +传入产品、用户名、干系人、白名单,判断user60用户是否对此产品有权限 >> 1 + */ $user = new userTest(); @@ -26,4 +32,4 @@ r($user->checkProductPrivTest('', 'admin')) && p() && e('1'); //传入admi r($user->checkProductPrivTest($product, 'test3')) && p() && e('0'); //传入产品、用户名,判断test3用户是否对此产品有权限 r($user->checkProductPrivTest($product, 'test2')) && p() && e('1'); //传入产品、用户名,判断test2用户是否对此产品有权限 r($user->checkProductPrivTest($product, 'user10', array(), array(), $stakeholders)) && p() && e('1'); //传入产品、用户名、干系人、白名单,判断user10用户是否对此产品有权限 -r($user->checkProductPrivTest($product, 'user60', array(), array(), $stakeholders, array(), $whiteList)) && p() && e('1'); //传入产品、用户名、干系人、白名单,判断user60用户是否对此产品有权限 +r($user->checkProductPrivTest($product, 'user60', array(), array(), $stakeholders, array(), $whiteList)) && p() && e('1'); //传入产品、用户名、干系人、白名单,判断user60用户是否对此产品有权限 \ No newline at end of file diff --git a/test/model/user/checkprogrampriv.php b/test/model/user/checkprogrampriv.php index e1716754fb..c96305de67 100755 --- a/test/model/user/checkprogrampriv.php +++ b/test/model/user/checkprogrampriv.php @@ -10,6 +10,12 @@ title=测试 userModel->checkProgramPriv(); cid=1 pid=1 +传入admin,判断admin用户是否有权限 >> 1 +传入项目集、用户名,判断test3用户是否对此项目集有权限 >> 0 +传入项目集、用户名,判断test2用户是否对此项目集有权限 >> 1 +传入项目集、用户名、干系人、白名单,判断user10用户是否对此项目集有权限 >> 1 +传入项目集、用户名、干系人、白名单,判断user60用户是否对此项目集有权限 >> 1 + */ $user = new userTest(); @@ -26,4 +32,4 @@ r($user->checkProgramPrivTest('', 'admin')) && r($user->checkProgramPrivTest($program, 'test3')) && p() && e('0'); //传入项目集、用户名,判断test3用户是否对此项目集有权限 r($user->checkProgramPrivTest($program, 'test2')) && p() && e('1'); //传入项目集、用户名,判断test2用户是否对此项目集有权限 r($user->checkProgramPrivTest($program, 'user10', $stakeholders, array())) && p() && e('1'); //传入项目集、用户名、干系人、白名单,判断user10用户是否对此项目集有权限 -r($user->checkProgramPrivTest($program, 'user60', $stakeholders, $whiteList)) && p() && e('1'); //传入项目集、用户名、干系人、白名单,判断user60用户是否对此项目集有权限 +r($user->checkProgramPrivTest($program, 'user60', $stakeholders, $whiteList)) && p() && e('1'); //传入项目集、用户名、干系人、白名单,判断user60用户是否对此项目集有权限 \ No newline at end of file diff --git a/test/model/user/checkprojectpriv.php b/test/model/user/checkprojectpriv.php index c445579e66..d2cc598202 100755 --- a/test/model/user/checkprojectpriv.php +++ b/test/model/user/checkprojectpriv.php @@ -10,6 +10,12 @@ title=测试 userModel->checkProjectPriv(); cid=1 pid=1 +传入admin,判断admin用户是否有权限 >> 1 +传入项目、用户名,判断test3用户是否对此项目有权限 >> 0 +传入项目、用户名,判断test2用户是否对此项目有权限 >> 1 +传入项目、用户名、干系人、白名单,判断user10用户是否对此项目有权限 >> 1 +传入项目、用户名、干系人、白名单,判断user60用户是否对此项目有权限 >> 1 + */ $user = new userTest(); @@ -26,4 +32,4 @@ r($user->checkProjectPrivTest('', 'admin')) r($user->checkProjectPrivTest($project, 'test3')) && p() && e('0'); //传入项目、用户名,判断test3用户是否对此项目有权限 r($user->checkProjectPrivTest($project, 'test2')) && p() && e('1'); //传入项目、用户名,判断test2用户是否对此项目有权限 r($user->checkProjectPrivTest($project, 'user10', $stakeholders, array(), array())) && p() && e('1'); //传入项目、用户名、干系人、白名单,判断user10用户是否对此项目有权限 -r($user->checkProjectPrivTest($project, 'user60', $stakeholders, array(), $whiteList)) && p() && e('1'); //传入项目、用户名、干系人、白名单,判断user60用户是否对此项目有权限 +r($user->checkProjectPrivTest($project, 'user60', $stakeholders, array(), $whiteList)) && p() && e('1'); //传入项目、用户名、干系人、白名单,判断user60用户是否对此项目有权限 \ No newline at end of file diff --git a/test/model/user/checksprintpriv.php b/test/model/user/checksprintpriv.php index 87e47795c7..cd59646831 100755 --- a/test/model/user/checksprintpriv.php +++ b/test/model/user/checksprintpriv.php @@ -10,6 +10,12 @@ title=测试 userModel->checkSprintPriv(); cid=1 pid=1 +传入admin,判断admin用户是否有权限 >> 1 +传入执行、用户名,判断test3用户是否对此执行有权限 >> 0 +传入执行、用户名,判断test2用户是否对此执行有权限 >> 1 +传入执行、用户名、干系人、白名单,判断user10用户是否对此执行有权限 >> 1 +传入执行、用户名、干系人、白名单,判断user60用户是否对此执行有权限 >> 1 + */ $user = new userTest(); @@ -26,4 +32,4 @@ r($user->checkSprintPrivTest('', 'admin')) r($user->checkSprintPrivTest($sprint, 'test3')) && p() && e('0'); //传入执行、用户名,判断test3用户是否对此执行有权限 r($user->checkSprintPrivTest($sprint, 'test2')) && p() && e('1'); //传入执行、用户名,判断test2用户是否对此执行有权限 r($user->checkSprintPrivTest($sprint, 'user10', $stakeholders, array(), array())) && p() && e('1'); //传入执行、用户名、干系人、白名单,判断user10用户是否对此执行有权限 -r($user->checkSprintPrivTest($sprint, 'user60', $stakeholders, array(), $whiteList)) && p() && e('1'); //传入执行、用户名、干系人、白名单,判断user60用户是否对此执行有权限 +r($user->checkSprintPrivTest($sprint, 'user60', $stakeholders, array(), $whiteList)) && p() && e('1'); //传入执行、用户名、干系人、白名单,判断user60用户是否对此执行有权限 \ No newline at end of file diff --git a/test/model/user/computepasswordstrengthtest.php b/test/model/user/computepasswordstrengthtest.php index 679d7d138a..5ed486f888 100755 --- a/test/model/user/computepasswordstrengthtest.php +++ b/test/model/user/computepasswordstrengthtest.php @@ -24,4 +24,4 @@ r($user->computePasswordStrengthTest('')) && p() && e('0'); r($user->computePasswordStrengthTest('123456')) && p() && e('0'); //获取[123456]密码的强度 r($user->computePasswordStrengthTest('qaz123')) && p() && e('0'); //获取[qaz123]密码的强度 r($user->computePasswordStrengthTest('qaz67911334')) && p() && e('1'); //获取[qaz67911334]密码的强度 -r($user->computePasswordStrengthTest('ZENFBQfy3xpRarDwG3lN')) && p() && e('2'); //获取[ZENFBQfy3xpRarDwG3lN]密码的强度 +r($user->computePasswordStrengthTest('ZENFBQfy3xpRarDwG3lN')) && p() && e('2'); //获取[ZENFBQfy3xpRarDwG3lN]密码的强度 \ No newline at end of file diff --git a/test/model/user/computeuserview.php b/test/model/user/computeuserview.php index 560162bafa..64132f802e 100755 --- a/test/model/user/computeuserview.php +++ b/test/model/user/computeuserview.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,9 +11,12 @@ title=测试 userModel->computeUserView(); cid=1 pid=1 -获取admin账户可见的前两个项目ID >> ,1,3, -获取admin账户可见的前两个产品ID >> ,1,2, +获取强制计算前admin账户可见的前两个项目集ID >> ,1,2, +获取强制计算前admin账户可见的前两个产品ID >> ,1,2, +获取强制计算前admin账户可见的前两个项目集ID >> 5,6 +获取强制计算前admin账户可见的前两个产品ID >> ,11,12, 获取user10账户可见的产品ID >> 99 +获取test2账户可见的项目ID >> ,12 用户名传null,则获取当前登录账户的views >> admin */ @@ -34,4 +38,4 @@ r($computedAdminProducts) && p() && e(',11,12,'); //获 r($user->computeUserViewTest('user10')) && p('products') && e('99'); //获取user10账户可见的产品ID r($user->computeUserViewTest('test2')) && p('projects') && e(',12'); //获取test2账户可见的项目ID r($user->computeUserViewTest(null)) && p('account') && e('admin'); //用户名传null,则获取当前登录账户的views -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/create.php b/test/model/user/create.php index f8aa8a4ca5..9868565944 100755 --- a/test/model/user/create.php +++ b/test/model/user/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -57,4 +58,4 @@ r($user->createUserTest($differentPassword)) && p('password:0') && e('两次密 r($user->createUserTest($existUser)) && p('account:0') && e('『用户名』已经有『admin』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //插入重复的用户名,返回报错信息 r($user->createUserTest($normalUser)) && p('id,realname') && e('1001,新的测试用户'); //正常插入用户,返回新插入的ID、真实姓名 r($user->createUserTest($normalUser)) && p('realname') && e('新的测试用户'); //正常插入用户,返回新插入的真实姓名 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/createcontactlist.php b/test/model/user/createcontactlist.php old mode 100644 new mode 100755 index de200d564c..baa51504bb --- a/test/model/user/createcontactlist.php +++ b/test/model/user/createcontactlist.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -21,4 +22,4 @@ r($user->createContactListTest('新的列表名称1', $userList)) && p('listName r($user->createContactListTest('新的列表名称2', $userList)) && p('listName') && e('新的列表名称2'); //插入一条联系人列表,获取插入的联系人列表名称 r($user->createContactListTest('新的列表名称3', array())) && p('userList') && e(''); //插入一条联系人列表,获取插入的联系人列表 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/deletecontactlist.php b/test/model/user/deletecontactlist.php old mode 100644 new mode 100755 index 8345fb9a19..88056c5301 --- a/test/model/user/deletecontactlist.php +++ b/test/model/user/deletecontactlist.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ r($user->deleteContactListTest(2)) && p('listName') && e('0'); //删除ID为 r($user->deleteContactListTest(null)) && p('userLsit') && e('0'); //删除ID为null的联系人列表 r($user->deleteContactListTest(1000)) && p('userList') && e('0'); //删除ID为1000的联系人列表 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/getavatarpairs.php b/test/model/user/getavatarpairs.php index b59acb7e98..a54c415aef 100755 --- a/test/model/user/getavatarpairs.php +++ b/test/model/user/getavatarpairs.php @@ -17,4 +17,4 @@ pid=1 $user = new userTest(); r(count($user->getAvatarPairsTest())) && p() && e('999'); //所有用户头像的数量 -r($user->getAvatarPairsTest()) && p('user99') && e('/home/z/user/15.png'); //查找account为"user99"的用户的头像路径 +r($user->getAvatarPairsTest()) && p('user99') && e('/home/z/user/15.png'); //查找account为"user99"的用户的头像路径 \ No newline at end of file diff --git a/test/model/user/getbyid.php b/test/model/user/getbyid.php index 016ed64221..533b877ebe 100755 --- a/test/model/user/getbyid.php +++ b/test/model/user/getbyid.php @@ -22,4 +22,4 @@ r($user->getByIDTest('admin', 'account')) && p('account') && e('admin'); // r($user->getByIDTest('admin')) && p('account') && e('admin'); // 通过默认字段获取存在的用户 r($user->getByIDTest(1)) && p('account') && e(''); // 通过默认字段获取不存在的用户 r($user->getByIDTest(100000, 'id')) && p('account') && e(''); // 通过id字段获取不存在的用户 -r($user->getByIDTest('error', 'account')) && p('account') && e(''); // 通过默认字段获取不存在的用户 +r($user->getByIDTest('error', 'account')) && p('account') && e(''); // 通过默认字段获取不存在的用户 \ No newline at end of file diff --git a/test/model/user/getbyquery.php b/test/model/user/getbyquery.php index 345a77376a..c3cd097b94 100755 --- a/test/model/user/getbyquery.php +++ b/test/model/user/getbyquery.php @@ -21,4 +21,4 @@ $outsideUsers = $user->getByQueryTest('outside'); r(count($insideQAUsers)) && p() && e('303'); //对比获取到的内部用户的数量 r($insideQAUsers) && p('302:account') && e('admin'); //按ID倒序查询内部用户,获取最后一个用户的account -r($outsideUsers) && p('0:realname') && e('用户1'); //获取第一个外部用户的真实姓名 +r($outsideUsers) && p('0:realname') && e('用户1'); //获取第一个外部用户的真实姓名 \ No newline at end of file diff --git a/test/model/user/getcancreatestoryusers.php b/test/model/user/getcancreatestoryusers.php index 8964304e65..1121d5c858 100755 --- a/test/model/user/getcancreatestoryusers.php +++ b/test/model/user/getcancreatestoryusers.php @@ -15,4 +15,4 @@ pid=1 */ $user = new userTest(); -r($user->getCanCreateStoryUsersTest()) && p('admin;td48') && e('A:admin;T:产品主管48'); //查找系统中有权限创建、批量创建需求的用户 +r($user->getCanCreateStoryUsersTest()) && p('admin;td48') && e('A:admin;T:产品主管48'); //查找系统中有权限创建、批量创建需求的用户 \ No newline at end of file diff --git a/test/model/user/getcommiters.php b/test/model/user/getcommiters.php index dfcdd017dc..50be90732d 100755 --- a/test/model/user/getcommiters.php +++ b/test/model/user/getcommiters.php @@ -19,4 +19,4 @@ $user = new userTest(); $commiters = $user->getCommitersTest(); r($commiters) && p('qd100') && e('高层管理100'); //获取源代码账号为qd100的用户真实姓名 -r(count($commiters)) && p() && e('1000'); //获取系统中源代码账号不为空的用户数量 +r(count($commiters)) && p() && e('1000'); //获取系统中源代码账号不为空的用户数量 \ No newline at end of file diff --git a/test/model/user/getcontactlistbyid.php b/test/model/user/getcontactlistbyid.php index 431dbb1189..7be42c8963 100755 --- a/test/model/user/getcontactlistbyid.php +++ b/test/model/user/getcontactlistbyid.php @@ -24,4 +24,4 @@ r($user->getContactListByIDTest(1)) && p('listName') && e('联系人列表1' r($user->getContactListByIDTest(60)) && p('account') && e('admin'); //获取ID为60的联系人列表创建者 r($user->getContactListByIDTest(1000)) && p() && e('0'); //获取ID为1000的联系人列表,返回空 r($user->getContactListByIDTest(false)) && p() && e('0'); //获取ID为false的联系人列表,返回空 -r($user->getContactListByIDTest(null)) && p() && e('0'); //获取ID为null的联系人列表,返回空 +r($user->getContactListByIDTest(null)) && p() && e('0'); //获取ID为null的联系人列表,返回空 \ No newline at end of file diff --git a/test/model/user/getcontactlists.php b/test/model/user/getcontactlists.php index b5d92a828c..ba55fad705 100755 --- a/test/model/user/getcontactlists.php +++ b/test/model/user/getcontactlists.php @@ -19,4 +19,4 @@ $adminContactList2 = $user->getContactListsTest('admin', ''); $test2ContactList = $user->getContactListsTest('test2'); $emptyContactList = $user->getContactListsTest('', ''); -r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 +r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 \ No newline at end of file diff --git a/test/model/user/getcontactuserpairs.php b/test/model/user/getcontactuserpairs.php index c4eb2d59af..41e40f687f 100755 --- a/test/model/user/getcontactuserpairs.php +++ b/test/model/user/getcontactuserpairs.php @@ -20,4 +20,4 @@ $accountList = array('admin', 'test2', 'asdffg', null); r($user->getContactUserPairsTest($accountList)) && p('admin') && e('admin'); //根据传入的accountList获取admin真实姓名 r($user->getContactUserPairsTest($accountList)) && p('test2') && e('测试2'); //根据传入的accountList获取test2真实姓名 r($user->getContactUserPairsTest($accountList)) && p('asdffg') && e(''); //根据传入的accountList获取asdffg真实姓名 -r($user->getContactUserPairsTest($accountList)) && p('null') && e(''); //根据传入的accountList获取null真实姓名 +r($user->getContactUserPairsTest($accountList)) && p('null') && e(''); //根据传入的accountList获取null真实姓名 \ No newline at end of file diff --git a/test/model/user/getdatainjson.php b/test/model/user/getdatainjson.php old mode 100644 new mode 100755 index 5906407d65..ebc8c55186 --- a/test/model/user/getdatainjson.php +++ b/test/model/user/getdatainjson.php @@ -26,4 +26,4 @@ $admin->deleted = '1'; r($user->getDataInJSONTest($admin)) && p('user:company') && e('易软天创网络科技有限公司'); //传入admin用户信息,返回公司信息 r($user->getDataInJSONTest($admin)) && p('user:account') && e('admin'); //传入admin用户信息,返回用户名信息 r($user->getDataInJSONTest($admin)) && p('user:password') && e(''); //传入admin用户信息,返回密码信息 -r($user->getDataInJSONTest(null)) && p('user:company') && e('易软天创网络科技有限公司'); //传入null用户信息,返回公司信息 +r($user->getDataInJSONTest(null)) && p('user:company') && e('易软天创网络科技有限公司'); //传入null用户信息,返回公司信息 \ No newline at end of file diff --git a/test/model/user/getgroups.php b/test/model/user/getgroups.php index bed4872331..547d7542e4 100755 --- a/test/model/user/getgroups.php +++ b/test/model/user/getgroups.php @@ -19,4 +19,4 @@ $user = new userTest(); r($user->getGroupsTest('admin')) && p() && e('0'); // 获取admin所在的分组,为空 r(count($user->getGroupsTest('test2'))) && p() && e('1'); // 通过test2所在的分组数量,1个 -r($user->getGroupsTest('')) && p() && e('0'); // 传空用户名,返回空 +r($user->getGroupsTest('')) && p() && e('0'); // 传空用户名,返回空 \ No newline at end of file diff --git a/test/model/user/getgroupsbyvisions.php b/test/model/user/getgroupsbyvisions.php index 51a79fd348..553f85e34b 100755 --- a/test/model/user/getgroupsbyvisions.php +++ b/test/model/user/getgroupsbyvisions.php @@ -21,4 +21,4 @@ $user = new userTest(); r(count($user->getGroupsByVisionsTest(array('rnd')))) && p() && e('14'); // 获取系统中所有研发界面分组的数量 r(count($user->getGroupsByVisionsTest(array('lite')))) && p() && e('3'); // 获取系统中所有迅捷界面分组的数量 r($user->getGroupsByVisionsTest(array())) && p() && e('0'); // 传空Visions,返回空数组 -r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量 +r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量 \ No newline at end of file diff --git a/test/model/user/getlist.php b/test/model/user/getlist.php index 8e8ca259cb..4c88e90da7 100755 --- a/test/model/user/getlist.php +++ b/test/model/user/getlist.php @@ -22,4 +22,4 @@ $user = new userTest(); r($user->getListTest()) && p('1:realname') && e('开发1'); //查找系统中第二个未删除的、内部用户真实姓名,根据account正序排 r($user->getListTest()) && p('998:realname') && e('测试99'); //查找系统中未删除的、根据account正序排的最后一个用户的姓名 r($user->getListTest(true)) && p() && e('999'); //查找系统中所有未删除的、内部用户的数量 -r($user->getListTest()) && p('1000:realname') && e('Error: Cannot get index 1000'); //查找系统中不存在的用户,输出错误提示 +r($user->getListTest()) && p('1000:realname') && e('Error: Cannot get index 1000'); //查找系统中不存在的用户,输出错误提示 \ No newline at end of file diff --git a/test/model/user/getlistbyaccount.php b/test/model/user/getlistbyaccount.php index 17776ff9db..d5c4294612 100755 --- a/test/model/user/getlistbyaccount.php +++ b/test/model/user/getlistbyaccount.php @@ -22,4 +22,4 @@ $emptyContactList = $user->getListByAccountTest(''); r($adminContactList) && p() && e('0'); // 获取admin的联系人列表 r($test2ContactList) && p() && e('0'); // 获取admin的联系人列表 -r($emptyContactList) && p() && e('0'); // 获取admin的联系人列表 +r($emptyContactList) && p() && e('0'); // 获取admin的联系人列表 \ No newline at end of file diff --git a/test/model/user/getlistbyaccounts.php b/test/model/user/getlistbyaccounts.php index a87c65c402..eaf19669de 100755 --- a/test/model/user/getlistbyaccounts.php +++ b/test/model/user/getlistbyaccounts.php @@ -21,4 +21,4 @@ $count = array(0 => false, 1 => true); $user = new userTest(); r($user->getListByAccountsTest($accounts, $count[0])) && p('1:realname,role') && e('admin,qa'); //按照给定的用户名列表查询用户信息,获取用户ID为1的用户真实姓名和角色 r($user->getListByAccountsTest($accounts, $count[1])) && p() && e('3'); //按照给定的用户名列表查询用户信息,获取查询出的用户列表数量 -r($user->getListByAccountsTest($accounts, $count[0])) && p('0:realname') && e('Error: Cannot get index 0.'); //按照给定的用户名列表查询用户信息,获取用户ID为0的用户信息 +r($user->getListByAccountsTest($accounts, $count[0])) && p('0:realname') && e('Error: Cannot get index 0.'); //按照给定的用户名列表查询用户信息,获取用户ID为0的用户信息 \ No newline at end of file diff --git a/test/model/user/getobjects.php b/test/model/user/getobjects.php index 1775d4c4a9..37a762a67a 100755 --- a/test/model/user/getobjects.php +++ b/test/model/user/getobjects.php @@ -30,4 +30,4 @@ r($adminProjects) && p('11:type') && e('project'); //获取admin的所属 r($adminExecutions) && p('120:name') && e('迭代20'); //获取admin的所属执行列表,取ID为120的项目名字 r($adminDoneProjects) && p('') && e('0'); //获取admin的已完成的所属项目列表,返回空 r($test2Projects) && p('') && e('0'); //获取test2用户的所属项目列表,返回空 -r($emptyUser) && p('') && e('0'); //传入一个空用户名字段,返回空 +r($emptyUser) && p('') && e('0'); //传入一个空用户名字段,返回空 \ No newline at end of file diff --git a/test/model/user/getpairs.php b/test/model/user/getpairs.php index 95da465942..03d39d3973 100755 --- a/test/model/user/getpairs.php +++ b/test/model/user/getpairs.php @@ -44,4 +44,4 @@ r(count($usersInAccountsWithclosed)) && p() && e('2'); // r(count($limit2Users)) && p() && e('2'); //使用limit参数来限制最多获取2个用户键值对 r(count($limit50Users)) && p() && e('50'); //使用limit参数来限制最多获取50个用户键值对 r($firstPO) && p('pd58') && e('P:测试主管58'); //使用pofirst参数来将系统中的产品经理用户放到返回值前列 -r($firstPM) && p('outside100') && e('O:其他100'); //使用pmfirst参数来将系统中的项目经理用户放到返回值前列 +r($firstPM) && p('outside100') && e('O:其他100'); //使用pmfirst参数来将系统中的项目经理用户放到返回值前列 \ No newline at end of file diff --git a/test/model/user/getparentstageauthedusers.php b/test/model/user/getparentstageauthedusers.php index 0300ed3249..b720122a51 100755 --- a/test/model/user/getparentstageauthedusers.php +++ b/test/model/user/getparentstageauthedusers.php @@ -21,4 +21,4 @@ $user = new userTest(); r($user->getParentStageAuthedUsersTest(0)) && p() && e('0'); //传入ID为0的情况获取有权限的用户 r($user->getParentStageAuthedUsersTest(131)) && p('admin') && e('admin'); //传入一个阶段ID获取有权限的用户 r($user->getParentStageAuthedUsersTest(1)) && p() && e('0'); //传入一个项目集ID获取有权限的用户 -r($user->getParentStageAuthedUsersTest(161)) && p('admin') && e('admin'); //传入一个看板类型的项目ID获取有权限的用户 +r($user->getParentStageAuthedUsersTest(161)) && p('admin') && e('admin'); //传入一个看板类型的项目ID获取有权限的用户 \ No newline at end of file diff --git a/test/model/user/getpersonaldata.php b/test/model/user/getpersonaldata.php index 8cb9002cfa..741dd421f7 100755 --- a/test/model/user/getpersonaldata.php +++ b/test/model/user/getpersonaldata.php @@ -10,6 +10,10 @@ title=测试 userModel::getPersonalData(); cid=1 pid=1 +获取admin用户的createdBugs数量 >> 270 +获取test2用户createdCases数量 >> 4 +当获取一个空用户的数据时,系统默认返回当前登录用户的数据 >> 2 + */ $user = new userTest(); $adminData = $user->getPersonalDataTest('admin'); @@ -18,4 +22,4 @@ $emptyData = $user->getPersonalDataTest(''); r($adminData) && p('createdBugs') && e('270'); //获取admin用户的createdBugs数量 r($test2Data) && p('createdCases') && e('4'); //获取test2用户createdCases数量 -r($emptyData) && p('createdTodos') && e('2'); //当获取一个空用户的数据时,系统默认返回当前登录用户的数据 +r($emptyData) && p('createdTodos') && e('2'); //当获取一个空用户的数据时,系统默认返回当前登录用户的数据 \ No newline at end of file diff --git a/test/model/user/getproductmembers.php b/test/model/user/getproductmembers.php index 7f62580569..c5af9954da 100755 --- a/test/model/user/getproductmembers.php +++ b/test/model/user/getproductmembers.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -29,4 +30,4 @@ r($teamGroups) && p('4:user5') && e('user5'); //获取ID为4的产品 r($stakeholderGroups) && p('2:po3') && e('po3'); //获取ID为2的产品的干系人,判断是否包含po3 r($stakeholderGroups) && p('3:user14') && e('user14'); //获取ID为3的产品的干系人,判断是否包含user14 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/getproductviewlistusers.php b/test/model/user/getproductviewlistusers.php index bf7da36c9b..a2b34ef1e8 100755 --- a/test/model/user/getproductviewlistusers.php +++ b/test/model/user/getproductviewlistusers.php @@ -10,6 +10,11 @@ title=测试 userModel->getProductViewListUsers(); cid=1 pid=1 +获取对ID为1的产品有权限的用户 >> 11 +获取对ID为1的产品有权限的用户 >> test9 +获取对ID为1的产品有权限的用户 >> admin +获取对ID为2的产品有权限的用户 >> astaw + */ $user = new userTest(); @@ -26,4 +31,4 @@ $whiteList['astaw'] = 'astaw'; r(count($user->getProductViewListUsersTest(1, $stakeholders, $teams, $whiteList))) && p() && e('11'); //获取对ID为1的产品有权限的用户 r($user->getProductViewListUsersTest(1, $stakeholders, $teams, $whiteList)) && p('test9') && e('test9'); //获取对ID为1的产品有权限的用户 r($user->getProductViewListUsersTest(1, $stakeholders, $teams, $whiteList)) && p('admin') && e('admin'); //获取对ID为1的产品有权限的用户 -r($user->getProductViewListUsersTest(2, $stakeholders, $teams, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的产品有权限的用户 +r($user->getProductViewListUsersTest(2, $stakeholders, $teams, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的产品有权限的用户 \ No newline at end of file diff --git a/test/model/user/getprogramauthedusers.php b/test/model/user/getprogramauthedusers.php index e359354c2b..2b8a97c2c2 100755 --- a/test/model/user/getprogramauthedusers.php +++ b/test/model/user/getprogramauthedusers.php @@ -10,6 +10,11 @@ title=测试 userModel->getProgramAuthedUsers(); cid=1 pid=1 +获取对ID为1的项目集有权限的用户数量 >> 6 +获取对ID为1的项目集有权限的用户 >> test9 +获取对ID为1的项目集有权限的用户 >> admin +获取对ID为2的项目集有权限的用户 >> astaw + */ $user = new userTest(); @@ -23,4 +28,4 @@ $whiteList['astaw'] = 'astaw'; r(count($user->getProgramAuthedUsersTest(1, $stakeholders, $whiteList))) && p() && e('6'); //获取对ID为1的项目集有权限的用户数量 r($user->getProgramAuthedUsersTest(1, $stakeholders, $whiteList)) && p('test9') && e('test9'); //获取对ID为1的项目集有权限的用户 r($user->getProgramAuthedUsersTest(1, $stakeholders, $whiteList)) && p('admin') && e('admin'); //获取对ID为1的项目集有权限的用户 -r($user->getProgramAuthedUsersTest(2, $stakeholders, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的项目集有权限的用户 +r($user->getProgramAuthedUsersTest(2, $stakeholders, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的项目集有权限的用户 \ No newline at end of file diff --git a/test/model/user/getprojectauthedusers.php b/test/model/user/getprojectauthedusers.php index 9dd80c4565..90c02dcdec 100755 --- a/test/model/user/getprojectauthedusers.php +++ b/test/model/user/getprojectauthedusers.php @@ -10,6 +10,10 @@ title=测试 userModel->getProjectAuthedUsers(); cid=1 pid=1 +获取对ID为1的产品有权限的用户 >> test9 +获取对ID为1的产品有权限的用户 >> admin +获取对ID为2的产品有权限的用户 >> astaw + */ $user = new userTest(); @@ -25,4 +29,4 @@ $whiteList['astaw'] = 'astaw'; r($user->getProjectAuthedUsersTest(1, $stakeholders, $teams, $whiteList)) && p('test9') && e('test9'); //获取对ID为1的产品有权限的用户 r($user->getProjectAuthedUsersTest(1, $stakeholders, $teams, $whiteList)) && p('admin') && e('admin'); //获取对ID为1的产品有权限的用户 -r($user->getProjectAuthedUsersTest(2, $stakeholders, $teams, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的产品有权限的用户 +r($user->getProjectAuthedUsersTest(2, $stakeholders, $teams, $whiteList)) && p('astaw') && e('astaw'); //获取对ID为2的产品有权限的用户 \ No newline at end of file diff --git a/test/model/user/getrealnameandemails.php b/test/model/user/getrealnameandemails.php index 436f41664e..e3c24f4a7a 100755 --- a/test/model/user/getrealnameandemails.php +++ b/test/model/user/getrealnameandemails.php @@ -20,4 +20,4 @@ $user = new userTest(); $emails = $user->getRealNameAndEmailsTest($accounts); r($emails['admin']) && p('email') && e('833482@qq.com'); //获取admin的邮箱 -r(count($emails)) && p() && e('2'); //从accounts中获取到的用户邮箱数量 +r(count($emails)) && p() && e('2'); //从accounts中获取到的用户邮箱数量 \ No newline at end of file diff --git a/test/model/user/getteammemberpairs.php b/test/model/user/getteammemberpairs.php index aed84a877d..2465a1663a 100755 --- a/test/model/user/getteammemberpairs.php +++ b/test/model/user/getteammemberpairs.php @@ -10,10 +10,14 @@ title=测试 userModel->getTeamMemberPairs(); cid=1 pid=1 +获取ID为11的项目的团队成员数量 >> 3 +获取ID为11的项目的团队成员数量,追加用户test2 >> 4 +获取ID为110的执行的团队成员成员 >> T:测试1 + */ $user = new userTest(); r(count($user->getTeamMemberPairsTest(11, 'project'))) && p() && e('3'); //获取ID为11的项目的团队成员数量 r(count($user->getTeamMemberPairsTest(11, 'project', '', array('test2')))) && p() && e('4'); //获取ID为11的项目的团队成员数量,追加用户test2 -r($user->getTeamMemberPairsTest(110, 'execution')) && p('test1') && e('T:测试1'); //获取ID为110的执行的团队成员成员 +r($user->getTeamMemberPairsTest(110, 'execution')) && p('test1') && e('T:测试1'); //获取ID为110的执行的团队成员成员 \ No newline at end of file diff --git a/test/model/user/getuserdetailsforapi.php b/test/model/user/getuserdetailsforapi.php index 800ceb9035..171028a760 100755 --- a/test/model/user/getuserdetailsforapi.php +++ b/test/model/user/getuserdetailsforapi.php @@ -10,6 +10,10 @@ title=测试 userModel::getUserDetailsForAPI(); cid=1 pid=1 +获取admin用户的url >> guser-profile-1. +获取test2用户的真实姓名 >> 测试2 +获取user10的头像信息 >> http:///home/z/tmp/10.png + */ $user = new userTest(); $userList = array('admin', 'test2', 'user10', ''); @@ -17,4 +21,4 @@ $users = $user->getUserDetailsForAPITest($userList); r($users) && p('admin:url') && e('guser-profile-1.'); //获取admin用户的url r($users) && p('test2:realname') && e('测试2'); //获取test2用户的真实姓名 -r($users) && p('user10:avatar') && e('http:///home/z/tmp/10.png'); //获取user10的头像信息 +r($users) && p('user10:avatar') && e('http:///home/z/tmp/10.png'); //获取user10的头像信息 \ No newline at end of file diff --git a/test/model/user/getuserdisplayinfos.php b/test/model/user/getuserdisplayinfos.php index 2b3e9dd87b..60e6f5e86f 100755 --- a/test/model/user/getuserdisplayinfos.php +++ b/test/model/user/getuserdisplayinfos.php @@ -23,4 +23,4 @@ $user = new userTest(); r($user->getUserDisplayInfosTest($accounts)) && p('dev33:realname') && e('项目经理33'); //查找获取到的用户名为dev33的真实姓名 r($user->getUserDisplayInfosTest($accounts)) && p('user10:avatar') && e('/home/z/tmp/10.png'); //查找获取到的用户名为user10的头像 r($user->getUserDisplayInfosTest($accounts, 0, 'outside')) && p('outside1:avatar') && e('/home/z/tmp/18.png'); //查找获取到的用户名为outside1的外部用户的头像信息 -r($user->getUserDisplayInfosTest($accounts)) && p('cccfff:realname') && e('Error: Cannot get index cccfff.'); //查找获取到的用户名为cccfff的真实姓名 +r($user->getUserDisplayInfosTest($accounts)) && p('cccfff:realname') && e('Error: Cannot get index cccfff.'); //查找获取到的用户名为cccfff的真实姓名 \ No newline at end of file diff --git a/test/model/user/getuserroles.php b/test/model/user/getuserroles.php index 6c170d30fd..e10c77d1d6 100755 --- a/test/model/user/getuserroles.php +++ b/test/model/user/getuserroles.php @@ -21,4 +21,4 @@ $user = new userTest(); r($user->getUserRolesTest($accounts, true)) && p('dev33') && e('dev'); //获取用户名和职位Key的键值对 r($user->getUserRolesTest($accounts, false)) && p('dev33') && e('研发'); //获取用户名和职位Value的键值对 r(count($user->getUserRolesTest($accounts, true))) && p() && e(2); //从指定accounts中获取到的键值对数量 -r(count($user->getUserRolesTest($accounts, false))) && p() && e(2); //从指定accounts中获取到的键值对数量 +r(count($user->getUserRolesTest($accounts, false))) && p() && e(2); //从指定accounts中获取到的键值对数量 \ No newline at end of file diff --git a/test/model/user/getusertemplates.php b/test/model/user/getusertemplates.php index afdb94f578..74e7f78ab9 100755 --- a/test/model/user/getusertemplates.php +++ b/test/model/user/getusertemplates.php @@ -10,7 +10,9 @@ title=测试 userModel::getUserTemplates(); cid=1 pid=1 + + */ $user = new userTest(); -//r() && p('') && e(''); // +//r() && p('') && e(''); // \ No newline at end of file diff --git a/test/model/user/getvisionlist.php b/test/model/user/getvisionlist.php index 3af8f468e0..4832984e72 100755 --- a/test/model/user/getvisionlist.php +++ b/test/model/user/getvisionlist.php @@ -10,9 +10,12 @@ title=测试 userModel::getVisionList(); cid=1 pid=1 +获取系统visions的数量 >> 2 +获取test2用户的真实姓名 >> 研发综合界面 + */ $user = new userTest(); $visions = $user->getVisionListTest(); r(count($visions)) && p() && e('2'); //获取系统visions的数量 -r($visions) && p('rnd') && e('研发综合界面'); //获取test2用户的真实姓名 +r($visions) && p('rnd') && e('研发综合界面'); //获取test2用户的真实姓名 \ No newline at end of file diff --git a/test/model/user/getweakusers.php b/test/model/user/getweakusers.php old mode 100644 new mode 100755 index efd4808d3a..e251ca0413 --- a/test/model/user/getweakusers.php +++ b/test/model/user/getweakusers.php @@ -16,4 +16,4 @@ pid=1 $user = new userTest(); a($user->getWeakUsersTest());die; -r($user->getWeakUsersTest()) && p('') && e('0'); //获取密码较弱的用户 +r($user->getWeakUsersTest()) && p('') && e('0'); //获取密码较弱的用户 \ No newline at end of file diff --git a/test/model/user/grantuserviewtest.php b/test/model/user/grantuserviewtest.php index b2e981e2db..d6792802f3 100755 --- a/test/model/user/grantuserviewtest.php +++ b/test/model/user/grantuserviewtest.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,11 @@ title=测试 userModel->grantUserView(); cid=1 pid=1 +获取admin账户可见的前两个项目的ID >> 12,13 +获取admin账户可见的前两个产品的ID >> 11,12 +获取test2账户可见的前两个项目的ID >> 12,11 +获取user10账户可见的前两个项目的ID >> 19,11 + */ $user = new userTest(); @@ -29,4 +35,4 @@ r($adminProducts) && p() && e('11,12'); //获取admin账户可见的前两个 r($test2Projects) && p() && e('12,11'); //获取test2账户可见的前两个项目的ID r($user10Projects) && p() && e('19,11'); //获取user10账户可见的前两个项目的ID r($nullViews) && p() && e(''); //获取null账户可见的项目、产品等 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/identify.php b/test/model/user/identify.php index 33e7c8e07d..a879669a86 100755 --- a/test/model/user/identify.php +++ b/test/model/user/identify.php @@ -20,4 +20,4 @@ $user = new userTest(); r($user->identifyTest('admin', '78302615c8b79cac8df6d2607f8a83ee')) && p('realname') && e('admin'); //用户名密码皆正确,返回验证登录的用户 r($user->identifyTest('asdjaf12', '78302615c8b79cac8df6d2607f8a83ee')) && p() && e('0'); //验证一个不存在的用户,返回空 -r($user->identifyTest('', '')) && p() && e('0'); //验证一个不传用户名和密码的用户,返回空 +r($user->identifyTest('', '')) && p() && e('0'); //验证一个不传用户名和密码的用户,返回空 \ No newline at end of file diff --git a/test/model/user/login.php b/test/model/user/login.php index d731ca8cef..b022824c64 100755 --- a/test/model/user/login.php +++ b/test/model/user/login.php @@ -30,4 +30,4 @@ $emptyAccount = $userClass->loginTest($emptyAccount); r($admin) && p('admin') && e('1'); //使用admin登录,返回此用户为超级管理员 r(count($admin->rights)) && p() && e('3'); //使用Admin登录,返回权限列表的数量 -r(count($emptyAccount->group)) && p() && e('0'); //使用空账号登录,返回权限列表数量为0 +r(count($emptyAccount->group)) && p() && e('0'); //使用空账号登录,返回权限列表数量为0 \ No newline at end of file diff --git a/test/model/user/resetpassword.php b/test/model/user/resetpassword.php index 35a633cae2..0142d6a943 100755 --- a/test/model/user/resetpassword.php +++ b/test/model/user/resetpassword.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -38,4 +39,4 @@ r($user->resetPasswordTest($normalUser)) && p('password') && e('367ef r($user->resetPasswordTest($differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->resetPasswordTest($weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码强度小于系统设定 r($user->resetPasswordTest($simplePassword)) && p('password1:0') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/saveusertemplate.php b/test/model/user/saveusertemplate.php index 154714b6f4..451319d6cb 100755 --- a/test/model/user/saveusertemplate.php +++ b/test/model/user/saveusertemplate.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,14 @@ title=测试 userModel::saveUserTemplate(); cid=1 pid=1 + >> bug + >> task + >> task +插入一条Bug用户模板,查看数量 >> 1 +插入两条任务类型的用户模板,查看数量 >> 2 +查看插入的模板二的名字 >> Admin的模板二 +查看插入的模板二的内容 >>

这是一段模板内容

+ */ $user = new userTest(); $tpl1['title'] = 'Admin的模板一'; @@ -35,4 +44,4 @@ r(count($tpls3)) && p() && e('2'); //插入两 r($tpls2) && p('0:title') && e('Admin的模板二'); //查看插入的模板二的名字 r($tpls2) && p('0:content') && e('

这是一段模板内容

'); //查看插入的模板二的内容 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/update.php b/test/model/user/update.php index e58500070c..cefbd7c875 100755 --- a/test/model/user/update.php +++ b/test/model/user/update.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -40,4 +41,4 @@ r($user->updateUserTest(1000, $normalUser)) && p('account') && e('new r($user->updateUserTest(1000, $existUser)) && p('account:0') && e('『用户名』已经有『newtestuser4』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。');//编辑用户,有重名用户的情况 r($user->updateUserTest(1000, $differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->updateUserTest(1000, $specialUser)) && p('account:0') && e('『用户名』只能是字母、数字或下划线的组合三位以上。'); //用户名包含特殊字符的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/updatecontactList.php b/test/model/user/updatecontactList.php old mode 100644 new mode 100755 index 73e33a6f4f..a3b9b1595a --- a/test/model/user/updatecontactList.php +++ b/test/model/user/updatecontactList.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -23,4 +24,4 @@ r($user->updateContactListTest(2, '新的列表名称2', $userList)) && p('l r($user->updateContactListTest(3, '新的列表名称3', '')) && p('userLsit') && e(''); //更新ID为3的联系人列表,获取更新的联系人列表 r($user->updateContactListTest(1000, '新的列表名称4', $userList)) && p('userList') && e('0'); //更新ID为1000的联系人列表,获取更新的联系人列表 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/updatepassword.php b/test/model/user/updatepassword.php index 222328587e..4a67298be2 100755 --- a/test/model/user/updatepassword.php +++ b/test/model/user/updatepassword.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($user->updatePasswordTest(1000, $normalUser)) && p('password') && e r($user->updatePasswordTest(1000, $differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况 r($user->updatePasswordTest(1000, $weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码小于设定强度的情况 -system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/user/updateprogramview.php b/test/model/user/updateprogramview.php index d34beb2569..97a4f5cfde 100755 --- a/test/model/user/updateprogramview.php +++ b/test/model/user/updateprogramview.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -10,6 +11,8 @@ title=测试 userModel->updateProgramView(); cid=1 pid=1 + + */ $user = new userTest(); @@ -17,4 +20,4 @@ $user = new userTest(); $programIdList = array('1', '2'); //r() && p() && e(''); // -//system("./ztest init"); +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/webhook/bind.php b/test/model/webhook/bind.php index b06c306757..8358c535a8 100755 --- a/test/model/webhook/bind.php +++ b/test/model/webhook/bind.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -56,4 +57,4 @@ $bind['userid']['user14'] = ''; $result1 = $webhook->bindTest($post, $bind); r($result1) && p() && e('1'); //绑定admin账号给飞书账号的白袁李(创建了测试用户飞书管理端,然后通过create方法创建了一条数据,关联飞书里的一个用户,页面验证成功绑定) -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/webhook/builddata.php b/test/model/webhook/builddata.php index d3a1dd3f00..8f46a5b940 100755 --- a/test/model/webhook/builddata.php +++ b/test/model/webhook/builddata.php @@ -10,9 +10,8 @@ title=测试 webhookModel->buildData(); cid=1 pid=1 -正常传入的情况 >> http.\/builddata.php?m=product&f=view&id=1 +正常传入的情况 >> "msgtype":"markdown","markdown" 不传objectType >> 0 -不传objectID >> 0 不传actionType >> 0 不传actionID >> admin\u521b\u5efa\u4ea7\u54c1 @@ -44,4 +43,4 @@ $result5 = $webhook->buildDataTest($objectType[0], $objectID[0], $actionType[0], r($result1) && p() && e('"msgtype":"markdown","markdown"'); //正常传入的情况 r($result2) && p() && e('0'); //不传objectType r($result4) && p() && e('0'); //不传actionType -r($result5) && p() && e('admin\u521b\u5efa\u4ea7\u54c1'); //不传actionID +r($result5) && p() && e('admin\u521b\u5efa\u4ea7\u54c1'); //不传actionID \ No newline at end of file diff --git a/test/model/webhook/create.php b/test/model/webhook/create.php index d3d34275c1..052d3fb3f4 100755 --- a/test/model/webhook/create.php +++ b/test/model/webhook/create.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -92,4 +93,4 @@ r($result7) && p('sendType:0') && e('『发送方式』不符合格式,应当 r($result8) && p() && e('12'); //测试不传products的情况 r($result9) && p() && e('13'); //测试不传executions的情况 R($result10) && p() && e('14'); //测试不传desc的情况 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/webhook/getlist.php b/test/model/webhook/getlist.php index e988e4cccf..4775e2084d 100755 --- a/test/model/webhook/getlist.php +++ b/test/model/webhook/getlist.php @@ -10,7 +10,7 @@ title=测试 webhookModel->getList(); cid=1 pid=1 -统计获取list里元素数量 >> 7 +统计获取list里元素数量 >> 15 取出其中一个id >> 1 */ @@ -31,4 +31,4 @@ $decode[1] = ''; $result1 = $webhook->getListTest($orderBy[0]); r(count($result1)) && p() && e('15'); //统计获取list里元素数量 -r($result1) && p('1:id') && e('1'); //取出其中一个id +r($result1) && p('1:id') && e('1'); //取出其中一个id \ No newline at end of file diff --git a/test/model/weekly/getpagenav.php b/test/model/weekly/getpagenav.php index b61229aab8..71f611f8eb 100755 --- a/test/model/weekly/getpagenav.php +++ b/test/model/weekly/getpagenav.php @@ -31,4 +31,4 @@ r($weekly->getPageNavTest($productID[1], $date[1])) && p() && e('周报-项目3' r($weekly->getPageNavTest($productID[2], $date[0])) && p() && e('周报-项目7'); //查询项目为已挂起,日期为当天的数据 r($weekly->getPageNavTest($productID[2], $date[1])) && p() && e('周报-项目7'); //查询项目为已挂起,日期为一周前的数据 r($weekly->getPageNavTest($productID[3], $date[0])) && p() && e('周报-项目8'); //查询项目为已关闭,日期为当天的数据 -r($weekly->getPageNavTest($productID[3], $date[1])) && p() && e('周报-项目8'); //查询项目为已关闭,日期为一周前的数据 +r($weekly->getPageNavTest($productID[3], $date[1])) && p() && e('周报-项目8'); //查询项目为已关闭,日期为一周前的数据 \ No newline at end of file diff --git a/test/model/weekly/getpv.php.bak b/test/model/weekly/getpv.php.bak new file mode 100755 index 0000000000..b5832f0757 --- /dev/null +++ b/test/model/weekly/getpv.php.bak @@ -0,0 +1,32 @@ +#!/usr/bin/env php +getPV(); +cid=1 +pid=1 + +测试projectID值为0,date值为2022-05-01 >> 1488 +测试projectID值为0,date值为空 >> 4223.02 +测试projectID值为11,date值为2022-05-01 >> 24 +测试projectID值为11,date值为空 >> 100 +测试projectID值为41,date值为2022-05-01 >> 9 +测试projectID值为41,date值为空 >> 50.5 + +*/ + +$projectIDList = array(0, 11, 41); +$dateList = array('2022-05-01', ''); + +$weekly = new weeklyTest(); + +r($weekly->getPVTest($projectIDList[0], $dateList[0])) && p() && e('1488'); //测试projectID值为0,date值为2022-05-01 +r($weekly->getPVTest($projectIDList[0], $dateList[1])) && p() && e('4223.02'); //测试projectID值为0,date值为空 +r($weekly->getPVTest($projectIDList[1], $dateList[0])) && p() && e('24'); //测试projectID值为11,date值为2022-05-01 +r($weekly->getPVTest($projectIDList[1], $dateList[1])) && p() && e('100'); //测试projectID值为11,date值为空 +r($weekly->getPVTest($projectIDList[2], $dateList[0])) && p() && e('9'); //测试projectID值为41,date值为2022-05-01 +r($weekly->getPVTest($projectIDList[2], $dateList[1])) && p() && e('50.5'); //测试projectID值为41,date值为空 \ No newline at end of file diff --git a/test/model/weekly/save.php b/test/model/weekly/save.php index 7816a6cfa6..9c47ac694f 100755 --- a/test/model/weekly/save.php +++ b/test/model/weekly/save.php @@ -2,6 +2,7 @@ switchDB(); su('admin'); /** @@ -33,4 +34,4 @@ r($weekly->saveTest($productID[2], $date[1])) && p('id,project') && e('16,43'); r($weekly->saveTest($productID[3], $date[0])) && p('id,project') && e('17,45'); //保存项目为进行中、日期不为空的数据 r($weekly->saveTest($productID[3], $date[1])) && p('id,project') && e('18,45'); //保存项目为进行中、日期为空的数据 -system("./ztest init"); \ No newline at end of file +$db->restoreDB(); \ No newline at end of file diff --git a/test/model/weekly/save.php.bak b/test/model/weekly/save.php.bak new file mode 100755 index 0000000000..9c47ac694f --- /dev/null +++ b/test/model/weekly/save.php.bak @@ -0,0 +1,37 @@ +#!/usr/bin/env php +switchDB(); +su('admin'); + +/** + +title=测试 weeklyModel->save(); +cid=1 +pid=1 + +保存项目为已挂起、日期不为空的数据 >> 11,41 +保存项目为已挂起、日期为空的数据 >> 12,41 +保存项目为已关闭、日期不为空的数据 >> 13,42 +保存项目为已关闭、日期为空的数据 >> 14,42 +保存项目为未开始、日期不为空的数据 >> 15,43 +保存项目为未开始、日期为空的数据 >> 16,43 +保存项目为进行中、日期不为空的数据 >> 17,45 +保存项目为进行中、日期为空的数据 >> 18,45 + +*/ +$productID = array('41', '42', '43', '45'); +$date = array('2022-04-29', ''); + +$weekly = new weeklyTest(); +r($weekly->saveTest($productID[0], $date[0])) && p('id,project') && e('11,41'); //保存项目为已挂起、日期不为空的数据 +r($weekly->saveTest($productID[0], $date[1])) && p('id,project') && e('12,41'); //保存项目为已挂起、日期为空的数据 +r($weekly->saveTest($productID[1], $date[0])) && p('id,project') && e('13,42'); //保存项目为已关闭、日期不为空的数据 +r($weekly->saveTest($productID[1], $date[1])) && p('id,project') && e('14,42'); //保存项目为已关闭、日期为空的数据 +r($weekly->saveTest($productID[2], $date[0])) && p('id,project') && e('15,43'); //保存项目为未开始、日期不为空的数据 +r($weekly->saveTest($productID[2], $date[1])) && p('id,project') && e('16,43'); //保存项目为未开始、日期为空的数据 +r($weekly->saveTest($productID[3], $date[0])) && p('id,project') && e('17,45'); //保存项目为进行中、日期不为空的数据 +r($weekly->saveTest($productID[3], $date[1])) && p('id,project') && e('18,45'); //保存项目为进行中、日期为空的数据 + +$db->restoreDB(); \ No newline at end of file