Sunday, August 27, 2017

General Technical Information


Zoolz Cloud Storage: Lifetime of 1TB Instant Vault and 1TB of Cold Storage


https://academy.sciencealert.com/sales/zoolz-cloud-storage-lifetime-subscription-2tb?utm_source=sciencealert.com&utm_medium=referral&utm_campaign=zoolz-cloud-storage-lifetime-subscription-2tb_081817&utm_term=scsf-236285&utm_content=a0x1a000001tTd7EditDetailsDeleteMoreClose



Handling Large Files:

The difference between log files, a text file and a data file.
Log files is generated automatically to keep track of some specific appliation.
A text file is created by the user in a word processor.
A data file stores data pertaining to a specific application for later use.

CSV: Comma seperated values
LDF: log data files
MDF: master data files

Basic tool editors for handling large log files

Notepad++
It supports multi tab for multi documents
Its supports multiple programming langs - C, C++, Java, C#, XML, HTML< PHP, JavaScript, VB/VBS, SQL, Perl, Python, Unix shell script.
Notepad++ is commonly known as the the best HTML editor.
Supports Regular Expression
Drag and Drop

Glogg

Vim: Visual Interactive

ConText
http://www.contexteditor.org/downloads
Source code repository path: http://code.google.com/archive/p/contexteditor/

EditPad Lite


EmEditor

LogExpert:

--------------------------------------------------------------------------------------

Factors consideration while choosing programming language
Functionality of the application
support for new features
the platform on which the application will run
performance
security
code size
community and support


Features
Perl
PHP
Python
Version
6
7.1.2
 3.6.0

Most powerful in regular expression and string manipulation.
Useful while parsing huge amount of data.
It's a server side scripting language.
Popular for small or medium level website development.
Testing, automation, web development, data analytics, cloud computing,  mobile development and game development.
Platform
Support all platforms


Useful
Web development, System administration, network programming and game development
Web development.
Dynamic webpages
Good documentation
Used in 3D animation and game development.

Disadvantage
Syntax is complex,
Poor documentation.
Slow compared to other scripting language.
As it is open source, security is the major challenge as the code is available to all; hence intruders can easily find weakness in the code.
PHP not suitable for desktop application.

It is slower compared to C and C++
It is also an interpreted language.
Its doesn't perform multi-processor / multi-core work efficiently.

Frameworks
Catalyst, Dancer, Mojolicious
Laravel, symphony, codeigniter, phalcon
Django, TurboGears, Web2py, Bottle, CherryPy, Flask, Pyramid,
IDE/ Text Editor


Sublime:
https://www.sublimetext.com/3





Saturday, August 26, 2017

Web Service testing using SOAPUI - https://www.soapui.org/

https://www.guru99.com/api-testing.html

All Web Services are API but APIs are not Web Services.

Api Testing is entirely different from GUI Testing and mainly concentrates on the business logic layer of the software architecture. This testing won't concentrate on the look and feel of an application.

Instead of using standard user inputs(keyboard) and outputs, in Api Testing, you use software to send calls to the API, get output, and note down the system's response.


Difference between API testing and Unit testing


Unit TestingAPI testing
  • Developers perform it
  • Testers perform it

Tools for API testing

Since API and Unit Testing both target source code, similar tools can be used for testing both.

  • SOAPUI - It's an easy-to-use tool with extensive REST and SOAP API testing capabilities – no scripting experience is required.
  • Runscope
  • Postman with jetpacks
  • Postman with Newman

https://www.linkedin.com/pulse/difference-between-api-testing-unit-mj-alavi



https://www.youtube.com/watch?v=0pcM6teVdKk&list=PL6n9fhu94yhW7yoUOGNOfHurUE6bpOO2b


References:
  • https://www.soapui.org/
  • https://www.soapui.org/tutorials.html
    http://techonestop.com/soapui-alternative-for-webservice-testing
  • https://www.youtube.com/watch?v=Op6XpK9VJn4&list=PL_SsnJZ0TQhaTWws490iAxZby6Lwf7tFX



Web Service can be called by a Software Application using SOAP or HTTP protocol.  


Web Services can be implemented in different ways, but the following two are the popular implementations approaches.
  1. SOAP (Simple Object Access Protocol)
  2. REST (Representational State Transfer architecture)
