Friday, August 23, 2019

selenium - wait


  • why?

The elements in a web page load time can vary.
Using "wait", we can enable the script to wait some time before throwing "NO Such Element" exception

C#

  • Thread.Sleep()

Thread.Sleep(3000);
Thread.Sleep(new TimeSpan(0,0,3));
Thread.Sleep(TimeSpan.FromSeconds(3));

Not a good practice. The waiting time is been hard coded and no matter what, the program will wait the time span.
  • Implicit Waits:

Implicit waits tell to the WebDriver to poll the DOM ( frequency is 250ms) for certain amount of time before it throws an exception, if the element is not found immediatelly. That means if the element is found immediatelly, it won't wait. If the elemement is not found immediately, it will re run the find element every 250ms till it find the element and quit. Or if the element is not found during the time, it will throw an exception after the timeout.

Once we set the implicit wait, it will apply to the whole live web driver instance. That means for every finding element operation, there will be an implicit wait.

But as we know, different element has different loading time. For some elements, if it is not been found immediately, we want it stop and quit. We don't want to wait the extra time. And for some other elements, we want it to wait longer time, not the set time in implicit wait.

Implicit wait is flexible than Thread Sleep. But still not a good choice.

driver.Manage().Timeouts().ImplicitWait = new TimeSpan(0,0,5);
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
  • Explicit Wait:
Explicit waits are confined to a particular web element. Explicit Wait is code you define to wait for a certain condition to occur before proceeding further in the code. If the element is not found during the wait, excepation will be thrown. The polling frequency is 500ms. Explicit Wait is only applied to the specific elemnt.

c# install Dotnetseleniumextras.waithelper

WebDriverWait wait = new WebDriverWait(driver,TimeSpan.FromSeconds(10));

IWebElement element = wait.Until(driver => driver.FindElement(By.Name("q")));

Also we can use try catch to catch the exception.

  • Fluent Wait
a class in selenium api. Using Fluent Wait, you can set wait for a specific element, set the polling frequency, max wait time and set to ignore specific exceptions.








Wednesday, August 21, 2019

selenium - xpath

ps:
single slash / : absolute path,from root
double slash //: relative path,from anywhere

Xpath=//tagname[@attribute='value']



  • DOM

The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects:
DOM HTML tree


  • XPath

defined as XML path. It is a syntax or language for finding any element on the web page using XML path expression. XPath is used to find the location of any element on a webpage using HTML DOM structure. The basic format of XPath is explained below with screen shot.
XPath contains the path of the element situated at the web page. Standard syntax for creating XPath is.

Xpath=//tagname[@attribute='value']

// : Select current node.
Tagname: Tagname of the particular node.
@: Select attribute.
Attribute: Attribute name of the node.
Value: Value of the attribute.

1) Basic XPath:
XPath expression select nodes or list of nodes on the basis of attributes like ID , Name, Classname, etc. from the XML document as illustrated below.

Xpath=//input[@name='uid']

2) Contains():
Contains() is a method used in XPath expression. It is used when the value of any attribute changes dynamically, for example, login information.
The contain feature has an ability to find the element with partial text as shown in below example.

Xpath=//*[contains(@id,'message')]

3) Using OR & AND:

Xpath=//input[@type='submit' and @name='btnLogin']

4) Start-with function:

Xpath=//*[starts-with(@id,'message')]

5) Text():

Xpath=//td[text()='UserID']

6) XPath relative

XPath=//*[@id='seleniumsetupTable']/tbody/tr[3]/td[2]

7) table

Predicates are numbers or HTML attributes enclosed in a pair of square brackets "[ ]" that distinguish a child element from its siblings. 

//table/tbody/tr[2]/td[2]
//table/tbody/tr[2]/td[2]/table/tbody/tr/td[2]
//table[@width=\"270\"]/tbody/tr[4]/td

