Wednesday 21 September 2022

How to auto save files using a custom Firefox profile?

 

SDET Interview Question and Answers.  

Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

GIT Interview Questions and Answers

How to auto save files using a custom Firefox profile?

The first step is to identify the type of file you want to auto save.

To identify the content type you want to download automatically, you can use curl:

curl -I URL | grep "Content-Type"

Another way to find the content type is by using the requests module, you can use it like this:

import requests
content_type = requests.head('http://www.python.org').headers['content-type']
print(content_type)

Once the content type is identified, you can use it to set the firefox profile preference: browser.helperApps.neverAsk.saveToDisk

Here is an example:

import os

from selenium import webdriver

fp = webdriver.FirefoxProfile()

fp.set_preference("browser.download.folderList",2)
fp.set_preference("browser.download.manager.showWhenStarting",False)
fp.set_preference("browser.download.dir", os.getcwd())
fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream")

browser = webdriver.Firefox(firefox_profile=fp)
browser.get("http://pypi.python.org/pypi/selenium")
browser.find_element_by_partial_link_text("selenium-2").click()

In the above example, application/octet-stream is used as the content type.

The browser.download.dir option specify the directory where you want to download the files.


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

✍️AUTHORLinkedIn Profile

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

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employee and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33


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

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python


 

Friday 16 September 2022

What are DevOps Best practices?

 



SDET Interview Question and Answers.  


Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

GIT Interview Questions and Answers


Most Used Docker Commands:Interview Question



There are a few key practices that help organizations innovate faster through automating and streamlining software development and infrastructure management processes. Most of these practices are accomplished with proper tooling.

One fundamental practice is to perform very frequent but small updates. This is how organizations innovate faster for their customers. These updates are usually more incremental in nature than the occasional updates performed under traditional release practices. Frequent but small updates make each deployment less risky.

 They help teams address bugs faster because teams can identify the last deployment that caused the error. Although the cadence and size of updates will vary, organizations using a DevOps model deploy updates much more often than organizations using traditional software development practices.

Organizations might also use a microservices architecture to make their applications more flexible and enable quicker innovation. The microservices architecture decouples large, complex systems into simple, independent projects. Applications are broken into many individual components (services) with each service scoped to a single purpose or function and operated independently of its peer services and the application as a whole. 

This architecture reduces the coordination overhead of updating applications, and when each service is paired with small, agile teams who take ownership of each service, organizations can move more quickly.

However, the combination of microservices and increased release frequency leads to significantly more deployments which can present operational challenges. Thus, DevOps practices like continuous integration and continuous delivery solve these issues and let organizations deliver rapidly in a safe and reliable manner.

 Infrastructure automation practices, like infrastructure like code and configuration management, help to keep computing resources elastic and responsive to frequent changes. In addition, the use of monitoring and logging helps engineers track the performance of applications and infrastructure so they can react quickly to problems.

Together, these practices help organizations deliver faster, more reliable updates to their customers. Here is an overview of important DevOps practices.


The following are DevOps best practices: 

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

✍️AUTHORLinkedIn Profile

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

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employee and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33


Check below link for question and answers with the code:

Top API Interview Question 1-10

Top API INterview Questions 11-20 

Top API AUTOMATION Interview Q&A - 21-30

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

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python


 

What is AWS EC2 and ECS what are the main features of it?




 SDET Interview Question and Answers.  


Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

GIT Interview Questions and Answers

Amazon EC2

Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) Cloud. Using Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy applications faster. You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage. Amazon EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.

TOP 50 GIT Interview Q&A


Features of Amazon EC2

Amazon EC2 provides the following features:

  • Virtual computing environments, known as instances

  • Preconfigured templates for your instance, known as Amazon Machine Images (AMIs), that package the bits you need for your server (including the operating system and additional software)

  • Various configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types

  • Secure login information for your instances using key pairs (AWS stores the public key, and you store the private key in a secure place)

  • Storage volumes for temporary data that's deleted when you stop, hibernate, or terminate your instance, known as instance store volumes

  • Persistent storage volumes for your data using Amazon Elastic Block Store (Amazon EBS), known as Amazon EBS volumes

  • Multiple physical locations for your resources, such as instances and Amazon EBS volumes, known as Regions and Availability Zones

  • A firewall that enables you to specify the protocols, ports, and source IP ranges that can reach your instances using security groups

  • Static IPv4 addresses for dynamic cloud computing, known as Elastic IP addresses

  • Metadata, known as tags, that you can create and assign to your Amazon EC2 resources

  • Virtual networks you can create that are logically isolated from the rest of the AWS Cloud, and that you can optionally connect to your own network, known as virtual private clouds (VPCs)

