Thursday 18 September 2014

How to create jar file using Command Prompt

How to create jar file using Command Prompt

1.Collect all file like hello.class inside any folder
2.Go to that folder
3.Type in cmd-E:\JARFile>set path=C:\Program Files\Java\jdk1.7.0_51\bin
4.Press Enter
5.Provide the file name on which you want to make a jar file
E:\JARFile>jar cf hello.jar hello.class

Ouput- You get the hello.jar file in your current folder, double click on this and use it

Wednesday 17 September 2014

In Selenumn Web Driver-Perform Different Actions in Once, Like: Drag-and-Drop, Sliding, Selecting Multiple Items.

Perform different actions in once, like: drag-and-drop, sliding, selecting multiple items.


In below example, we are performing drag And Drop of web-element
driver = new FirefoxDriver();
                driver.manage().window().maximize();
                driver.get("http://jqueryui.com/draggable/#sthash.4eGmtpmo.dpuf");
             driver.manage().timeouts().pageLoadTimeout(18, TimeUnit.SECONDS);
             driver.switchTo().frame(driver.findElement(By.className("demo-frame")));
             WebElement element =(new WebDriverWait(driver, 50))                         .until(ExpectedConditions.presenceOfElementLocated((By.id("draggable"))));
             Actions action = new Actions(driver);
             action.dragAndDropBy(element, 120, 150).build().perform();
Further details:-
public class Action {
    private static WebDriver driver;
    @Test
    public void droppable() {
        driver.get("http://jqueryui.com/demos/droppable/");

        WebElement draggable = driver.findElement(By.id("draggable"));
        WebElement droppable = driver.findElement(By.id("droppable"));
        new Actions(driver).dragAndDrop(draggable, droppable).build().perform();
    }

    @Test
    public void selectMultiple() throws InterruptedException {
        driver.get("http://jqueryui.com/demos/selectable/");

        List<WebElement> listItems = driver.findElements(By
                .cssSelector("ol#selectable *"));

        Actions builder = new Actions(driver);
        builder.clickAndHold(listItems.get(1)).clickAndHold(listItems.get(2))
                .click();

        Action selectMultiple = builder.build();
        selectMultiple.perform();
    }

    @Test
    public void sliding() {
        driver.get("http://jqueryui.com/demos/slider/");

        WebElement draggable = driver.findElement(By
                .className("ui-slider-handle"));
        new Actions(driver).dragAndDropBy(draggable, 120, 0).build().perform();
    }
}



 

Expert - Difference between Interface and Absract Class

Difference between Interface and Absract Class
Interface

  1. if we don't know anything about implementation just we have requirement specification than we should go fr interface
  2. inside interface every method is always public and abstract whether we are declaring or not. hence is also consider as
    100% pure abstract class
  3. We aren't declare interface method with the following modifiers
    public-> private, protect
    Abstract- final, static, synchronized, native,strict
  4. Every variable present inside interface is always public, static and final whether we are declarin or not
  5. We can't declare interface variable with the following modifiers
    private, protected, transient and volatile
  6. For interface variable compulsory we should perform initialization at the time of declaration otherwise we will get
    compile time error
  7. inside interface we can't declare instance and static blocks otherwise we will et complie time error
  8. inside interface we can't declare constructors
Abstract
  1. if we talking about implementation but not completely (partial implementation)
    than we should go for abstract class
  2. every method present in abstract class need not be public and abstract
    in addition to abstract method we can take concrete method also
  3. there are no restrictions on abstract class method modifiers
  4. The variable present inside abstract class need not be public static and final
  5. There are no res traction on abstract class variable modifier
  6. For abstract class variable it is not require to perform initialization at the time of declaration
  7. inside abstract class we can declare instance and static blocks.
  8. inside abstract class we can declare contractor, which will be executed at the time of child object creation

Tuesday 16 September 2014

Scrum agile methodology for understanding

Scrum agile methodology for understanding


