Tuesday

Reporting API - Selenium / Test Automation framework



I have been wanting to use this reporting API ever since I heard of it, finally I got my hands dirty with the version 2.0 and I must say it's pretty impressive - If you use either Java or .Net for testing then this is what you need - Extent Reports

This is how a sample html report looks like HTML report

I shall not go about rewording how to use it, their documentation is pretty good: http://relevantcodes.com/Tools/ExtentReports2/ExtentJava.html

Quick snapshot:

Source: http://relevantcodes.com/extentreports-for-selenium/

Happy Test Reporting :P

Friday

Intellij Musing - Test Automation framework with Selenium Cucumber TestNG Maven Jenkins and GIT



  1. Pull the project from the scm repository in my case Git
  2. In IntelliJ File -> New -> Project from existing sources and navigate to the root directory
  3. Choose Import from external mode - Maven/Eclipse as need be 
  4. Update the pom.xml
  5. Maven clean run / Generate source and Update Folders

Options to run:
  • Right click and run the individual feature file
  • Right click and run the TestNG.xml file - To run tests in parallel
  • Right click and run the individual cucumber runner file - To run tagged tests



    Reports:
    1. Cucumber pretty format - Index.html
    2. Cucumber JSON report
    3. Customized html report

    Tuesday

    Facebook Infer - Detect bugs before you ship



    What is Infer?
    An Opensource tool to detect bugs in Android and iOS apps before they ship - http://fbinfer.com/

    Documentation (Getting Started Guide) - http://fbinfer.com/docs/getting-started.html

    Quotes from "Peter O’Hearn" - engineering manager at Facebook
    • When you have to write a software test, often you are going after a specific bug. That means you’ll need to exercise all of the funny cases that will get you to that bug. Static analysis allows you to execute the code symbolically
    • It’s important to know that while things like Infer have made us faster and more successful, they’re not pieces of the Facebook competitive differentiator
    • another huge benefit of open source is in recruiting. By showing you can open source stuff if you built it at Facebook, then you get excellent, independent engineers who don’t require as much ramp up time, since they’re used to working on these open source projects. So there’s far less training.
    Source:
    https://code.facebook.com/posts/1648953042007882/open-sourcing-facebook-infer-identify-bugs-before-you-ship/

    http://fbinfer.com/

    https://ssl.www8.hp.com/hpmatter/issue-no-5-summer-2015/how-move-fast-mobile-age-qa-peter-ohearn-and-meghan-marques-facebook



    Switching from Eclipse to IntelliJ

    Image Source: http://www.nevndave.com/2005/11/



    So I have done this thrice but never succeeded in switching for obvious reasons.
    This time I did and I must say I was missing out on a lot of cool stuff, if you are doing what I am here is something that might help:

    Switching from Eclipse to IntelliJ :
    https://www.jetbrains.com/idea/help/eclipse.html

    and of-course the shortcuts:
    https://www.jetbrains.com/idea/help/map-of-shortcuts.html


    Eclipse
    IntelliJ IDEA
    Action
    Shortcut
    Action
    Shortcut
    Code completion
    Ctrl+Space
    Basic completion
    Ctrl+Space
    Smart completion
    Ctrl+Shift+Space
    Statement completion
    Ctrl+Shift+Enter
    Quick access
    Ctrl+3
    Search everywhere
    Shift x 2
    Maximize active view or editor
    Ctrl+M
    Hide all tool windows
    Ctrl+Shift+F12
    Open type
    Ctrl+Shift+T
    Navigate to class
    Ctrl+N
    Open resource
    Ctrl+Shift+R
    Navigate to file
    Ctrl+Shift+N
    Navigate to symbol
    Ctrl+Shift+Alt+N
    Next view
    Ctrl+F7
    Recent files
    Ctrl+E
    Switcher
    Ctrl+Tab
    Quick outline
    Ctrl+O
    File structure
    Ctrl+F12
    Move lines
    Alt+Up/Down
    Move lines
    Shift+Alt+Up/Shift+Alt+Down
    Delete lines
    Ctrl+D
    Delete lines
    Ctrl+Y
    Quick fix
    Ctrl+1
    Show intention action
    Alt+Enter
    Quick switch editor
    Ctrl+E
    Switcher
    Ctrl+Tab
    Recent files
    Ctrl+E
    Quick hierarchy
    Ctrl+T
    Navigate to type hierarchy
    Ctrl+H
    Navigate to method hierarchy
    Ctrl+Shift+H
    Show UML popup
    Ctrl+Alt+U
    Last edit location
    Ctrl+Q
    Last edit location
    Ctrl+Shift+Backspace
    Next editor
    Ctrl+F6
    Select next tab
    Alt+Right
    Run
    Ctrl+Shift+F11
    Run
    Shift+F10
    Debug
    Ctrl+F11
    Debug
    Shift+F9
    Correct indentation
    Ctrl+I
    Auto-indent lines
    Ctrl+Alt+I
    Format
    Ctrl+Shift+F
    Reformat code
    Ctrl+Alt+L
    Surround with
    Ctrl+Alt+Z
    Surround with
    Ctrl+Alt+T
    Surround with live template
    Ctrl+Alt+J
    Open declaration
    F3
    Navigate to declaration
    Ctrl+B
    Quick definition
    Ctrl+Shift+I
    Open type hierarchy
    F4
    Navigate to type hierarchy
    Ctrl+H
    Show UML popup
    Ctrl+Alt+U
    References in workspace
    Ctrl+Shift+G
    Find usages
    Alt+F7
    Show usages
    Ctrl+Alt+F7
    Find usages settings
    Ctrl+Shift+Alt+F7
    Open search dialog
    Ctrl+H
    Find in path
    Ctrl+Shift+F
    Occurrences in file
    Ctrl+Alt+U
    Highlight usages in file
    Ctrl+Shift+F7
    Copy lines
    Ctrl+Alt+Down
    Duplicate lines
    Ctrl+D
    Extract local variable
    Ctrl+Alt+L
    Extract variable
    Ctrl+Alt+V
    Assign to field
    Ctrl+2/Ctrl+F
    Extract field
    Ctrl+Alt+F
    Show refactor quick menu
    Ctrl+Alt+T
    Refactor this
    Ctrl+Shift+Alt+T
    Rename
    Ctrl+Alt+R
    Rename
    Shift+F6
    Go to line
    Ctrl+L
    Navigate to line
    Ctrl+G
    Structured selection
    Shift+Alt+Up/Shift+Alt+Down
    Select word at caret
    Ctrl+W/Ctrl+Shift+W
    Find next
    Ctrl+J
    Find next
    F3
    Show in
    Ctrl+Alt+W
    Select in
    Alt+F1
    Back
    Ctrl+[
    Back
    Ctrl+Alt+Left
    Forward
    Ctrl+]
    Forward
    Ctrl+Alt+Right