Software Testing is evaluation of the software against requirements gathered from users and system specifications. Testing is conducted at the phase level in software development life cycle.
November 20, 2020
October 11, 2020
Difference between SoapUI and Postman
Both SoapUI and Postman are very famous tools for API testing and API Automation. Below are the major differences between SoapUI and Postman and the criteria for choosing them for REST API.
1. SoapUI covers the testing of all API protocols like Soap, REST and GraphQL whereas Postman supports only REST API Testing
2. SoapUI provides 14 days trial and then you have to pay to get a license whereas Postman is a free Chrome browser extension
3. SoapUI supports customization of Reports in different formats whereas Postman supports reporting only in JSON and HTML formats.
4. SoapUI is one of the most trustworthy tool for API automation testing whereas Postman is a used for REST APIs manual as well as exploratory testing
5. SoapUI is a heavy tool in-comparison to Postman as this is a chrome extension
6. In Soap UI,you can use Groovy or JavaScript for more complicated automation such as validating the results, extracting data, using external Java libraries or running system processes. Groovy IDE is compatible with Java and you can easily write your code in Java with very few modifications.But in Postman there is no concept of groovy.
I hope the above information will clarify your doubts in terms of differences and criteria to select one of them depending upon the requirement.
HTTP Status Code
HTTP STATUS CODE-
GET: The resource has been fetched and is transmitted in the message body.
HEAD: The entity headers are in the message body.
PUT or POST: The resource describing the result of the action is transmitted in the message body.
TRACE: The message body contains the request message as received by the server.
Client error responses-
October 10, 2020
SQL Commands
select
AS forcolumn name
select name, continent as "continent name" from Country order by Name;
select name, continent as "continent name" from Country order by Name;
select name, continent , region from Country where continent= "Europe" order by Name LIMIT 5 offset 5;
select name as "Country" from Country;
select count(*) from Country where population> 100000 AND Continent= "Europe";
select * from customer;
insert into customer(name,address, city, state, zip)
values("FRD ","abc","KK","CL","334");
update customer SET address= "klllll" where id = 2;
delete from customer where id = 4;
select * from customer ;
create table test(
a integer,
b text
);
insert into test values (1,'a');
insert into test values (2,'b');
insert into test default values;
select * from test;
drop table test ;
drop table if exists test;
create table test(
a integer not null,
b text not null,
c text
);
insert into test values (1,'this','that');
insert into test (a,b,c) values ('one','two','');
select * from test;
null is not a value the null state represnts a lack of value
Constraints in SQL
not nul, uniques
create table test (a Text unique, b text, c text default 'cat');
insert into test (a,b) values ('one','two');
insert into test (a,b) values ('three','two');
select * from test;
alter table test add e text default 'dog';
select * from test;
alter table test add e text default 'dog';
select * from test;
select name, population from country
where population <50000 OR population is null order by population desc;
select name, population, continent from country
create table left (id integer, description text);
create table right(id integer, description text);
insert into left values (1, 'leftone');
insert into left values (2, 'lefttwo');
insert into left values (3, 'leftthree');
insert into left values (4, 'leftfour');
insert into left values (5, 'leftfive');
insert into left values (6, 'leftsix');
insert into left values (7, 'leftseven');
insert into left values (8, 'lefteight');
insert into right values(1, 'rightone');
insert into right values(2, 'righttwo');
insert into right values(3, 'rightthree');
insert into right values(4, 'rightfour');
insert into right values(5, 'rightfive');
insert into right values(6, 'rightsix');
insert into right values(7, 'rightseven');
select * from left;
select *from right;
select l.description as left , r.description as right
from left as l
left join right as r on l.id= r.id
;
where continent in ('Asia', 'Europe') order by name;
select distinct continent from country; more unique results
select s.id as sale ,i.name, s.price
from sale as s
join item as i on s.item_id= i.id;
insert into customer (name) values ('jane smith');
select * from customer;
select c.name as cust, c.zip, i.name as item,i.description, s.quantity as quan,s.price as price
from sale as s
join item as i on s.item_id= i.id
join customer as c on s.customer_id= c.id
order by cust, item
;
insert into customer (name) values ('jane smith');
select * from customer;
select c.name as cust, c.zip, i.name as item,i.description, s.quantity as quan,s.price as price
from customer as c
left join sale as s on s.customer_id= c.id
left join item as i on s.item_id= i.id
order by cust, item
;
strings-
select released,
substr(released, 1, 4) as year,
substr(released, 6, 2)as month,
substr(released, 1, 4) as day
from album order by released
;
select released,
substr(released, 1, 4) as year,
substr(released, 6, 2)as month,
substr(released, 1, 4) as day
from album order by released;
select RTRIM (' string');
select 'string'= 'STRing';
select LOWER('string')= lower('STRing');
select upper('string')= lower('STRing');
numeric type --
select typeof(1+1);
select typeof(1+1.2);
select typeof('first');
select typeof('first' + 'name');
select 1/2;
select cast(1 as real)/2;
select 17/5;
select round(2.455555);
select 17%5;
date and time
select datetime('now');
select date('now');
select time('now');
select datetime('now','+1 day');
aggregates:
having for aggregate data
where by for non aggregate data
select a.title as album , count(t.track_number) as tracks
from track as t
join album as a
on a.id= t.album_id
group by a.id
order by Tracks desc,album
;
Use the __distinct___ keyword to remove duplicates from a result
Use the _group by ____ clause to collate groups of results before calling an aggregate function.
You can undo an unfinished transaction by using the ___rollback__ statement.
begin transction
end transaction
create table updatesale(id interger primary key, itemid integer, quan integer, covalue integer);
insert into updatesale(itemid, quan ,covalue) values (31,2,33);
create trigger updatesale before update on sale
Begin
select raise(rollback ,"can not update") from updatesale
where id=new.id and covalue= 1;
End
;
Begin transaction;
update updatesale set quan= 9 where id=3;
End Transaction;
select * from updatesale;
The SELECT ___distinct__ statement removes duplicates from a result set.
To insert a blank row use the _default____ clause.
To delete a table, use the ___drop__ statement.
What are the three arguments for the SUBSTR() function in SQLite?
You are correct!
string to evaluate, starting position, length of string
The type of trigger to use for preventing updates to reconciled rows is _____
delete rows - delete cmd
delete table- drop table
alter table - add new coulmn
id integer primary key
substr(stringstart,end)
length
trim
upper lower
Commonly Used Attributes in Nunit
Catagory- The Category attribute provides an alternative to suites for dealing with groups of tests. Either individual test cases or fixtures may be identified as belonging to a particular category
Description - -The Description attribute is used to apply descriptive text to a Test, TestFixture or Assembly
expected Condition -This is the way to specify that the execution of a test will throw an exception. This attribute has a number of positional and named parameters, which we will discuss in separate sections according to the purpose they serve.
Explicit -The Explicit attribute causes a test or test fixture to be ignored unless it is explicitly selected for running. The test or fixture will be run if it is selected in the gui, if its name is specified on the console runner command line as the fixture to run or if it is included by use of a Category filter.
ignore-The ignore attribute is an attribute to not run a test or test fixture for a period of time. The person marks either a Test or a TestFixture with the Ignore Attribute
Platform-The Platform attribute is used to specify platforms for which a test or fixture should be run
Properly -The Property attribute provides a generalized approach to setting named properties on any test case or fixture, using a name/value pair.
SetUp -This is the attribute that marks a class that contains the one-time setup or teardown methods for all the test fixtures under a given namespace. The class may contain at most one method marked with the SetUpAttribute
TearDown-This attribute is used inside a TestFixture to provide a common set of functions that are performed after each test method is run. A TestFixture can have only one TearDown method
TestFixture -This is the attribute that marks a class that contains tests and, optionally, setup or teardown methods.
TestFixture Set Up- This attribute is used inside a TestFixture to provide a single set of functions that are performed once prior to executing any of the tests in the fixture.
TestFixture Tear Down--This attribute is used inside a TestFixture to provide a single set of functions that are performed once after all tests are completed
Parallel test execution - do not declare static
use [parallelizable]
What is Specflow???
SpecFlow is a test automation solution for .NET built upon the BDD paradigm. Use SpecFlow to define, manage and automatically execute human-readable acceptance tests in .NET projects (Full Framework and .NET Core).
SpecFlow tests are written using Ghekin, which allows you to write test cases using natural languages. SpecFlow uses the official Gherkin parser, which supports over 70 languages.
These tests are then tied to your application code using so-called bindings, allowing you to execute the tests using the testing framework of your choice.
You can also execute your tests using SpecFlow’s own dedicated test runner, SpecFlow+ Runner.
The automation that connects the Gherkin specifications to source code is called a binding. The binding classes and methods can be defined in the SpecFlow project
The step definition that automates the scenario at the step level. This means that instead of providing automation for the entire scenario, it has to be done for each separate step.
what is Scenario Outline: Multiple iteration of same scenario with different data.
October 09, 2020
Data Driven Testing in SpecFlow-
Data Driven Testing in SpecFlow-
1. Parameterization without Example Keyword-
LogIn_Feature.feature
2. Data Driven Testing in SpecFlow using Scenario Outline-
Parameterization with Example Keyword
@mytag
Scenario Outline: Successful Login with Valid Credentials
Given User is at the Home Page
And Navigate to LogIn Page
When User enter <username> and <password>
And Click on the LogIn button
Then Successful LogIN message should display
Examples:
| username | password |
| testuser_1 | Test@123 |
| testuser_2 | Test@153 |
3.Parameterization using Tables
Transform Table into Dictionary using Table.Rows
Transform Table into DataTable using Table.Header
Tables – CreateInstance
Tables – CreateSet
4. Data Driven Testing in SpecFlow using External Files-
Parameterization using Json
Parameterization using XML
October 05, 2020
BDD vs TDD vs ATDD
TDD-
Benefits of Test-Driven Development--
Unit test cases are covered early.
Helps reduce the amount of time required for rework.
Helps explore bugs or errors very quickly.
Helps get faster feedback.
Encourages the development of cleaner and better designs.
Enhances the productivity of the programmer.
Allows any team member to start working on the code in the absence of a specific team member. This encourages knowledge sharing and collaboration.
Gives the programmer confidence to change the large architecture of an application.
The test you write might look like this:
Describe('sum()', function () { it('should return the sum of given numbers', function () { expect(simpleCalculator.sum(1,2)).to.equal(3); expect(simpleCalculator.sum(5,5)).to.equal(10); }); })
Your implementation is currently empty. You haven’t implemented yet, so the tests will fail. You want to verify that your test is deterministic: it will tell you when it should fail or pass.
var Calculator = function () { return true // implementation goes here }
Implement it. Make the test pass. Here we’ll write the code that will make the test pass.
var Calculator = function () { return{ sum: function(number1, number2){ return number1 + number2; } }; }
Now your test will be satisfied, because we’ve added the function.
The user journey story represents a user’s behaviour. Using the business requirements provided, the developer can think about scenarios of how a user will use this new functionality. And those scenarios can be used to write the tests. This is called behaviour-driven development (BDD).
BDD is a widely-used method in UI-driven testing. It is written in a structure known as “Given, When and Then.”
Given - the state of the system that will receive the behaviour/action
When - the behaviour/action that happens and causes the result in the end
Then - the result caused by the behaviour in the state
Business-Driven Development (BDD) is a testing approach derived from the Test-Driven Development (TDD) methodology. In BDD, tests are mainly based on systems behaviour. This approach defines various ways to develop a feature based on its behaviour.
Given the user has entered valid login credentials
When a user clicks on the login button
Then display the successful validation message
Focuses on how the system should behave from the customer’s and the developer’s perspective
BDD Is a cost-effective technique
Reduces efforts needed to verify any post-deployment defects.
Acceptance Test-Driven Development is very similar to Behavioral-Driven Development. However, a key difference between them is: BDD focuses more on the behavior of the feature, whereas ATDD focuses on capturing the accurate requirement
October 02, 2020
Jenkins with Github
What next???
JENKINS
Jenkins is a powerful application that allows continuous integration and continuous delivery of projects, regardless of the platform you are working on. It is a free source that can handle any kind of build or continuous integration. You can integrate Jenkins with a number of testing and deployment technologies.
1. Download the software from https://www.jenkins.io/ and Double click
2. Click on Next
3. Click on Next
4. click on run on localsystem
5. Warning Symbol will get converted into green tick. Click on Next
6. Enter the port number as 8080 or 8081 and click on Test port to get the warning button get converted into green tick. Then click on next
7. Click on next
8. Choose option under Firewall Exception and click on next
9. Click on Install
10.
11. Jenkins will be Installed and will automatically open the page localhost:8080/
12. Fill Details
13. Jenkin Dashboard
September 29, 2020
How to work between local repository and Remote repository
Firstly you have to create an account on github and then create an empty repository . You can go for public or private.
Once you created a repo, the next step will be to include in your local repo.
go to your terminal where you want to add your remote repo.
newproject(master)> git remote add origin http://-----------------------------------(url)
> cat .git/config
> git branch
> git branch -r
It is now tracked with your local repo.
if you want to push your code to remote repo . Do this step-
> git push -u origin master
> git branch
> git branch -a
Now let's sat we want to add that project in my computer not in same folder. assume my Colleauge work -
> git clone http://---------- newproject
then newproject folder will be created with all the cloned project '
newproject(master)> ls -la
How to track remote branches -
mainproject(master)>git branch non-tracking
> git push origin non-tracking
We have to specify the remote branch now
Set up to track remote branch from origin'
>git branch -u origin/non-tracking non-tracking
for non tracking we can use this command-
> git branch --unset -upstream non-tracking
Push changes to Remote Repo-
Before push we have to amke some changes
mainproject(master)> git commit -am "changes are done"
>git log --oneline -5 origin/master
>git log diff origin/master..master
> git push
origin/master is tracking branch
> git log --oneline origin/master
Fetch the changes from remote repo-
newproject(master)> git log
>git log orgin/master
>git branch
>git branch -r
>git Fetch
>git log --oneline origin/master
now master branch will not change
we have to merge in fetched changes -
> git diff origin/master..master
>git merge origin/master
>git log --oneline origin/master
Basically git Fecth + Merge = Pull
Check out Remote branches -
newproejct (master)> git branch non-tracking origin/non-tracking
>git log --oneline non-tracking
>cat .git/config
> git branch -d non-tracking
>git checkout -b non-tracking origin/non-traking
>git checkout master
>git commit -am "new changes "
> git push
Delete a Remote Branch-
git push origin : non-tracking
2nd method- git push origin --delete non-traking
====================================================================
Let take an example - My work and / My collegue work
My Work- git checkout master
>git fetch
>git merge origin/master
>git checkout -b newbranch
>git commit -am "new changes"
> git fetch
>git push -u origin newbranch
======================================
My Collegue Work == cheking the remote repo what changes ahs been dine in new rep and make new changes in that branch and agin push to remote repo.
git checkout master
git fetch
git merge origin/master
git chekout -b newbranch origin/newbranch
git log
git show SHA
git commit -am
git Fetch
git push
===================================
My Work= check if i want to see my colleuge work and want to make some changes '
>git fetch
>git log -p newbranch..origin/newbranch
>git merge orgin ./newbranch
git checkout master
git fetch
git merge origin/master
git merge newbranch
git push
=======================================
GIT and GITHUB
Git - Is software keeeping track of changes . it is version control and comapre the different versions.
manage source code .
Here are some commands -
Utility : To set your user name and email in the main configuration file.
How to : To check your name and email type in git config --global user.name and git config --global user.email. And to set your new email or name git config --global user.name = “” and git config --global user.email = “”
git init
Utility : To initialise a git repository for a new or existing project.
How to : git init in the root of your project directory.
Utility : To copy a git repository from remote source, also sets the remote to original source so that you can pull again.
How to : git clone <:clone git url:>
git status
Utility : To check the status of files you’ve changed in your working directory, i.e, what all has changed since your last commit.
How to : git status in your working directory. lists out all the files that have been changed.
git add
Utility : adds changes to stage/index in your working directory.
How to : git add .
Utility : commits your changes and sets it to new commit object for your remote.
How to : git commit -m”sweet little commit message”
Utility : Push or Pull your changes to remote. If you have added and committed your changes and you want to push them. Or if your remote has updated and you want those latest changes.
How to : git pull <:remote:> <:branch:> and git push <:remote:> <:branch:>
Utility : Lists out all the branches.
How to : git branch or git branch -a to list all the remote branches as well.
Utility : Switch to different branches
How to : git checkout <:branch:> or **_git checkout -b <:branch:> if you want to create and switch to a new branch.
Utility : Save changes that you don’t want to commit immediately.
How to : git stash in your working directory. git stash apply if you want to bring your saved changes back.
git merge
Utility : Merge two branches you were working on.
How to : Switch to branch you want to merge everything in. git merge <:branch_you_want_to_merge:>
Utility : You know when you commit changes that are not complete, this sets your index to the latest commit that you want to work on with.
How to : git reset <:mode:> <:COMMIT:>
Utility : To check what remote/source you have or add a new remote.
How to : git remote to check and list. And git remote add <:remote_url:>
git commit -am
git-reset - Reset current HEAD to the specified state
git reset HEAD filename - to reset to working directory from staging area .
git reset [-q] [<tree-ish>] [--] <pathspec>… git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>] git reset (--patch | -p) [<tree-ish>] [--] [<pathspec>…] git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]
--soft
Does not touch the index file or the working tree at all (but resets the head to <commit>, just like all modes do). This leaves all your changed files "Changes to be committed", as git status would put it.--mixed
Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action.
If -N is specified, removed paths are marked as intent-to-add (see git-add[1]).--hard
Resets the index and working tree. Any changes to tracked files in the working tree since <commit> are discarded.
git show SHA - to get the details related to that SHA
git rm filename - to delete a file
git mv file 1 file 2 - to rename a file name
git commit amend -m "chnge the commit"- if you want to change in the commit
git revert - to revert the commit
git revert shaname
git branch -m branchnamenew - for rename a branch name
git branch -d branchname
September 22, 2020
What is cloud????
what is cloud?
Cloud is new way of thinking .about massive scale of servers.
NIST defines 5 characteristics of cloud- on demand self service
broad network access
resource polling
rapid elasticity
measured service
What are the benefits -
eliminates buying cost of hardware no more h/w set up
pay only for the services used
Better performance
security updates id done by cloud vendors
professional troubleshooting
Scalability - start small and build out as as needed
Elasticity- Grow or shrink resources dynamically
Azure offers three main cloud computing platform services: SaaS – Software as a Service. IaaS – Infrastructure as a Service. PaaS – Platform as a Service.
IaaS- It allows customer to instantly provision servers, network switches, firewall and other physical devices.
SaaS - It allows users to connect to and use cloud based apps over the internet.
PaaS- PaaS vendors provide one or more platforms upon which applications and services can be built. A complete development and deployemnt cloud envronement
For Enterprises-
Buy through the Azure Portal
Add azure to your existing enterprise agreement
Use through a Microsoft cloud solution provider
Azure APP service benefits-
write code in a multitude languages . For example- .NET, core, java, PHP, Python, Node.js, supports Devops tooling
Create APP Service in Azure -
App service offers an abstracted web server.
1.Azure portal- web app, API app , go to the marketplace , web, featured template,
2. command line
3. web Developer tool like Microsoft visual basic
create a web app on App service
app creates a virtual machine
install preconfigured Operating System
host API app and web app on APP service
Azure storage
Azure Database
September 20, 2020
AWS
AWS (Amazon Web Services) is a comprehensive, evolving cloud computing platform provided by Amazon that includes a mixture of infrastructure as a service (IaaS), platform as a service (PaaS) and packaged software as a service (SaaS) offerings.
Availability-
Amazon Web Services provides services from dozens of data centers spread across availability zones (AZs) in regions across the world. An AZ is a location that contains multiple physical data centers. A region is a collection of AZs in geographic proximity connected by low-latency network links.
A business will choose one or multiple availability zones for a variety of reasons, such as compliance and proximity to end customers. For example, an AWS customer can spin up virtual machines (VMs) and replicate data in different AZs to achieve a highly reliable infrastructure that is resistant to failures of individual servers or an entire data center.
Amazon Simple Storage Service (S3) provides scalable object storage for data backup, collection and analytics. An IT professional stores data and files as S3 objects -- which can range up to 5 gigabytes (GB) -- inside S3 buckets to keep them organized. A business can save money with S3 through its Infrequent Access storage tier or by using Amazon Glacier for long-term cold storage.
Amazon Elastic Block Store provides block-level storage volumes for persistent data storage when using EC2 instances. Amazon Elastic File System offers managed cloud-based file storage.
A business can also migrate data to the cloud via storage transport devices, such as AWS Snowball and Snowmobile, or use AWS Storage Gateway to enable on-premises apps to access cloud data.
Databases, data management
The Amazon Relational Database Service -- which includes options for Oracle, SQL Server, PostgreSQL, MySQL, MariaDB and a proprietary high-performance database called Amazon Aurora -- provides a relational database management system for AWS users. AWS also offers managed NoSQL databases through Amazon DynamoDB.
An AWS customer can use Amazon ElastiCache and DynamoDB Accelerator as in-memory and real-time data caches for applications. Amazon Redshift offers a data warehouse, which makes it easier for data analysts to perform business intelligence (BI) tasks.
Migration, hybrid cloud
AWS includes various tools and services designed to help users migrate applications, databases, servers and data onto its public cloud. The AWS Migration Hub provides a location to monitor and manage migrations from on premises to the cloud. Once in the cloud, EC2 Systems Manager helps an IT team configure on-premises servers and AWS instances.
Amazon also has partnerships with several technology vendors that ease hybrid cloud deployments. VMware Cloud on AWS brings software-defined data center technology from VMware to the AWS cloud. Red Hat Enterprise Linux for Amazon EC2 is the product of another partnership, extending Red Hat's operating system to the AWS cloud.
Networking-
An Amazon Virtual Private Cloud (Amazon VPC) gives an administrator control over a virtual network to use an isolated section of the AWS cloud. AWS automatically provisions new resources within a VPC for extra protection.
Admins can balance network traffic with the Elastic Load Balancing (ELB) service, which includes the Application Load Balancer and Network Load Balancer. AWS also provides a domain name system called Amazon Route 53 that routes end users to applications.
An IT professional can establish a dedicated connection from an on-premises data center to the AWS cloud via AWS Direct Connect.
Developer tools-
A developer can take advantage of AWS command-line tools and software development kits (SDKs) to deploy and manage applications and services. This includes:
The AWS Command Line Interface, which is Amazon's proprietary code interface.
A developer can use AWS Tools for Powershell to manage cloud services from Windows environments.
Developers can use AWS Serverless Application Model to simulate an AWS environment to test Lambda functions.
AWS SDKs are available for a variety of platforms and programming languages, including Java, PHP, Python, Node.js, Ruby, C++, Android and iOS.
Amazon API Gateway enables a development team to create, manage and monitor custom application program interfaces (APIs) that let applications access data or functionality from back-end services. API Gateway manages thousands of concurrent API calls at once.
AWS also provides a packaged media transcoding service -- Amazon Elastic Transcoder -- and a service that visualizes workflows for microservices-based applications -- AWS Step Functions.
A development team can also create continuous integration and continuous delivery pipelines with services like:
AWS CodePipeline
AWS CodeBuild
AWS CodeDeploy
AWS CodeStar
A developer can also store code in Git repositories with AWS CodeCommit and evaluate the performance of microservices-based applications with AWS X-Ray.
Management and monitoring
An admin can manage and track cloud resource configuration via AWS Config and AWS Config Rules. Those tools, along with AWS Trusted Advisor, can help an IT team avoid improperly configured and needlessly expensive cloud resource deployments.
AWS provides several automation tools in its portfolio. An admin can automate infrastructure provisioning via AWS CloudFormation templates, and also use AWS OpsWorks and Chef to automate infrastructure and system configurations.
An AWS customer can monitor resource and application health with Amazon CloudWatch and the AWS Personal Health Dashboard, as well as use AWS CloudTrail to retain user activity and API calls for auditing.
Security and governance-
AWS provides a range of services for cloud security, including AWS Identity and Access Management, which allows admins to define and manage user access to resources. An admin can also create a user directory with Amazon Cloud Directory, or connect cloud resources to an existing Microsoft Active Directory with the AWS Directory Service. Additionally, the AWS Organizations service enables a business to establish and manage policies for multiple AWS accounts.
AWS also includes tools and services that provide software- and hardware-based encryption, protect against DDoS attacks, provision Secure Sockets Layer (SSL) and Transport Layer Security (TLS) certificates and filter potentially harmful traffic to web applications.
The AWS Management Console is a browser-based graphical user interface (GUI) for AWS. The Management Console can be used to manage resources in cloud computing, cloud storage and security credentials. The AWS Console interfaces with all AWS resources.
Artificial intelligence
AWS offers a range of AI model development and delivery platforms, as well as packaged AI-based applications. The Amazon AI suite of tools includes:
Amazon Lex for voice and text chatbot technology;
Amazon Polly for text-to-speech translation; and
Amazon Rekognition for image and facial analysis.
AWS also provides technology for developers to build smart apps that rely on machine learning technology and complex algorithms.
With AWS Deep Learning Amazon Machine Images (AMIs), developers can create and train custom AI models with clusters of graphics processing units (GPUs) or compute-optimized instances. AWS also includes deep learning development frameworks for MXNet and TensorFlow.
On the consumer side, AWS technologies power the Alexa Voice Services, and a developer can use the Alexa Skills Kit to build voice-based apps for Echo devices.
Mobile development
The AWS Mobile Hub offers a collection of tools and services for mobile app developers, including the AWS Mobile SDK, which provides code samples and libraries.
A mobile app developer can also use Amazon Cognito to manage user access to mobile apps, as well as Amazon Pinpoint to send push notifications to application end users and then analyze the effectiveness of those communications.
Messages and notifications
AWS messaging services provide core communication for users and applications. Amazon Simple Queue Service (SQS) is a managed message queue that sends, stores and receives messages between components of distributed applications to ensure that the parts of an application work as intended.
Amazon Simple Notification Service (SNS) enables a business to send publish/subscribe messages to endpoints, such as end users or services. SNS includes a mobile messaging feature that enables push messaging to mobile devices. Amazon Simple Email Service (SES) provides a platform for IT professionals and marketers to send and receive emails.
AR & VR (Augmented reality and virtual reality)
AWS offers augmented reality (AR) and virtual reality (VR) development tools through the Amazon Sumerian service. Amazon Sumerian allows users to create AR and VR applications without needing to know programming or create 3D graphics. The service also enables users to test and publish applications in-browser. Amazon Sumerian can be used in:
3D web applications
E-commerce & sales applications
Marketing
Online education
Manufacturing
Training simulations
Gaming
Game development
AWS can also be used for game development. Large game developing companies, such as Ubisoft, will use AWS services for their games, like For Honor. AWS can provide services for each part of a game's lifecycle.
For example, AWS will provide a developer back-end services, analytics and developer tools. Developer tools should help aid developers in making their game, while back-end services might be able to help with building, deploying or scaling a developer's platform. Analytics might help developers better know their customers and how they play the game. Developers can also store data, or host game data on AWS servers.
Internet of Things
AWS also has a variety of services that enable the internet of things (IoT) deployments. The AWS IoT service provides a back-end platform to manage IoT devices and data ingestion to other AWS storage and database services. The AWS IoT Button provides hardware for limited IoT functionality and AWS Greengrass brings AWS compute capabilities to IoT devices.
Other services
Amazon Web Services has a range of business productivity SaaS options, including:
The Amazon Chime service enables online video meetings, calls and text-based chats across devices.
Amazon WorkDocs, which is a file storage and sharing service
Amazon WorkMail, which is a business email service with calendaring features.
Desktop and streaming application services include Amazon WorkSpaces, a remote desktop-as-a-service platform (DaaS), and Amazon AppStream, a service that lets a developer stream a desktop application from AWS to an end user's web browser.
AWS pricing models and competition
AWS offers a pay-as-you-go model for its cloud services, either on a per-hour or per-second basis. There is also an option to reserve a set amount of compute capacity at a discounted price for customers who prepay in whole, or who sign up for one- or three-year usage commitments.
If potential customers can’t afford the costs, then AWS Free Tier is another possible avenue for using AWS services. AWS Free Tier allows users to gain first-hand experience with AWS services for free; they can access up to 60 products and start building on the AWS platform. Free Tier is offered in three different options: always free, 12 months free and trials.
AWS competes primarily with Microsoft Azure, Google and IBM in the public IaaS market.
September 19, 2020
Advanced SOAPUI Funtionality-- MOCK SERVICE
How to use Mock Service:--
Select File > New SOAP Project.
Once the project you have opened appears in the Navigator, right-click any SOAP interface and select Generate SOAP Mock Service.
The Generate Mock Service dialog will appear. ...
In the next dialog, specify a name for your new mock service and click OK.
If you are waiting for back-end API to finish , you could create mock service like this that defines what responses you would get back and use that to test your front-end.
As we know, what if change method to post if we call get on test path and then that path does not exist.
We do not want to generate load on the server with post test and do not want to put any data. still interact with the product in that way.
There is more we can do as well:
If we see the response we are telling back to give back the 200 status code. we could tell it any other code to get back.
If we create two responses one will status code 200 and other with status code 500. Then when we call this in action- it cycling through these responses because the dispatch option here set to sequence.
We can change the dispatch option with query script and there is option to pass the query and set the value which we like to pass. Then only we can get that value.
Here is Dipatch Option:
Here is QUERY PARAMETER--
Data - Driven test suite with set up Script in SoapUI
DATA DRIVEN CONCEPT----
Quite simply put, data-driven testing is when you store test data (input, expected output, etc) in some external storage (database, spreadsheet, xml-files, etc) and then use that data iteratively in your tests when running them. For example to test your phone-lookup service, you might have a list of names and expected phone-numbers in a database which you would use to "drive" your test, checking that each name gets the right phone-number back.
Here,I am creating a CSV file and named as input file. I add groovy test script to it. let's create variable input variable Path and call the test runner. I have defined the property in test suite and Iam going to get that property value and read the data out of that file and convert into string.
Read data and setting the property value from that file. Each times it adds the value and run the test case and loop through this file and put the test case name which we want to use for our test. In this case I used Numconvert. It is performing function what I want .
September 13, 2020
Selenium Basics
2. What are the benefits of Automation testing ?
Enables parallel execution
Improves accuracy thereby reducing human-generated errors
Saves time and money
4. Why do you prefer Selenium Automation Tool?
Some of the benefits of Selenium to do automation testing are
Free and open source –
Have large user base and helping communities.
Cross Platform compatibility
Multiple programming languages
Parallel Execution
Continuous Integration
5.Which execution engine have you used?
7. What are the Selenium components?
Selenium IDE- It is a Firefox/Chrome plug-in that was developed to speed up the creation of automation scripts. It records the user actions on the web browser and exports them as a reusable script.
Selenium Web Driver- Web Driver is a programming interface that helps create and run test cases. It makes provision to act on web elements. Unlike RC, Web Driver does not require an additional server and interacts naively with the browser applications.
Selenium Grid- Grid was designed to distribute commands to different machines simultaneously. It allows the parallel execution of tests on different browsers and different operating systems.
8. What is Selenium framework?
Is is a code structure for making code maintainable simpler and code readability better. It involves breaking the entire code into smaller pieces of code which test a particular functionality.
9. What are the different types of framework available in Selenium?
Data Driven Framework:-
When the entire test data is generated from some external files like Excel, CSV, XML or some database table, then it is called Data Driven framework.
Keyword Driven Framework:-
When only the instructions and operations are written in a different file like an Excel worksheet or in feature file, it is called Keyword Driven framework.
Hybrid Framework:-
Challenges -it is difficult to test image based application.
Can not perform tests on web services like soap and rest using Selenium
Limitations- Can not test mobile applications and window based applications, can not test the barcode.
11. Which Framework you worked on?
12.What was your challenge during framework design?
My challenge was to identifying the proper structure and all right components which fulfill our current and future requirements. The main challenge was how to write page functions, libraries of the framework.
13. What source code management tool have you used?
I have used git repository for my source code management. It is the Central location where we can push our code and people can clone. We can resolve the conflicts and merge and check out the project.
14. How many team members were there in your team?
In my company, we follow agile approach . We have small number of team. In my module, there are 5 members out of 2 QA , whose responsibilities is to start automation from functional testing to the performance testing.
15. How many browser have you covered?
Basically 2- Chrome, Firefox
16. How did you manage to work in multiple browser?
We use Jenkins to trigger our scripts.
17. How many scripts do you automate in a day?
It depends on end to end Scenario, How good framework you have whether all page factory ready or not.
18. What are the testing types supported by Selenium?
Selenium basically supports Regression testing and Functional testing, UAT testing.
Re-testing: All tests in the existing test suite are executed. It proves to be very expensive and time-consuming.
Regression test selection: Tests are classified as feature tests, integration tests, and the end to end tests. In this step, some of the tests are selected.
Prioritization of test cases: The selected test cases are prioritized based on business impact and critical functionalities.
Functional testing - Functional Testing involves the verification of every function of the application with the required specification.
The following are the steps involved:
Identify test input
Compute test outcome
Execute test
Compare the test outcome with the actual outcome
19. What is the difference between Selenium 2.0 and Selenium 3.0?
Selenium 2.0 is a tool that makes the development of automated tests for web applications easier. It represents the merger of the original Selenium project with the Web Driver project. Selenium RC got deprecated since the merge, however, was used for backward compatibility
Selenium 3.0 is the extended version of Selenium 2.0. It is inherently backward compatible and does not involve Selenium RC. The new version came along with several bug fixes and increased stability.
20. What is the same-origin policy and how is it handled?
Same Origin policy is a feature adopted for security purposes. According to this policy, a web browser allows scripts from one web page to access the contents of another web page provided both the pages have the same origin. The origin refers to a combination of the URL scheme, host name, and port number.
Selenese is the set of Selenium commands which are used to test your web application. The tester can test the broken links, the existence of some object on the UI, Ajax functionality, alerts, window, list options, and a lot more using Selenese.
Action: Commands which interact directly with the application
Accessors: Allow the user to store certain values to a user-defined variable
Assertions: Verifies the current state of the application with an expected state
22. Mention the types of Web locators.
Locator is a command that tells Selenium IDE which GUI elements ( say Text Box, Buttons, Check Boxes, etc) it needs to operate on. Locators specify the area of action.
Locator by ID: It takes a string parameter which is a value of the ID attribute which returns the object to findElement() method.
Locator by the link: If your targeted element is a link text then you can use the by.linkText locator to locate that element.
Locator by Partial link: The target link can be located using a portion of text in a link text element.
Locator by Name: The first element with the name attribute value matching the location will be returned.
Locator by TagName: Locates all the elements with the matching tag name
Locator by classname: This finds elements based on the value of the CLASS attribute. If an element has many classes then this will match against each of them.
Locator by XPath: It takes a parameter of String which is a XPATHEXPRESSION and it returns an object to findElement() method.
Locator by CSS Selector: Locates elements based on the driver’s underlying CSS selector engine.
23. Mention the types of navigation commands
driver.navigate() - Navigates to the provided URL
driver.navigate().refresh() - This method refreshes the current page
driver.navigate().forward() - This method does the same operation as clicking on the Forward Button of any browser. It neither accepts nor returns anything.
driver.navigate().back() - This method does the same operation as clicking on the Back Button of any browser. It neither accepts nor returns anything.
24. What is the major difference between driver.close() and driver.quit()?
driver.close()- This command closes the browser’s current window. If multiple windows are open, the current window of focus will be closed.
driver.quit()- When quit() is called on the driver instance and there are one or more browser windows open, it closes all the open browser windows.
25. How to type text in an input box using Selenium?
SendKeys() is the method used to type text in input boxes
26. How to mouse hover over a web element?
Actions class utility is used to hover over a web element in Selenium Web Driver
Instantiate Actions class.
Actions action = new Actions(driver);
27. What is POM (Page Object Model)?
Every web page of the application has a corresponding page class that is responsible for locating the web elements and performing actions on them. Page Object Model is a design pattern that helps create object repositories for the web elements. POM improves code re-usability and readability. Multiple test cases can be run on the object repository. It keeps the test and element locators separately.
28. Difference between Page Factory and Page Object model?
Page Object Model- It is a design pattern to create object repository for web UI elements. Each web page should have corresponding page class.
Page Factory- It is the way to initialise the web elements within the page object when an instance is created.
29. How to handle multiple windows in Selenium?
A window Handle is a unique identifier that holds the address of all the windows. This is basically a pointer to the window which returns the string value.
getWindowHandle()- To get the current window handle.
getWindowHandles ()- To get all opened window handles.
30. What are assert and verify commands?
Assert is used to compare actual result with excepted result.
Verify means there wont be any halt in the test execution even though the verify condition is true and false. Verifies if the specified condition is true and false. If the result is true, the next test step will be executed. In case of false condition, the execution would still continue
Switch To() command is used to switch between windows, frames or pop-ups within the application. Every window instantiated by the Web Driver is given a unique alphanumeric value called “Window Handle”.
Get the window handle of the window you wish to switch to
String handle= driver.getWindowHandle();
Switch to the desired window
driver.switchTo().window(handle);
32. When do we use findElement() and findElements()?
findElement() is used to access any single element on the web page. It returns the object of the first matching element of the specified locator. It throws an exception when element is not visible.
General syntax:
WebElement element = driver.findElement(By.id(page1));
findElements() is used to find all the elements in the current web page matching the specified locator value. All the matching elements would be fetched and stored in the list of Web elements. It does not throw an exception when elements are not visible.
General syntax:
List <WebElement> elementList = driver.findElements(By.id(page1));
33. What is the difference between single and double slash in Xpath?
Single slash is used to create Xpath with an absolute path i.e. the XPath would be created to start selection from the start node.
/html/body/h1/h2
Double slash is used to create Xpath with relative path i.e. the XPath would be created to start selection from anywhere within the document
//div[class="hello"]
34. Selenium WebDriver Commands in C#:
Browser commands- Url, Title, pageSource, close, quit, back, forward, refresh
Web Element commands- Click, Clear, SendKeys, Displayed, Enabled, Selected, Submit,Text, TagName, GetCSSValue
Dropdown commands- SelectByText, SelectByValue, options, IsMultiple, deselectAll, deselectByIndex, deselectByValue, deselectByText
36. Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.
We can write a code such that we specify the xpath of the web element that needs to be visible on the page and then ask the WebDriver to wait for a specified time. Look at the sample piece of code below:
WebDriverWait wait=new WebDriverWait(driver, 20);
Element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath( “<xpath”)));
Similarly, we can write another piece of code asking the WebDriver to wait until an error appears like this:
WebDriverWait wait=new WebDriverWait(driver, 20);
Element = wait.until(ExpectedConditions.alertIsPresent());
37.How can you fetch an attribute from an element? How to retrieve typed text from a textbox?
We can fetch the attribute of an element by using the getAttribute() method. Sample code:
WebElement eLogin = driver.findElement(By.name(“Login”);
String LoginClassName = eLogin.getAttribute("classname");
38. What is a Robot class?We can fetch the attribute of an element by using the getAttribute() method. Sample code:
WebElement eLogin = driver.findElement(By.name(“Login”);
String LoginClassName = eLogin.getAttribute("classname");
This robot class provides control over the mouse and keyboard devices.
The methods include:
KeyPress(): This method is called when you want to press any key.
KeyRelease(): This method is used to release the pressed key on the keyboard.
MouseMove(): This method is called when you want to move the mouse pointer in the X and Y co-ordinates.
MousePress(): This is used to press the left button of the mouse.
MouseMove(): This method helps in releasing the pressed button of the mouse.
This is a 2 step process:
Identify the ‘select’ html element (Because dropdowns must have the ‘select’ tag)
Select an option from that dropdown element
To identify the ‘select’ html element from the web page, we need to use findElement() method. Look at the below piece of code:
WebElement mySelectElement = driver.findElement(By.id("mySelect"));
Select dropdown = new Select(mySelectElement);
Now to select an option from that dropdown, we can do it in either of the three ways:
dropdown.selectByIndex(“1”); → Selecting, by choosing the Index number of that option
dropdown.selectByValue(“option2”); → Selecting, by choosing the value of that option
Key concepts in Pipeline
1. Agent- To build your code or deploy your software using azure pipelines, you need at least one agent. Two types of agent- Microsoft host...
-
Author- Who creates the work product and fix the defects Management- Review planning, defining scope, selecting people, checking entry an...
-
There are different components of JMeter are called Elements that serve their own purpose. Thread Group- Thread Groups is a collection of T...
-
Review types -- Informal Review -Generating new ideas or solutions, quickly solving minor problems Walk through - Exchanging ideas about t...