SOAP uses the XML format to send and receive the request 


REST is an alternative to SOAP. Rest API supports both XML and JSON format. It is usually preferred for Mobile and web apps as it makes app work faster and smoother


SOAPUI is used to test the web service, it also used for functional testing also.
XML: Extended Markup Language
In html we need to use predefined set of tags Ex: <input /> <p> <h1> <body>
In XML we can set our user defined tags.
<booking>
 <name>        </name>
 <location>    </location>
 <FromDate>    </FromDate>
 <ToDate>      </ToDate>
</booking>


SOAP is a protocol which use xml format. This protocol used to pass data from one application to another application.


Install SOAP:


https://www.soapui.org/   this software is from smartbear corp.
There are 2 version of the SOAPUI
  1. SoapUi  (Free)
  2. SOAP Pro - Licensed  (Trail for 14 days)


Prerequisite
Java install.


Download and Install with default options.


Open application


It will ask for survey, we can ignore it for the moment.


Now the Home page will be opened.


WSDL:  Web service description language
An WSDL document describes a web service. 


Now we require to get some free web service for testing. Lets take the example of currency convertor.






Copy WSDL :


Open SoapUI:




In Initial WSDL field enter the WSDL location. The Project Name is auto picked from WSDL and also you can change to any name.
Click on OK.


Under Project we can see CurrencyConvertor ConversionRate Request1
Double click on Request1 to see the right panel. Its has two sections Raw and XML. Now, we need to Convert the value from us dollar to indian rupees.
So we need to add parameters in FromCurrency and ToCurrency tags.


Change the values as highlighted
  1. FromCurrency USD and ToCurrency INR
  2. Click on Execute
  3. Check response – Conversion value.


Assertion in SOAPUI:
For this  am using the following WSDL location:






Click on OK








  1. Click on + (Add Assertion) button
  2. Select Assertion type : here am selecting string contains type.
  3. Click on Add button






Manual Testing Concepts



TEST CASES FOR ATM MACHINE

          http://testingclass.com/manual-testing/test-cases-atm-machine/

Tuesday, August 15, 2017

Database testing



Useful tools for Database testing

-todo-- http://www.seleniumeasy.com/selenium-tutorials/database-testing-example-with-selenium-using-java

DATAGRIP:    https://www.jetbrains.com/datagrip/
dbforge:   https://www.devart.com/dbforge/sql/studio/


Database testing is a test type in which data manipulation, integrity, data comparison etc operations can be verified.
Database testing is a subset of functional testing & performance testing.
We can conduct database testing manually and also automated.
Data Integrity: Data is stored in correct place.
Ex: Name and ID values interchanged while saving in DB, so Integrity error.

Database scenarios:
1. Add record
2. Update record
3. Delete record
4. Data Integrity
5. Data Authentication
6. Data Comparision - (front end data with backend data)
7. Data Comparision - (two databases)
8. Data Comparision different data sources (Database vs Excel)
9. Data Backup
10. Data Recovery

Parts of Database: data and schema

Schema: Datastructures in the database is called as Schema.
Table, Columns, Stored Procedure, Views, Functions, Trigger are the parts of the schema.
Stored Procedure : Contains Input and Output
Functions: Contains only Input, No Output



Schema testing:
·         Table: Table name should be meaningful name short/long
·         Contains all necessary columns.
·         Correct keys
·         Unique information - no duplicate
·         unnecessary columns
·         Columns: Correct data type, data size, Name constraints and relationship( Ex Foreign key)
·         View:
·         Stored Procedure : exec storeprocedureName 'param1' 'param2'
·         Functions

Data testing:
·         Is data correct w.r.t Source(UI, other), complete, unambiguous, unique and fresh ?
·         Source: User Entered in UI / XML / another database
·         Column - Is the data format(correct space, characters, capitalization) correct and not truncated ?
do the keys match ?

Database testing challenges
·         large size - scope the test items, test according to database test plan(Ex: newly created)
·         Incorrect / scaled-down database - Test production database(or copy with or without obfuscation)
·         Many companies they take copy of production database and hide sensitive database ( Ex. Credit card information ) , where ever sensitive we can use null
·         Frequent changes:
·         Analyze impact, re-design tests and re-test impacted objects

