Артем Кошелев "Качество кода автотестов"

  • Published on
    15-Jun-2015

  • View
    1.101

  • Download
    2

Embed Size (px)

DESCRIPTION

, . - , . , , .

Transcript

<ul><li> 1. - ., -, 30 2012 </li></ul> <p> 2. 2 3. 3 4. 4 5. 5 6. 6 7. 7 8. ( , ) , . , , .8 9. , , , , , , . 9 10. 10 11. 11 12. private String strMessage;private Integer iHeight;12 13. private BigBen londonClock;13 14. People.description14 15. people.getDescription() 15 16. 16 17. if ()..{.......}17 18. if ()........{................}18 19. if (){........}19 20. if (){........}20 21. try {elem.setHeader(selenium.getText(css=#name);try {elem.setLink(getHref(css=#id@href);list.add(elem);}catch (SeleniumException e) {log.error( !);}}catch (SeleniumException e) {log.error( !);}21 22. try {elem.setHeader(selenium.getText(css=#name);try {elem.setLink(getHref(css=#id@href);list.add(elem);}catch (SeleniumException e) {log.error( !);}}catch (SeleniumException e) {log.error( !);} 22 23. try {elem.setHeader(selenium.getText(css=#name);try {elem.setLink(getHref(css=#id@href);list.add(elem);} catch (SeleniumException e) {log.error( !);}} catch (SeleniumException e) {log.error( !);} 23 24. 24 25. 25 26. drawSprite(53, 320, 240)26 27. final int SCR_WIDTH = 640;final int SCR_HEIGHT = 480;final int SCR_X_CENTER =SCR_WIDTH/2;final int SCR_Y_CENTER =SCR_HEIGHT/2;final int SPRITE_CROSSHAIR = 53;drawSprite(SPRITE_CROSSHAIR,SCR_X_CENTER,SCR_Y_CENTER); 27 28. 28 29. 29 30. 30 31. 31 32. 32 33. 33 34. 34 35. 35 36. 36 37. 37 38. 38 39. 39 40. 40 41. 41 42. 42 43. 43 44. 44 45. 45 46. 46 47. 47 48. 48 49. 49 50. 50 51. 51 52. 52 53. 53 54. 54 55. 55 56. 56 57. 57 58. 58 59. 59 60. try { . . .} catch (Exception e) {}60 61. if () { fail(Aaaaaaaaaaaa} else {...}61 62. assertTrue( , true);62 63. public static final String SAINT_PETERSBURG = ; 63 64. 64 65. 65 66. 66 67. ?67 68. artkoshelev@yandex-team.ru@art_koshelev</p>