8)How To Handle Dynamic Tables In Selenium Webdriver
https://www.guru99.com/handling-dynamic-selenium-webdriver.html

//To locate table.
  IWebElement mytable = driver.FindElement(By.xpath("html/body/table/tbody"));

  //To locate rows of table.
  IList < WebElement > rows_table = mytable.FindElements(By.tagName("tr"));

  //To calculate no of rows In table.
  int rows_count = rows_table.Count();

IWebElement tableElement = driver.FindElement(By.XPath("/html/body/table"));
IList<IWebElement> tableRow = tableElement.FindElements(By.TagName("tr"));
IList<IWebElement> rowTD;
foreach (IWebElement row in tableRow)
{
   rowTD = row.FindElements(By.TagName("td"));

   if(rowTD.Count > 9)
   {
      if(rowTD[8].Text.Equals("Suspended") && rowTD[10].Text.Equals("Publishing Failed");
      //test failed
   }
}

9)Axes
A step consists of:

an axis (defines the tree-relationship between the selected nodes and the current node)
a node-test (identifies a node within an axis)
zero or more predicates (to further refine the selected node-set)

preceding, following,
parent,child
ancestor,descendant,
preceding-sibling,following-sibling

axisname::nodetest[predicate]


//xxxxx//following-sibling::td[1]
//xxxxx//preceding-sibling::td[@class='xx']//i[@value='xxxx']

10)Chained Xpath
//xxxx//xxxx//xxx

11) locate element in an array
(//xxx[xxx])[x]







git


https://help.github.com/en/articles/adding-an-existing-project-to-github-using-the-command-line

  • Distributed Version Control System
  • Collaboration platform
  • Who made what changes and When
  • Reverse back
  • local and remote repository

git command  most used


echo "# xxxx" >> README.md

git init
Initialize a local Git repository(folder)
git add [file]
Add a file to the staging area, add file to index
git add .
Add all the files 
git rm -r [file-name.txt]
Remove a file (or folder)
git status
Check status of working tree
git commit -m "[commit message]"
Commit changes in index
(touch .gitignore)

git branch
List branches (the asterisk denotes the current branch)
git branch [branch name]
Create a new branch
git checkout [branch name]
Switch to a branch
git merge [source branch] [target branch]
Merge a branch into a target branch

git remote add origin  ssh://git@github.com/[username]/[repository-name].git
Add a remote repository
In Git, "origin" is a shorthand name for the remote repository that a project was originally cloned from. ... Note that origin is by no means a "magical" name, but just a standard convention.
$ git remote -v
# Verifies the new remote URL
git push origin [branch name]
Push a branch to your remote repository
git push -u origin [branch name]
Push changes to remote repository (and remember the branch)
-u option local branch is linked with the remote branch automatically. The advantage is, you may use git pull without any arguments.

git push
Push changes to remote repository (remembered branch)

git clone ssh://git@github.com/[username]/[repository-name].git
Create a local copy of a remote repository
git pull
Update local repository to the newest commit
git pull origin [branch name]
Pull changes from remote repository


git ls-tree --full-tree --name-only HEAD
list the files in branch

git diff
list the difference between branch

How to Contribute and Collaborate

fork the target repo to your own account->clone the remote repo to your local machine->work on your module or make some changes->add your work to the staging area (git add.)->commit your work(git commit -m 'message')->push your work to your fork->create a pull request from browser->pull request will be approved by the owner and added to the main branch






Saturday, August 17, 2019

C# -1

1Difference between static and non static class in c#
A C# static class is a class that can't be instantiated. The sole purpose of the class is to provide blueprints of its inherited classes. A static class is created using the "static" keyword in C#.

  • A static class can contain static members only, including static methods, static constructors, and static properties; You can‘t create an object for the static class.
  • a Non-static class can have static members, including static methods, constructors and static properties; You can create an object for the non-static class. You can only access the static members by the class name, not the instance name. 
  • It is more typical to declare a non-static class with some static members, than to declare an entire class as static.

Example of static class
public static class TemperatureConverter
{
    public static double CelsiusToFahrenheit(string temperatureCelsius)
    {
        ...........
    }
    }
}

