codeception & phpci · codeception • codeceptionphp testing framework is designed to work...
TRANSCRIPT
![Page 1: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/1.jpg)
CodeCeption &PHPCITestdrivendevelopmentframeworkforPHP&CItool
forLAMPPlatform
![Page 2: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/2.jpg)
WhoamI?
Mizanur RahmanCTO,Informatix technologiesSeniorConsultant,TelenorHealthAS
CSM,CSD,CSP
![Page 3: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/3.jpg)
Scrum&DevTeam
• ThemostimportantroleofScrum• Ensuretechnicalexcellencewithqualitydevelopmentthroughbestpractices• Focusoncontinuousdelivery,deploymentandintegration
![Page 4: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/4.jpg)
RemembertheAgileprinciple
![Page 5: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/5.jpg)
#9: Continuous attention to technical excellence and good design
![Page 6: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/6.jpg)
LAMPplatform
• Linux• Apache• MySQL• PHP
WearegoingtotalkaboutCD&CIwithPHP.ButwhyPHP?
• oneofthemostpopularlanguageforwebbasedapplicationdevelopment.• Veryeasytostartwith• Asaresultcreateslotsofgapsinstandarddevelopment
![Page 7: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/7.jpg)
WhatsortoftestwecanapplyforPHP
• UnitTest• Acceptancetest• Featuretest• Integrationtest• BDD• Webservices• Manymore
![Page 8: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/8.jpg)
TestinginPHPcanbepainful
• Manyframeworksorlibrariestochooseforeachparticulartestpart• ShouldIusePHPUnit orSimpleTest?• WhatisthereforBDDinPHP?• Managingmultiplelibrariescanbepainfulanderrorprone• Developerscanbereluctanttotesttheircodes
![Page 9: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/9.jpg)
CODECEPTION
• Codeception PHPTestingFrameworkisdesignedtoworkjustoutofthebox.• Thismeansitsinstallationrequiresminimalstepsandnoexternaldependenciespreinstalled(exceptPHP,ofcourse).• Onlyoneconfigurationstepshouldbetakenandyouarereadytotestyourwebapplicationfromaneyeofactualuser.• YoucandoUnittest,Featuretest,Acceptancetest,BDD,APItestingandintegrationtestingusingasingleframework
![Page 10: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/10.jpg)
Codeception features
• SeleniumWebDriverintegration• Elementsmatchedbyname,CSS,Xpath• Symfony2,Laravel,Yii,Phalcon,ZendFramework• PageObjects andStepObjects included• BDD-stylereadabletests• PoweredbyPHPUnit• APItesting:REST,SOAP,XML-RPC• FacebookAPItesting• DataCleanup• HTML,XML,TAP,JSONreports• CodeCoverageandRemoteCodeCoverage• ParallelExecution
![Page 11: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/11.jpg)
Installing&usingcodeception
$composerrequire"codeception/codeception”
$php vendor/bin/codeceptbootstrap
$php vendor/bin/codecept run
![Page 12: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/12.jpg)
![Page 13: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/13.jpg)
StartingwithUnittesting
AssumingwealreadyknowwhatisUnitTesting
• Codeception usesPHPUnit asabackendforrunningtests.• anyPHPUnit testcanbeaddedtoCodeception testsuiteandthenexecuted.• NoneedtoinstallPHPUnit separately.
![Page 14: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/14.jpg)
Creatingfirstunittest
php vendor/bin/codeceptgenerate:phpunit unitExample
Thiswillcreateanewunittest
Testwascreatedin/Applications/MAMP/htdocs/RPN/tests/unit/ExampleTest.php
![Page 15: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/15.jpg)
<?php
class ExampleTest extends \PHPUnit_Framework_TestCase{protected function setUp(){}
protected function tearDown(){}
// testspublic function testMe(){}
}
![Page 16: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/16.jpg)
• Codeception hasitsaddons tostandardunittests,wecanuseanothercommandtogeneratethefile.
php vendor/bin/codeceptgenerate:test unitNewExample
![Page 17: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/17.jpg)
<?php
class NewExampleTestextends \Codeception\Test\Unit{protected $tester;
protected function _before(){
}
protected function _after(){
}
// testspublic function testMe(){
}}
![Page 18: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/18.jpg)
• Thisclasshaspredefined _before and _after methodstostartwith.Youcanusethemtocreateatestedobjectbeforeeachtest,anddestroyitafterwards.• Asyousee,unlikeinPHPUnit, setUp and tearDown methodsarereplacedwiththeiraliases: _before, _after.• Theactual setUp and tearDown wereimplementedbyparentclass\Codeception\TestCase\Test
![Page 19: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/19.jpg)
Someunittestcases
public function testEqual(){$rpn = new RPN();
$this->assertEquals(5,$rpn->add(2,3));
$this->assertEquals(15,$rpn->add(12,3));}
public function testNotEqual(){$rpn = new RPN();
$this->assertNotEquals(6,$rpn->add(2,3));
$this->assertNotEquals(8,$rpn->add(2,3));}
![Page 20: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/20.jpg)
![Page 21: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/21.jpg)
![Page 22: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/22.jpg)
WecanalsogenerateHTMLreport
php vendor/bin/codecept run–html
![Page 23: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/23.jpg)
Pros• fastest(well,inthecurrentexample,youstillneeddatabaserepopulation)• cancoverrarelyusedfeatures• canteststabilityofapplicationcore• youcanonlybeconsideredagooddeveloperifyouwritethem:)
Cons• doesn’ttestconnectionsbetweenunits• unstableinsupport:verysensitivetocodechanges
![Page 24: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/24.jpg)
Acceptancetest
• Acceptancetestingcanbeperformedbyanyone.• Needsawebbrowsertotesttheapplicationifyouarebuildingawebbasedapplication• YoucanreproduceaAcceptanceTester’s actionsinscenariosandrunthemautomaticallyaftereachsitechange• Codeception keepstestscleanandsimple
![Page 25: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/25.jpg)
php vendor/bin/codecept generate:cept acceptanceLogin
thiswillcreateanewfiletests/acceptance/LoginCept.php
![Page 26: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/26.jpg)
WritingourfirstScenario
![Page 27: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/27.jpg)
Weneedtosetupthelocalurl inacceptance.suite.yml file
![Page 28: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/28.jpg)
Runningthescenario
![Page 29: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/29.jpg)
Usefultermstoknow
• wantTo• amOnPage• Click• fillField• selectOption• submitForm• See• dontSee• seeCheckboxIsChecked• seeInField• seeLink
![Page 30: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/30.jpg)
Pros• canberunonanywebsite• cantestjavascript andajaxrequests• canbeshowntoyourclientsandmanagers• moststableinsupport:lessaffectedbychangesinsourcecodeortechnologies
Cons• theslowest:requiresrunningbrowseranddatabaserepopulation• fewercheckscanleadtofalse-positiveresults• yep,theyarereallyslow• notstableinexecution:renderingandjavascript issuescanleadtounpredictableresults
![Page 31: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/31.jpg)
FunctionalTests
• Nowthatwe’vewrittensomeacceptancetests,functionaltestsarealmostthesame,withjustonemajordifference:functionaltestsdon’trequireawebservertoruntests.• Insimpletermsweset $_REQUEST, $_GET and $_POST variablesandthenweexecuteapplicationfromatest.Thismaybevaluableasfunctionaltestsarefasterandprovidedetailedstacktracesonfailures.• Pitfalls:Acceptancetestsareusuallymuchslowerthanfunctionaltests.ButfunctionaltestsarelessstableastheyrunCodeception andapplicationinoneenvironment.Ifyourapplicationwasnotdesignedtoruninlonglivingprocess,forinstanceyouuse exitoperatororglobalvariables,probablyfunctionaltestsarenotforyou.
![Page 32: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/32.jpg)
![Page 33: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/33.jpg)
Pros• likeacceptancetests,butmuchfaster• canprovidemoredetailedreports• youcanstillshowthiscodetomanagersandclients• stableenough:onlymajorcodechanges,ormovingtootherframework,canbreakthem
Cons• javascript andajaxcan’tbetested• byemulatingthebrowseryoumightgetmorefalse-positiveresults• requiresaframework
![Page 34: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/34.jpg)
BDD
• BehaviorDrivenDevelopmentisapopularmethodologyofsoftwaredevelopment.• theideaofstoryBDDcanbenarrowedto:• describefeaturesinascenariowithaformaltext• useexamplestomakeabstractthingsconcrete• implementeachstepofascenariofortesting• writeactualcodeimplementingthefeature
![Page 35: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/35.jpg)
Asimplestory
• As a customer I want to buy several products• I put first productwith 600 $ price to my cart• And then another one with 1000 $ price• When I go to checkout process• I should see that total number of products I want to buy is 2• And my order amount is 1600 $
![Page 36: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/36.jpg)
Convertingtofeatureusinggherkin
gherkinFeature: checkout processIn order to buy productsAs a customerI want to be able to buy several products
Scenario:Given I have productwith 600 $ price in my cartAnd I have productwith 1000 $ priceWhen I go to checkout processThen I should see that total number of products is 2And my order amount is 1600 $
![Page 37: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/37.jpg)
php vendor/bin/codeceptg:feature acceptancecheckout
![Page 38: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/38.jpg)
php vendor/bin/codeceptdry-runacceptancecheckout.feature
![Page 39: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/39.jpg)
php vendor/bin/codecept gherkin:snippets acceptance
<?php
class AcceptanceTester extends \Codeception\Actor{/*** @Given i have product with :num1:num2:num2$ price in my cart*/public function iHaveProductWithPriceInMyCart($num1, $num2, $num3){throw new \Codeception\Exception\Incomplete("Step `i have product with :num1:num2:num2$ price in my cart` is not defined"
);}
/*** @Given i have product with :num1:num2:num2:num2$price in my cart*/public function iHaveProductWithPriceInMyCart($num1, $num2, $num3, $num4){throw new \Codeception\Exception\Incomplete("Step `i have product with :num1:num2:num2:num2$price in my cart` is not de
fined");}
![Page 40: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/40.jpg)
TestingAPI
• WecantestAPIswithcodeception• AllowsbothREST&SOAP
FirstgenerateAPIsuitephp vendor/bin/codecept generate:suite api
Configuremodulesin api.suite.yml:
class_name: ApiTestermodules:enabled:- REST:url: http://serviceapp/api/v1/depends: PhpBrowserpart: Json
![Page 41: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/41.jpg)
php vendor/bin/codeceptgenerate:cept api CreateUser
![Page 42: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/42.jpg)
Whatiscodecoverage?
• Atsomepointyouwanttoreviewwhichpartsofyourapplicationaretestedwellandwhicharenot• Whenyouexecuteyourteststocollectcoveragereport,youwillreceivestatisticsofallclasses,methods,andlinestriggeredbythesetests.• Theratiobetweenalllinesinscriptandalltouchedlinesisamaincoveragecriterion.• Tocollectcoverageinformation xdebug isrequired
![Page 43: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/43.jpg)
Toenablecodecoverageputtheselinesintheglobal configuration filecodeception.yml:
coverage:enabled: true
Wecanalsodefinewhichfilestoexcludefromthecoverage
coverage:enabled: truewhitelist:
include: - app/*exclude: - app/cache/*
![Page 44: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/44.jpg)
codecept run--coverage--coverage-xml--coverage-html
![Page 45: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/45.jpg)
WhatisCI?
• Wedonotwanttomanuallyrunourtestsuiteseverytimethecodeisupdated.• Wedonotliketoperformmanualtesting,speciallydevelopers• Thesolutionissimple,testexecutionshouldbeautomated
![Page 46: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/46.jpg)
![Page 47: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/47.jpg)
AvailabletoolsforCI
• Jenkins• Teamcity• PHPCI• Bamboo• TravisCI
![Page 48: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/48.jpg)
WhyPHPCI?
![Page 49: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/49.jpg)
Setup
• Dependingonwhatyouwanttodo,youhavetoinstallsometools.• Afterloggingin,youcangoto admin manageplugins andinstallanynecessaryplugins.• Byinstallingaplugin,youareupdatingthecomposer.json filewithnewrequirements• Runcomposerupdateeverytimeyouupdatethesettings.
![Page 50: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/50.jpg)
![Page 51: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/51.jpg)
Addproject
• Byclickingthe addproject buttonintheheader,youcancreateanewproject• Eachbuildprocessconsistsof5phases.• Setup.Thephasewereeverythingisinitialized• Test.Thephasewerealltestsareexecuted• Complete.Successorfailure,thispartwillalwaysrun• Success.Willonlyberunincaseofsuccess• Failure.Willonlyberunincaseoffailure
![Page 52: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/52.jpg)
build_settings:ignore:- "vendor"- "bin"- "app"
setup:composer:action: "install"
test:php_unit:config:- "app/phpunit.xml.dist"
coverage: "coverage"args: "--stderr"
php_mess_detector:allow_failures: true
php_code_sniffer:standard: "PSR2"
php_cpd:allow_failures: true
php_docblock_checker:allowed_warnings: 10skip_classes: true
php_loc:directory: "src"
![Page 53: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/53.jpg)
Buildresults
![Page 54: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/54.jpg)
incaseofafailure,PHPCIwillclearlyindicatewhatiswrong
![Page 55: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/55.jpg)
Thankyou
![Page 56: CodeCeption & PHPCI · CODECEPTION • CodeceptionPHP Testing Framework is designed to work just out of the box. • This means its installation requires minimal steps and no external](https://reader031.vdocuments.mx/reader031/viewer/2022022010/5afdb4a57f8b9a864d8deabf/html5/thumbnails/56.jpg)
Questions?