Database testing approach
·         Gather database requirements
·         Create test scenarios against each requirement
·         Test schema, data and test scenarios
·         Negative testing
·         Performance testing for throughput and response times.
·         Security testing – user has restricted access and try to access
·         Use SQL queries(faster) or query builder(slower method)
·         Organize tests into test suites.
·         Automate tests as far as possible. We can run as a batch one after the other.

Database test plan:
·         Introduction – db name and application
·         Scope – Important items, in scope, out of scope
·         Test approach – list of test and approaches.
·         Test environment – database copy, server, tools
·         Test activates and schedule –requirements analysis, test design test execution, results analysis and reporting
·         Responsibilities – Test lead, tester
·         Deliverable – Test queries, bug reports, tested db
·         Risks – mitigation and contingency plans


Sample database test plan:


2 Video
https://www.youtube.com/watch?v=1ozPUHBfseY
https://www.udemy.com/framework-development-with-selenium-csharp-advanced/

https://www.youtube.com/watch?v=CjNqKlTluxc
https://www.youtube.com/watch?v=1ozPUHBfseY
https://www.youtube.com/watch?v=md_x6Yr2fgM
--
 https://www.youtube.com/watch?v=sRaPFn9ZQDs





Thursday, July 27, 2017

Big O notation



Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm

The rate of growth of time with respect to input. 

https://www.quora.com/What-are-some-easy-ways-to-understand-and-calculate-the-time-complexity-of-algorithms




Sunday, July 23, 2017

SOLID Principles and Design Patterns



http://www.dotnetcurry.com/tutorials/software-gardening

S
O
L
I
D

BDD : Behavior Driven Development



http://specflow.org/getting-started/

http://www.dotnetcurry.com/patterns-practices/1375/behavior-driven-development-bdd

http://specflow.org/documentation/Unit-Test-Providers/


Steps:

1. Open Visual Studio --> Tools --> Extension and Update
    Specflow

2. Create a Unit test Project
    Select project --> Nuget Manager
     Specflow
     install Specflow and NUnit

3.  App.Config , Add following
<specFlow>  
  <unitTestProvider name="MSTest"></unitTestProvider>
</specFlow>

4. Create new Item,
  Specflow. feature file
  Right Click on Feature file in Test Editor  --> Generate Steps

5. Build , Open test explore and select the test case
     Execute


Wednesday, July 19, 2017

Test data generator tools


http://www.mockaroo.com/

http://www.generatedata.com/

http://www.datanamic.com/datagenerator/index.html

http://wiki.c2.com/?TestDataGenerator

https://webresourcesdepot.com/test-sample-data-generators/

http://www.softwaretestingmagazine.com/tools/open-source-test-data-generators/

http://toolsfordatabases.com/test-data-generation-tools.html

https://www.quora.com/What-are-the-tools-used-for-test-data-generation




Thursday, July 13, 2017

Command prompt cmd.exe c#


MSIEXEC


Microsoft Windows Installer (Windows 7/2008).

https://ss64.com/nt/msiexec.html

**********************************************************************

https://stackoverflow.com/questions/17613216/how-to-pause-cmd-before-it-close

https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true

Specify the K parameter instead of C
From Microsoft documentation:
/c : Carries out the command specified by string and then stops.
/k : Carries out the command specified by string and continues.


proc.Arguments = "/K ""ipconfig" 


Example:

using System.Diagnostics;
 
namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            string cmd = @"xcopy C:\abc\1\1.txt C:\abc\2\";
            ExecuteCommand(cmd);
        }
 
 
        public static string ExecuteCommand(string command)
        {
 
            ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd""/k " + command)
            {
                UseShellExecute = false,
                CreateNoWindow = false,
                WindowStyle = ProcessWindowStyle.Maximized
            };
 
            using (Process proc = new Process())
            {
                proc.StartInfo = procStartInfo;
                proc.Start();
 
                string output = proc.StandardOutput.ReadToEnd();
 
                if (string.IsNullOrEmpty(output))
                    output = proc.StandardError.ReadToEnd();
 
                return output;
            }
 
        }
    }
 
}

JMeter Simple Controller

  Simple Controller is just a  container  for user request.