class TestTemperatureConverter
{
    static void Main()
    {
        ....
        switch (selection)
        {
            case "1":
                F = TemperatureConverter.CelsiusToFahrenheit(Console.ReadLine());
                break;
            .....
        }
    }
}

Example of static members(static method, static data) in non-static class
public class Automobile
{
    public static int NumberOfWheels = 4;
    public static int SizeOfGasTank
    {
        get
        {
            return 15;
        }
    }
    // Other non-static fields and properties...
}

Automobile.Drive();
int i = Automobile.NumberOfWheels;

2. Create an instance of class. an example of instance of class
public class Addition
{

}


3. What's a constructor in c#

  • the method to initialize the class data members
  • gets automatically invoked whenever an instance of the class is created
  • a method whose name is the same as the name of its type. Its method signature includes only the method name and its parameter list; it does not include a return type
  • If you don't provide a constructor for your class, C# creates one by default that instantiates the object and sets member variables to the default values as listed in the Default Values Table. 
  • A class can have any number of constructors
  • parameters for constructors can be none, some and object
Example
class Geek
{
    String name;
    int id;

    Geek()
    {
     }
    Geek(String name, int id)
    {
        this.name = name;
        this.id = id;
    }
    Geeks(Geeks s)
    {
        name = s.name;
        id = s.id;
    }
}

Geek geek1 = new Geek();
Geek geek2 = new Geek ("test", 2);
Geek geek3 = new Geek (geek2);

  • Static constructor<->Instance constructor
Instance constructors are used to create and initialize any instance member variables.


Static constructors
are used to initialize a static class, or static variables in a non-static class.
static constructors are parameterless
cannot be called directly, only be called by the CLR.
It is invoked automatically before the first instance is created or any static members are referenced.

4. What's Method overloading

  • the common way of implementing polymorphism. 
  • do method overloading by defining two or more functions in a class sharing the same name. (same name, different function)
  • distinguish the methods with different method signatures. i.e. the number of the parameters, order of the parameters, and data types of the parameters 
  • different method signatures can have different return type. But you cannot declare two methods with the same signature and different return type.
Example
  public int Add(int a, int b) 
    {
        int sum = a + b;
        return sum;
    }
    public int Add(int a, int b, int c) 
    {
        int sum = a + b + c;
        return sum;
    }
   public double Add(double a, double b, double c) 
    {
        double sum = a + b + c;
        return sum;
    }

5. Data types in c#

Data types in C# is mainly divided into three categories
Value Data Types, Reference Data Types,Pointer Data Type

  • Value Data Types, derived from the class System.ValueType
most often used, fixed length
TypeRepresentsRangeDefault Value
boolBoolean valueTrue or FalseFalse
byte8-bit unsigned integer0 to 2550
char16-bit Unicode characterU +0000 to U +ffff'\0'
decimal128-bit precise decimal values with 28-29 significant digits(-7.9 x 1028 to 7.9 x 1028) / 100 to 280.0M
double64-bit double-precision floating point type(+/-)5.0 x 10-324 to (+/-)1.7 x 103080.0D
float32-bit single-precision floating point type-3.4 x 1038 to + 3.4 x 10380.0F
int32-bit signed integer type-2,147,483,648 to 2,147,483,6470
long64-bit signed integer type-9,223,372,036,854,775,808 to 9,223,372,036,854,775,8070L
  • Reference Type
don't store the variable value directly
contain a memory address of variable value, refer to a memory location
The built-in reference types are string, object

string type: allows you to assign any string values to a variable,  represents a sequence of Unicode charactersstring s1 = "hello";
object type: it is the base class for all the data types in C#


  • Pointer type

