• Save
Automation patterns on practice
Upcoming SlideShare
Loading in...5
×
 

Automation patterns on practice

on

  • 2,215 views

Как надо правильно строить автоматизацию тестирования с нуля, что нужно применять, а то не нужно применять ...

Как надо правильно строить автоматизацию тестирования с нуля, что нужно применять, а то не нужно применять при проектировании архитектуры. Какие виды фреймворков бывают, что с ними надо делать. Все и много другое вы сможете найти в этой презентации

Statistics

Views

Total Views
2,215
Views on SlideShare
1,619
Embed Views
596

Actions

Likes
2
Downloads
0
Comments
1

4 Embeds 596

http://automated-testing.info 589
url_unknown 4
http://www.automated-testing.info 2
http://autotest.aexchecker.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • why it doesn't downloadable? Is this a secret information?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Automation patterns on practice Automation patterns on practice Presentation Transcript

  • Presented by: MykolaKolisnyk
    1
    Automation Patterns on Practice. Automation Architecture creation.
  • What’s it all about?
    • Framework structure
    • Framework types View slide
    • Design patterns View slide
    • Behavioral patterns in automation
  • Framework is the core
    06.02.11
    Libraries
    Tests
    Engine
    Configs
    Reporting
    Resources
    Core components
  • Framework types
    06.02.11
    Functional decomposition
    Object-based
    Data-driven
    Keyword-driven
    Behavior-driven
    Model-based
    Hybrid
  • Functional Decomposition
  • «Data-Driven» Approach
  • Object-based Framework
    TestSetClass
    • Tests
    • Run()
    List of
    TestClass
    • Actions
    • Run()
    List of
    ActionClass
    • Run()
    for each Test in this.Tests
    for each Action in Test.Actions
    Action.Run()
  • «Keyword-Driven» Approach
  • Behavior-driven
    Text instruction
    WhenI log into the system as “login”/”password”
    Actual Code
    When/log into the system as “(.*)”/”(.*)”/do|login,password|
    app.login( login , password )‏
    end
    class App
    def login( username , password )‏
    # Some actions
    end
    end
  • Model-based framefork
    Action 0-1
    Action 0-1
    Initial state
    Action 5-1
    State 1
    State 5
    Action 1-1
    Action 2-2
    Action 2-1
    State 2
    State 4
    Action 0-1
    State 3
    Action 3-1
    Final State
  • Patterns
    06.02.11
  • What does pattern mean?
    06.02.11
    Pattern is a typical
    solution for typical task
  • Global Objects
    06.02.11
    • Should be only one in the system
    • Should be initialized only once
    • Should not be modified from outside
    Engine driver
    Config
  • Singleton
    06.02.11
    Local instance
    Private constructor
    All operations are done via local instance
  • Immutable & Lazy initialization
    06.02.11
    Filled only during initialization
    Initialized at first method call
  • Engine-specific patterns
    06.02.11
    • Each unit implementation should be abstracted from interface
    • Units should represent actual command to execute
    Engine driver
    NOTE: applicable for Object-based, Keyword-Driven,
    Behavior-driven, Model-based approaches
  • Command & Interface & Delegate
    06.02.11
    Common interface for each class (Interface)
    Object represents the action (Command)
    ActionClassA
    • Run()
    TestClass
    • Actions
    • Run()
    List of
    ActionClass
    • Run()
    ActionClassB
    • Run()
    ActionClassC
    • Run()
    Actual execution is delegated to aligned class objects (Delegate)
  • Functional design
    06.02.11
    Independent functions
  • Resource-specific patterns
    06.02.11
    • Resource should represent logical structure rather than physical
    • If engine driver is used it should be used implicitly
    Resources
  • Page object
    06.02.11
    Objects functionality is extended via external class (Decorator/Wrapper)
  • Page Factory
    06.02.11
    Implicit page object initialization
    Usage example:
  • Anti-Patterns
    06.02.11
  • Big ball of mud
    06.02.11
  • God object
    06.02.11
    Too much methods in one class
  • Hard & Soft Coding
    06.02.11
    Magic numbers
    Configuration hell
  • Dependency hell
    06.02.11
    Test 8
    Test 1
    Test 7
    Test 9
    Test 2
    Test 6
    Test 3
    Test 5
    Test 4
  • Summary
    “Framework”, “pattern”, “architecture” are not magic spells
    Framework identifies how we structure overall solution
    Each framework type uses specific set of patterns
    Pattern is the solution for specific task
    Good solution is the balance between complexity and simplicity
    06.02.11
  • 06.02.11
    Узнай больше на