160 likes | 389 Views
Tom Bahnck. MTV Networks online development 2003 Movie Awards http://www.mtv.com/onair/movieawards/ma03/ E-Cards http://www.mtv.com/community/ecards/ Automated Testing MTV.com , VH1.com , Nick.com tom.bahnck@verizon.net http://www.csc.villanova.edu/~tbahnck/. introduction movie awards
E N D
Tom Bahnck MTV Networks online development 2003 Movie Awards http://www.mtv.com/onair/movieawards/ma03/ E-Cards http://www.mtv.com/community/ecards/ Automated Testing MTV.com, VH1.com, Nick.com tom.bahnck@verizon.net http://www.csc.villanova.edu/~tbahnck/ introduction movie awards e-cards automated tests conclusion
Development Challenges • Late asset delivery • PortabilityCross-platformdeveloper-to-developer • Quality control introduction movie awards e-cards automated tests conclusion
2003 MTV Movie Awards Production overview • Compressed development schedule • Phase architecture • Nominees, voting, winners • SimulClash introduction movie awards e-cards automated tests conclusion
2003 MTV Movie Awards Development Strategy • Consolidate phases into one site architecture, and select active phase in session-scoped bean • Prefill skeletal XML file • Attributes for active voting, winner • Apply XSL templates for different nominee displays across site introduction movie awards e-cards automated tests conclusion
2003 MTV Movie Awards Code: Nominees XML introduction movie awards e-cards automated tests conclusion <category name="Best Movie" id="movie" pollPlace="onair_ma03_vote_movie" pollID="bestmovie03"> <intro> <videoID>21072</videoID> </intro> <nominee> <title></title> <subtitle>The Lord of the Rings: The Two Towers</subtitle> <formvalue>lord_rings</formvalue> <videoID>20970</videoID> <thm_image>/onair/movieawards/ma03/nominees/images/thm_movie_lotrtt.jpg</thm_image> <winner>true</winner> </nominee> ...more nominees </category>
2003 MTV Movie Awards Code: Nominees XSL introduction movie awards e-cards automated tests conclusion <xsl:if test="$phaseNum = 1"> <div align="right" valign="bottom"> <a> <xsl:attribute name="href">javascript:voteSubmit( '<xsl:value-of select="formvalue"/>' );</xsl:attribute> <img src="/sitewide/images/btn_vote.gif" width="48" height="18" border="0"/> </a> </div> </xsl:if>
2003 MTV Movie Awards SimulClash • East and west coast versions • Timing milestones -Preregistration close timeEast game openEast game closedTransition, east to west coast timelineWest game openWest game closed introduction movie awards e-cards automated tests conclusion
2003 MTV Movie Awards Code: SimulClash control introduction movie awards e-cards automated tests conclusion Date westGameClosed = new Date(103, 5, 5, 23, 59); ... // Reset coast to west if east coast game is over if (currentTime.after(targetCoastTime)) { gameCoast = "west"; } // Close pre-registration when west coast SimulClash closes if (currentTime.after(targetPreregTime)) { gamePrereg = "closed"; } // Set game state if (currentTime.after(eastGameOpen) && currentTime.before(eastGameClosed)) { eastGameOn = true; } else if (currentTime.after(westGameOpen) && currentTime.before(westGameClosed)) { westGameOn = true; } if (eastGameOn || westGameOn) { gameState = "on"; } <setvalue bean="/mtvi/util/RequestParamBucket.maSimulclashGameState" value="`gameState`"> <setvalue bean="/mtvi/util/RequestParamBucket.maSimulclashGameCoast" value="`gameCoast`"> <setvalue bean="/mtvi/util/RequestParamBucket.maSimulclashGamePrereg" value="`gamePrereg`">
2003 MTV Movie Awards SimulClash gamer client introduction movie awards e-cards automated tests conclusion
MTV.com E-Cards Priorities • Consolidate piecemeal components • Centralize • Allow custom setup • Facilitate expansion Approach • Redevelop navigation path files • Restructure config files and centralize under rest of e-cards app • Revise all areas integrating e-cards, video dedications, static cards introduction movie awards e-cards automated tests conclusion
MTV.com E-Cards Code: E-card setup introduction movie awards e-cards automated tests conclusion <importbean bean="/mtvi/ecard/EcardInfoBucket"> <setvalue bean="EcardInfoBucket.eCardPageTitle" value="MTV.com - Video Dedications"> <setvalue bean="EcardInfoBucket.leftNavBg" value="3E93D0"> <setvalue bean="EcardInfoBucket.rightNavBg" value="4A4A4A"> <setvalue bean="EcardInfoBucket.bottomNavBg" value="E7E7D7"> <setvalue bean="EcardInfoBucket.bevelColorRight" value="21A5CE"> <setvalue bean="EcardInfoBucket.bevelColorBottom" value="63C6C6"> <setvalue bean="EcardInfoBucket.messageColor" value="FFFFF0"> <setvalue bean="EcardInfoBucket.flashBgColor" value="F0F8FF"> <java>/* pageLocation is the location of the config.txt file: */</java> <setvalue bean="EcardInfoBucket.pageLocation" value="/onair/trl/valentine/video_dedications/"> <setvalue bean="EcardInfoBucket.imageLocation" value="/community/ecards/default/images/video_dedications/"> <setvalue bean="EcardInfoBucket.navLocation" value="/onair/trl/includes/nav.jhtml"> <setvalue bean="EcardInfoBucket.relLocation" value="/onair/trl/includes/navbacksp.jhtml"> <setvalue bean="EcardInfoBucket.adplacement" value="/adsetup/onair/trl/adplacement.jhtml"> <setvalue bean="EcardInfoBucket.adsetup" value="/adsetup/onair/trl/adsetup.jhtml"> <setvalue bean="EcardInfoBucket.mediaType" value="video"> <java>/* If the categoryID is known, enter it here; otherwise draw it from the url, if available: */</java> <setvalue bean="EcardInfoBucket.categoryID" value="param:categoryID"> <setvalue bean="EcardInfoBucket.categorySetup" value="/onair/trl/valentine/video_dedications/">
Automated Tests Problem • Many areas of all sites changing continuously • Non-technical personnel have author, publish rights • Emergency code publishes for last-minute deadlines, patches – regression tests needed • Minimal source control introduction movie awards e-cards automated tests conclusion
Automated Tests Solution • Write custom VB modules for E-Tester to access DOM while application automatically navigates pages • Validate key content of end-user production • Compare source to known-correct source • Compile results and automatically email report to constituents introduction movie awards e-cards automated tests conclusion
Automated Tests Code: Daily Nick.com test introduction movie awards e-cards automated tests conclusion Private Sub RSWVBAPage_afterPlay() ... 'list of flash elements flashPath(fcount) = "/flash_inits/ainit_cont.swf?movie0=sponsor_init.swf" Dim expectedElmt(54, 2) As String '**LIST OF TEST ELEMENTS expectedElmt(count, element) = prefix + "dailypoll_title.gif" expectedElmt(count, TAG) = "img" expectedElmt(count, PROP) = "src" 'slimetime live poll count = count + 1 expectedElmt(count, element) = prefix + "vote.gif" expectedElmt(count, TAG) = "input" expectedElmt(count, PROP) = "src" 'vote button ... '**END LIST OF TEST ELEMENTS '**PERFORM TESTS headerErrDesc = Nick_universal_header_test(Me) flashErrDesc = FLASH_reference_test(Me, fcount, flashPath()) bodyErrDesc = MTV_universal_body_test(Me, count, expectedElmt()) '**ASSEMBLE ERROR STATE AND DESCRIPTION errDescription = errDescPrefix + headerErrDesc + flashErrDesc + bodyErrDesc ... End Sub
Automated Tests Email report introduction movie awards e-cards automated tests conclusion
Thank You This presentation available at: http://members.verizon.net/~vze3r3vu/prez/ Tom Bahnck tom.bahnck@verizon.net http://www.csc.villanova.edu/~tbahnck/ introduction movie awards e-cards automated tests conclusion