contain a memory address of the variable value.
To get the pointer details we have a two symbols ampersand (&) and asterisk (*).
ampersand (&): It is Known as Address Operator. It is used to determine the address of a variable.
asterisk (*): It also known as Indirection Operator. It is used to access the value of an address.
Syntax
type* identifier;

int* n=&b;


Thursday, August 15, 2019

Jira plus Zephyr


  • Jira

Project management tool for agile development
scrum or kanban template
Issue->Child Issue
Issue can be of different type

Issue life cycle


  • story points

to measure how much effort needed to accomplish one task
not hours

0,1,1,2,3,5,8,13,21
do rough estimates
learn from past estimates, relatively size, relatively


  • Zephyr (app on Jira)Test Case Management Tool 
Native Inside Jira – Manual & Automated Software Testing with Scalability, Advanced Reporting & More

To  Streamline the test cycle phases
Requirement ->Test plan->test design cases->test execution->test report
Test issues can be created, executed, tracked and reported on just like any other Jira issue

integrating with Selenium(automation testing) and Cucumber
SoapUI Pro, Test Complete, Crossbrowser Testing and LoadNinja
jenkins and bamboo-continuous integration tool






Wednesday, August 14, 2019

What is Browserstack, Saucelab, Simulator & Emulator?


  • BrowserStack

World's leading cross browser testing tool, Web app testing
Interactive web-based testing on 2000+ browsers , operational system and real devices instantly. Say goodbye to your lab of devices and virtual machines.

  • Saucelab

Cloud based testing platform, Sauce Labs ensures your favorite mobile apps and websites work flawlessly on every browser, operating system, and device.

  • Emulators

Emulators mimic your target device’s hardware and software on your workstation. Android Emulator (by Android Developer Studio) is a popular example.
The emulator mimics the target/mobile device processor. Then it translates its ISA into the one used by your computer, through a process called binary translation. This binary (ABI–or Application Binary Interface) can be equipped with a compatible operating system and APIs.
Capabilities: The emulator can give you virtual device instances with near-native capabilities and extended controls to adjust the devices'physical sensors, battery state, geolocation, and more.
Limitations: These near-native capabilities come with a significant performance overhead, mostly due to binary translation.

  • Simulators

Simulators let you run programs that were not made for your computer’s OS. In the context of this post, ‘simulator’ refers to the iPhone and iPad simulator in XCode.
The iOS simulator sits on top of your operating system. From there, it mimics iOS and runs your app inside it. This process is viewable in an iPhone or iPad-like window.
Capabilities: The iOS simulator is significantly faster than Android emulator, purely because there’s no machine-language translation involved.
Limitations: The simulator cannot mimic real ios devices like battery states or cellular interrupts, unlike the Android emulator.
.You also cannot use the iOS simulator on platforms other than macOS. This is because the simulator needs Apple’s native Cocoa API–a massive library of frameworks–to handle GUI, runtime, and more.
Porting Cocoa to a different platform is far too much trouble. Instead, developers virtualize macOS on their computer hardware–or procure a MacBook.


Tuesday, August 13, 2019

Security testing


  • What is Security Testing

a type of software testing that intends to uncover vulnerabilities of the system and determine that its data and resources are protected from possible intruders.

  • Types of Security Testing

What is Security Testing: Complete Tutorial

  • How to do Security Testing

corresponding Security processes to be adopted for every phase in SDLC

 What is Security Testing: Complete Tutorial

Security Test should start as early as possible

The test plan should include
Security-related test cases or scenarios
Test Data related to security testing
Test Tools required for security testing
Analysis of various tests outputs from different security tools
  • OWASP Open Web Application Security Project (OWASP) 
Testing Guide: https://www.owasp.org/index.php/Category:OWASP_Testing_Project
https://www.owasp.org/index.php/OWASP_Testing_Guide_v4_Table_of_Contents

  • Tools

netsparker: Vulnerability Scanning tool, scan a system against known vulnerability signatures.