Meetings:- Sprint Planning- Day 1/First half
·         Product Backlog prepared prior to meeting
·         First half- Teams selects items committing to complete
·         Additional discussion of PB occurs during actual Sprint
Sprint Planning – Day 1/Second Half
·         Occurs after first done-PO available for questions
·         Team solely responsible for deciding how to build
·         Tasks created/assigned-Sprint Backlog produced
Daily Scrum
·         Held every day during a sprint
·         Lasts 15 minutes
·         Team members reports to each other not Scrum master
·         Ask 3 question during meeting
·         What have you done since last daily scrum?
·         What will you do before the next daily scrum?
·         What obstacles are impeding your work?
·         Opportunity for team members to synchronize their work
Sprint Review
·         Team Presents done code for PO and stakeholders
·         Functionality not done is not shown
·         Feedback generated-PB may be reprioritized
·         Scrum Master sets next Sprint Review
Sprint Retrospective
·         Attends-SM and Team. PO is optional
·         Question-What went well and what can be improved?
·         SM helps in discovery-not provide answer
Visibility + Flexibility=Scrum
·         Time box-A period of time to finish a task, the end date is set and can’t be changed
·         Chickens-people that are not committed to the project and are not accountable for deliverables
·         Pigs- People who are accountable for the project’s success
·         Single Wring able Neck-This is the Product Owner


Roles
Scrum Team
·         Team is cross-functional and consist of 5-9 people
·         There are no set project roles within the team
·         Team defines tasks are assignments
·         Team is self-organizing and self-managing
·         Maintains the sprint backlog
·         Conducts the sprint review
Product Owner (PO)
·         Accountable for product success
·         Defines all product features
·         Responsible for prioritizing product features
·         Maintains the Product Backlog
·         Insures team working on highest valued features
Scrum Master (SM)
·         Holds daily 15 minutes team meeting daily scrum
·         Remove obstacles
·         Shields the team from external interference
·         Maintains the Sprint Burn down chart
·         Conducts sprint retrospective at the end of sprint
·         Is a facilitator not a manger


Tools
Task Board
·         White Board containing teams Sprint goals, backlog items tasks, tasks in progress Done items and the daily burn down chart
·         Scrum meeting best held around task board
·         Visible to everyone
Estimating
User Stories
·         A very high level definition of what the customer wants the system to do
·         Each story is captured as a separate item on the product backlog
·         User stories are not dependent on other stories
·         Story Template
·         As a user I want function so that desired result
·         Story example
·         As a user I want to print a recipe so that I can cook it
Story Points
·         A simple way to initially estimate level of the effect expected to develop
·         Story point are a relative measure of feature difficulty
·         Usually scored on a scale of 1-10 1=very easy through 10=very difficult
·         Example-send to a friend story points=2
·         Shopping cart story points=0


Business Value
·         Each user story in the product backlog should have a corresponding business values assigned
·         Typically assigned Low, Medium and High
·         PO prioritizes Backlog items by heights values
Estimate Team capacity
·         Capacity=Teammates productive Hrs x sprint days
·         Example- team size is 4, Product hrs are 5, sprint length is 30 days
·         Capacity=4(5*30)=600 hours
·         Note:-Account for vacation time during the sprint
Velocity
·         The rate at which team converts items to done in a single sprint –usually calculated in story ponts
Artifacts
Product Backlog PB
·         List of all desired product features
·         List can contain bugs and non-functional item
·         Product owner responsible for prioritizing
·         Items can be added by anyone at any time
·         Each item should have a business values assigned
·         Maintained by the product Owner
Sprint Backlog-SB
·         To do list also known as backlog item for the sprint
·         Created by the scrum team
·         Product owner has defined as highest priority
Burndown chart –BC
·         Chart showing how much work remaining in a sprint
·         Calculated in hours remaining
·         Maintained by the Scurm Master daily
Release Backlog –RB
·         Same as the product backlog , may involve one or more sprints dependent on determined Release date
Done=Potentially Shippable!
FAQ
·         Who decides when a release happens? At the end of any given Sprint the PO can initiate a Release
·         Who is the responsible for the managing the teams? They manage themselves
·         What is the length of a task? Should take no longer than 16 hours, if longer then the task should be broken further
·         Who manages obstacles? Primary responsibility is scrum master , however teams must learn to resolve their own issue, if not then escalated to SM
·         What are two of the biggest challenges in Scrum?
Team not self-managing, Scrum master managing not leading