For more information about the features of Amazon EC2, see the Amazon EC2 product page.


Elastic Container Service (ECS)

Amazon EC2 Container Service (Amazon ECS ) is a container  management service that supports Docker containers. ECS allows you to run applications on a managed cluster of Amazon EC2 instances. With Amazon ECS, you do not need to install, operate, and scale your own cluster management infrastructure.

You can use API calls to launch and stop Docker-enabled applications, query the complete state of your cluster, and access many familiar features such as security groups, Elastic Load Balancing, EBS volumes, and IAM roles. You can use Amazon ECS to schedule the placement of containers across your cluster, based on your resource needs and availability requirements. You can also integrate your own scheduler or third-party schedulers to meet business or application specific requirements.

There is no additional charge for Amazon EC2 Container Service. You pay for the AWS resources (such as EC2 instances or EBS volumes) you create to store and run your application.

Recommendation

Use ECS for any containerized application such as microservices and long-running async tasks (similar to AWS Batch) running workloads that are not supported by Fargate. Adds high overhead of managing and scaling EC2 instances, but gives high amount of control over the hardware type (GPU, specific CPU generations). Allows on-host debuggability (ssh in and look around), and allows control over running “supporting” daemons on the host (both containerized and not), like metric agents, log pushers, etc. It is a simpler hop from ECS to Fargate when ready. Of course currently a one-way door if your end goal is Lambda.


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

✍️AUTHORLinkedIn Profile

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

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employee and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33


Check below link for question and answers with the code:

Top API Interview Question 1-10

Top API INterview Questions 11-20 

Top API AUTOMATION Interview Q&A - 21-30

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

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python


 

Top Asked BDD Cucumber Interview Questions and Answers 2022?

 


 

Check Selenium Interview questions from 1 to 10 below:


Check Selenium-SDET-UIAutomation Questions set 11 to 20:
Qus Set - 11 to 20

Check Selenium-SDET-UIAutomation Questions set 21 to 30:
 
Check Selenium-SDET-UIAutomation Questions set 31 to 40:

 Question Set 31-40  


Behaviour-Driven Development (BDD) is a software development
process that Cucumber was built to support.

There’s much more to BDD than just using Cucumber. 

HISTORY :Behavior-driven development was pioneered by Daniel Terhorst-North back in the early 00s, as he explained in a 2006 article called Introducing BDD. It grew from a response to test-driven development (TDD), as a way to help programmers on new agile teams “get straight to the good stuff” of knowing how to approach testing and coding, and minimize misunderstandings. BDD has evolved into both analysis and automated testing at the acceptance level. Liz Keogh, another BDD pioneer, started writing and speaking about it extensively beginning in 2004.

If you are new to BDD_Cucumber, please refer to the LINK HERE to install BDD_CUCUMBER

What is BDD?

BDD is a way for software teams to work that closes the gap between business people and technical people by:

  • Encouraging collaboration across roles to build a shared understanding of the problem to be solved
  • Working in rapid, small iterations to increase feedback and the flow of value
  • Producing system documentation that is automatically checked against the system’s behaviour

We do this by focusing collaborative work around concrete, real-world examples that illustrate how we want the system to behave. We use these examples to guide us from concept through to implementation, in the process of continuous collaboration.


SDET Interview Question and Answers.  

Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

GIT Interview Questions and Answers

What is meant by a Feature file?

The feature file in Cucumber is the starting point of the Cucumber test execution.

A feature file can have a single or multiple scenarios but normally it contains a group of scenarios.

The Feature file is the High-level description of the Application under Test.

The feature file format will be like file_name. a feature where a single file contains a single feature.

What does the feature file consist of?

Feature files in cucumber consist of parameters and 

conditions required for executing the code, they are

  • Feature

  • Scenario

  • Scenario Outline

  • Given

  • When

  • Then

How do I set up Selenium and Cucumber? Can you share some of the dependencies
required to create a BDD framework?

Please find the entire pom.xml with all Dependencies LINK HERE.
Remember that Maven has been used as Dependency Management here

 What are the Primary and secondary keywords in BDD_CUCUMBER?


The primary keywords are:

Here are a few secondary keywords as well:

  • """ (Doc Strings)
  • | (Data Tables)
  • @ (Tags)
  • # (Comments)


    IMPORTANT FACTS: The language you choose for Gherkin
    should be in the same language as your users and domain experts
    use when they talk about the domain. Translating between
    two languages should be avoided.This is why Gherkin
    has been translated to over 70 languages .

Write your first Cucumber script with Selenium from scratch

For the below scenario

Scenario: Finding some cheese
  Given I am on the Google search page
  When I search for "Cheese!"
  Then the page title should start with "cheese"

ANS: The entire code from scratch has been written in the
 POST HERE which you can use in your IDE and execute for practice

I would suggest to first run it and then make the changes as per your project

What is the Scenario Outline for Cucumber-BDD?

Scenario outline is a method of parameterization of scenarios.

It is used to execute scenarios multiple 

times using a different set of test data. Multiple 

sets of test data are provided using "Examples"

in a tabular structure separated by pipes (| |)

Feature: Application Login
Scenario Outline: Application Website Login
Given Open browser
When NewUser enters "<uname>" and "<password>" and "<send_text>"
Then Message displayed Login Successful
Examples:
| uname | password | send_text |
| side@ama.org | l444444e112 | automationreinvented|
| asidu@ama.org | sid@123| automationreinvented |


Explain when to use Rspec and when to use Cucumber?

Rspec is used for Unit Testing

Cucumber uses behaviour driven development. 

Cucumber can be used for System and Integration Tests

Learn more about Rspec usage in the link HERE

How to Create HTML report in BDD_Cucumber with plugin?

Kindly refer to the LINK HERE for the entire code to generate HTML or JSON report with cucumber.


What is Step Definition?

Step definitions connect Gherkin steps to programming code. A step definition carries out the action that should be performed by the step. So step definitions hard-wire the specification to the implementation.

┌────────────┐                 ┌──────────────┐                 ┌───────────┐
│   Steps    │                 │     Step     │                 │           │
│ in Gherkin ├──matched with──>│ Definitions  ├───manipulates──>│  System   │
│            │                 │              │                 │           │
└────────────┘                 └──────────────┘                 └───────────┘

Step definition maps the test case steps in the feature files (introduced by Given/When/Then) to the code which

executes and checks the outcomes from the system 

under test. Step definitions file has the actual code

implementation of the Scenario or Scenario Outline step.

Feature file:

Feature:
  Scenario:
    Given verify two values 'text', 'test'

Step Definition:

public class Test {
@Given("verify two values '(.*)', '(.*)'")
public void verifytwovalues(String arg1, String arg2) {
Assert.assertEquals(arg1,arg2);
}



What is Background in a Feature file?

Steps written under the Background keyword are executed before every scenario.

For example:

If you want to execute the same steps for every scenario like login to the website,

you just write those common steps under the  background keyword.

Feature: Validation of Account Balance
Background:
Given I log in to the Application
Scenario: Verify Positive Balance
Given I have $5000 in my account
When I withdraw $50
Then I should have $950 balance
Scenario: Verify Zero Balance
Given I have $5000 in my account
When I withdraw $5000
Then I should have $0 balance


Explain BDD flow?


Explain Cucumber Hooks?

Cucumber Hooks are blocks of code that can bused to run before

and after scenarios 

using @before and @after methods. It helps us eliminate the redundant code 

steps that we write for every scenario and also manage our code workflow.

public class Hooks {

@Before
public void before(){
System.out.println("This will execute before every Scenario");
}
@After
public void after(){
System.out.println("This will execute after every Scenario");
}
}


Why do we use Monochrome & Dryrun in Cucumber?

Kindly check the LINK HEREas this post 

has many most used BDD commands apart from Monochrome and Dryrun.

Do let me know if anymore needs to be added

Explain the basic scenario in BDD? When we do Behaviour-Driven Development with Cucumber we use concrete examples to specify what we want the software to do. Scenarios are written before production code. They start their life as an executable specification. As the production code emerges, scenarios take on a role as living documentation and automated tests.

Feature: Login Feature
  Verify if the user is able to Login to the site

  Scenario: Login as an authenticated user
    Given user is  on homepage
    When the user navigates to the Login Page
    And user enters username and Password
    Then the success message is displayed


Integration of Jira with Cucumber? How to setup and activate Cucumber on your JIRA project?


ANS: Checkout the post HERE with all the steps and details. Do try to integrate the same if you are usinh JIRA for test management in your project.


TIPS:

Watir

Watir only works with Ruby.

Capybara

Capybara only works with Ruby.


*******************************************************************
For any doubts or career guidance, arrange a 1:1 call with me 


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

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

✍️AUTHORLinkedIn Profile

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

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employee and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 500+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33



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

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python


 

All Time Popular Posts

Most Featured Post

API Status Codes with examples for QA-Testers

  🔺 LinkedIn: https://www.linkedin.com/in/sidharth-shukla-77b53145/ 🔺 Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 🏮In API testing, it...