Acunetix:  penetration testing,  simulates an attack from a malicious hacker,  check for potential vulnerabilities to an external hacking attempt

.....



Performance Testing


  • What is Performance testing

Non Functional Testing
To ensure software applications will perform well under their expected workload. like its response time, reliability, resource usage and scalability
demonstrate that your software system meets certain pre-defined performance criteria. 

Speed - Determines whether the application responds quickly
Scalability - Determines maximum user load the software application can handle.
Stability - Determines if the application is stable under varying loads


  • Types of Performance testing

Load testing - checks the application's ability to perform under anticipated user loads. The objective is to identify performance bottlenecks before the software application goes live.Some common performance bottlenecks are CPU utilization,
Memory utilization,Network utilization,Operating System limitations,Disk usage.
Stress testing - involves testing an application under extreme workloads to see how it handles high traffic or data processing. The objective is to identify the breaking point of an application.
Endurance testing - is done to make sure the software can handle the expected load over a long period of time.
Spike testing - tests the software's reaction to sudden large spikes in the load generated by users.
Volume testing - Under Volume Testing large no. of. Data is populated in a database and the overall software system's behavior is monitored. The objective is to check software application's performance under varying database volumes.
Scalability testing - The objective of scalability testing is to determine the software application's effectiveness in "scaling up" to support an increase in user load. It helps plan capacity addition to your software system.

  • When to do performance testing

Performance Testing is always done for client-server based systems only.


  • How to do Performance Testing

Performance Testing Tutorial: Types, Process & Important Metrics


  • Tools
LoadNinja – is revolutionizing the way we load test. This cloud-based load testing tool empowers teams to record & instantly playback comprehensive load tests, without complex dynamic correlation & run these load tests in real browsers at scale. Teams are able to increase test coverage. & cut load testing time by over 60%.
    NeoLoad - is the performance testing platform designed for DevOps that seamlessly integrates into your existing Continuous Delivery pipeline. With NeoLoad, teams test 10x faster than with traditional tools to meet the new level of requirements across the full Agile software development lifecycle - from component to full system-wide load tests.
      HP LoadRunner - is the most popular performance testing tools on the market today. This tool is capable of simulating hundreds of thousands of users, putting applications under real-life loads to determine their behavior under expected loads. Loadrunner features a virtual user generator which simulates the actions of live human users.
        Jmeter - one of the leading tools used for load testing of web and application servers.



        What is Docker?


        • World leading container software platform

        Software runs on different platforms
        Docker allows developers  to put all of the parts in a package->create a docker file and build an image.
        Then Docker will "ship" this package to different platforms.

        Other users can pull the image and create a container.

         


        •  VM vs Container
        Hypervisors vitual machine monior, Hypervisors have multiple Virtual machines on the same host, VMs decreased the waiting time for deploying code and bug fixing in a big manner, but the real game changer was Docker containers.
        In my last testing job, we used vmware to test software in different OS.


        Compared to VM, Containers platform is more light and efficiency.
        Container: an image is a template, and a container is a copy of that template.




        What is Cucumber, Gherkins, Spec flow


        • What is Cucumber?

        Cucumber is a tool that supports Behavior Driven Development (BDD). It offers a way to write tests that anybody can understand, regardless of their technical knowledge.
        In BDD, whatever you write tests in Given-When-Then steps.


        • Gherkin is the language that Cucumber uses to define test cases. 
        • SpecFlow is Official version of Cucumber

        Feature: Withdraw Money from ATM

            A user with an account at a bank would like to withdraw money from an ATM.

            Provided he has a valid account and debit or credit card, he should be allowed to make the transaction. The ATM will tend the requested amount of money, return his card, and subtract amount of the withdrawal from the user's account.

            Scenario: Scenario 1
                Given preconditions
                When actions
                Then results

            Scenario: Scenario 2

        CICD--what is devops

        From guru99
        Devops->Fast delivery


        • What is DevOps?

        collaborations between development (developer+tester)and operations team
        increases an organization's speed to deliver applications and services.



        • Why DevOps

        DevOps allows Agile Development Teams to implement Continuous Integration and Continuous Delivery.
        H












        • How DevOps


        Above diagram shows the DevOps lifecycle

        Continuous and Automation
        DevOps Maturity: deploying all the way into production without any human intervention

        Continuous integration :the first step down the path toward DevOps maturity.
        Continuous Delivery
        Continuous Deployment


        • Continuous Integration
        Every Commit automatically triggers a new build. Then the build will be automatically deployed to testing server for testing. Developers will get frequent feedback. And then continuous release

        Automation Testing


        CI Tools: Jenkins, Atlassian Bamboo

        Jenkins is open source, robust , widely used. It support lots of plug-ins.












        What is TDD, BDD


        Learning from guru99

        TDD, test driven development, test first development, running test before development

        Suitable for "detailed specification"

        Two types
        • TDD test driven development, normally means Developer TDD
        • BDD Behavior driven development, also called ATDD acceptance test driven development

        BDD vs TDD
        Test Driven Development (TDD): Learn with Example


        From the above diagram, we can see that 
        When the team receives a new function requirement
        1. BDD testers
        testers design acceptance test cases according to requirement. Only If the test failed, developers would write new code.
        2. TDD developer
        developers need to write new code to fulfill the new requirement
        design automated unit test first, then run the test and if the test failed, do refactoring

        add test->run test->fail then refactoring
        The primary goal of TDD is to make the code clearer, simple and bug-free.

        More quality code



        Friday, August 9, 2019

        What is IaaS, PaaS, SaaS, FaaS

        IaaS Infrastructure as a service
        Infrastructure: Server, Network, Storage, virtualization
        e.g. Google compute engine, AWS ec2

        PaaS Platform as a service
        Platform: O/S, web server , database (programming language execution environment)
        used by developer, only need to manage software and data
        e.g. Google app engine, windows azure, AWS beanstalk

        FaaS Fuction as a service, e.g. AWS lamba
        provides a platform allowing customers to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure
        Building an application following this model is one way of achieving a "serverless" architecture, and is typically used when building microservices applications.

        SaaS Software as a service
        Software: application
        used by end user, No need to install any software on PC
        e.g. Google apps, gmail, google doc, windows 365, sales force

        Cloud Providers: aws, google cloud, icloud,


        Differences between SaaS, PaaS, & IaaS






        Defects Management

        When logging a defect, which information should be included?

        Defect_ID
        Defect Description/title - Detailed description of the defect including information about the module in which defect was found.
        Version - Version of the application in which defect was found.
        • Reproduce Steps - Detailed steps along with screenshots with which the developer can reproduce the defects.
        Expected Result, Actual Result
        Date Raised - Date when the defect is raised
        Reference- where in you Provide reference to the documents like . requirements, design, architecture or maybe even screenshots of the error to help understand the defect
        Detected By
        Status - Status of the defect
        Fixed by - Name/ID of the developer who fixed it
        Date Closed - Date when the defect is closed
        Severity
        Priority


        • Severity VS Priority

        Severity describes the impact of the defect on the application/system,  for example, the system is still working or broke down.
        Critical: Nothing can proceed further
        Major: Certain parts of the system remain functional
        Medium: The system is still functional
        Low: It won't cause any major break-down of the system

        Priority is defined as the order in which a defect should be fixed. Higher the priority the sooner the defect should be resolved.
        Low: The Defect is an irritant but repair can be done once the more serious Defect has been fixed
        Medium: During the normal course of the development activities defect should be resolved. It can wait until a new version is created
        High: The defect must be resolved as soon as possible as it affects the system severely and cannot be used until it is fixed

        Some defects may be low severity, but high priority. For example, wrong company log doesn't affect the major function, but it definitely need be corrected before releasing.

        Some defects may be high severity, but low priority. For example, typing random symbols in number text box may cause system crash, but it is a rare case. Then it's a low priority defect.

        QA can't decide the severity and priority. Normally product manger will be responsible for that.


        • Defect Status

        New, Assigned
        Open, Fixed, Failed, Confirmed/Verified, Closed, Reopened
        Duplicate, Not a Defect
        Deferred, Rejected


        QA->QA Lead (approved)->Dev Lead, PM(reviewed)->Dev (Assigned, Fixed, Rejected)->QA(retest,pass,failed)->Dev










        Types of testing

        Get more understanding on some terminology which I was confused
        • Differences between Alpha Testing, Beta Testing, UAT user acceptance testing

        Alpha Testing: At the end of development, in House testing, Visual or simulation user environment, Done by QA or other team members

        Beta Testing: Last step before releasing, Done by wildly end users, in user's environment

        UAT user acceptance testing: Done by client or user, Verify if the system meets customer requirement. Alpha testing and Beta testing are both user acceptance testing.

        In Agile development, UAT can be done in any phase.

        • Sanity testing vs Smoke testing
        diagram from guru99
        Sanity Testing Vs Smoke Testing: Introduction & Differences
        Sanity Testing: 

        testing new functionalities or minor changes, new fixes, relevant areas which may be affected by the changes
        a subset of regression testing that focuses on one or a few areas of functionality
        narrow and deep
        unscripted, rough set of test cases
        like specialized health check up

        Smoke Testing:

        first thing to be done on a new build, decide if the build will be accepted or rejected for deep testing
        test the most critical basic functionality
        wide and shallow testing
        scripted either written or automated
        a subset of acceptance testing
        like General Health Check Up

        holds high regards in SCRUM and Agile
        individual QA's perform this testing for the stories that they own, the first 2-3 criteria of each user story 
        automation

        Smoke Test Cycle

        As per the needs of testing, you may have to execute both Sanity and Smoke Tests in the software build. In such cases, you will first execute Smoke tests and then go ahead with Sanity Testing. In industry, test cases for Sanity Testing are commonly combined with that for smoke tests, to speed up test execution. Hence, it's a common that the terms are often confused and used interchangeably.


        • ad hoc testing
        random testing. Error Guessing. Error guessing can be done by the people having enough experience on the system to "guess" the most likely source of errors.

        • usability testing
        who: a small set of target end-users
        what: focuses on the user's ease to use the application, if user friendly
        when: during the initial design phase of SDLC


        • exploratory test
        who: testers
        what: test design and test execution at the same time, testing as "thinking" activity
        when: test cases are not created, with or without requirement

        • unit test
        unit test:
        white box testing
        usually done in development
        to isolate a section of code and verify its correctness

        tools: Junit, Nunit













        Wednesday, August 7, 2019

        Agile Methodology

        Agile Methodology

        The general and typical V model or water fall model were used years ago. Nowadays more and more software companies use Agile Method to develop products.

        What is Agile Methodology?
        (From Wiki)
        Agile software development is an approach to software development under which requirements and solutions evolve through the collaborative effort of self-organizing and cross-functional teams and their customer(s)/end user(s). It advocates adaptive planning, evolutionary development, early delivery, and continual improvement, and it encourages rapid and flexible response to change.
        It is iterative, incremental and evolutionary.

        Why Agile Methodology?

        • High customer satisfaction ( Agile development method gives high priority to customer participation, from the very beginning of the development cycle. The client is involved at every step so that they have a product that they are happy with at the end. )
        • Collaboration, Communication & Efficiency (Agile development method  asks all the team members to work together and encourages open face to face communication. The regular meeting enables every team member to be at the same page and keeps the project transparent. )
        • High product quality (The testing is done in development cycle regularly, so the defects can be caught in time. Changes can be made quicker and throughout the development process according to client's requirement. Incremental development results in small incremental releases with each release depending on previous functionality. Rigorous testing of each release to ensure software quality is maximum. )

        How to apply Agile methodology?
        Scrum is an Agile Framework for completing a Complex project. There are many frameworks in Agile. Scrum is one of the most important frameworks.Scrum model is iterative and flexible. 

        Scrum cross-functional team usually consists of 5-9 members and suggests a set of roles and steady processes repeated in every iteration. The iterations in Scrum, named with a rugby term sprints, are usually 1 to 4 weeks long. One of the most well-known features of Scrum is a daily stand-up meeting lasting about 15 minutes. Every sprint includes planning, designing, developing, testing and reviewing.

        Roles in Scrum include product owner, sprint master and team members.
        Product Owner communicates with the customer to understand the requirements, which will be broken down to "user stories". He/She is responsible for Product Backlog, which include list of items with different priorities, typically in the form of user stories. He/She  participates actively in Sprint Planning and Sprint Review meetings.
        A Scrum Master oversees that Scrum in agile methodology is appropriately performed by the team and manages the process.



        Reference https://www.loginworks.com/blogs/agile-methodology/

        Kanban vs Scrum
        kanban: continuous delivery
        Scrum: fixed time delivery

        kanban + scrum
        “kanban”的图片搜索结果


        Agile methodology is now widely used in software development and ensures delivery of high quality products.

        Test Plan

        STLC (software testing life cycle)
        Requirement Analysis
        Test Planning
        Test Case Development
        Environment Setup
        Test Execution
        Test Cycle Closure/ Evaluating Exit Criteria and Reporting


        What does a test plan include? 
        (From ISTQB)
        • test plan: A document describing the scope, approach, resources and schedule of intended test activities. It identifies amongst others test items, the features to be tested, the testing tasks, who will do each task, degree of tester independence, the test environment, the test design techniques and entry and exit criteria to be used, and the rationale for their choice,and any risks requiring contingency planning. It is a record of the test planning process.

        What is the benefits of a test plan?
        (From ReQtest)
        It is the guide book for the testing process. It directs your testing approach and describes the testing practices to be followed.
        It contains details of the testing scope which prevents team from putting any efforts in testing ‘Out of scope’ functionalities.
        It helps to determine the time and effort required for testing the product.
        It clearly defines roles and responsibilities of every team member so every individual in the testing team knows what is required of him.
        It provides schedule for testing activities. Hence, it provides you a baseline schedule to control and track your team’s testing progress.
        It outlines the resource requirements and equipment needs which are essential to carry out the testing process.
        It can be shared with your client to give them insight about your testing process and gain their confidence.

        What is a good test plan?
        Simple, Clear, Easy to Read and Follow.

        How to write a test plan?
        First make sure what contents need to be included in the the test plan.
        For example

        • Introduction – what is the project all about?
        • In-Scope – what will we be testing?
        • Out-Of-Scope – what won’t we be testing?
        • Entry Conditions – when can we start?
        • Exit Conditions – when can say we’re done?
        • Timescales/Schedule – how long do we think it’ll take?
        • People – who’ll be working on the project?
        • Test Environment – where will we best testing on?
        • Risks – what could go wrong?

        Then Choose a Template. There are many templates online. Compared to the old lengthy test plan, One Page Test Plan means to put or fit the most important test plan contents into one page. Therefore the readers can get a good and clear view.
        Talking about "one page test plan", I found this dashboard style was really clever.




        A good test plan is very necessary and helpful.

        Tuesday, August 6, 2019

        SDLC software development life cycle

        SDLC software development life cycle

        Planning and Requirement Analysis
        Defining Requirement
        Designing Product Architecture/ System design
        Building or developing the product
        Testing the product
        Deploying in the market and Maintenance

        API interview questions

          https://www.katalon.com/resources-center/blog/web-api-testing-interview-questions/ Top 50+ Web API Testing Interview Questions [Ultimate l...