You are a test analyst trying to understand a user story for a social media product. Your task is to identify and list every testable element of the software product that is stated or implied by this user story. You must present your output in JSON form without any commentary. For instance, if the user story mentions sending a notification, then "notifications" should be included in the JSON. The JSON should have a simple array format.
Wednesday, 27 March 2024
Do This for Every Story - ChartGPT AI
Where you applied OOPS in your automation framework?
Step-by-Step guide to scheduling jobs in Jenkins:
Scheduling jobs in Jenkins is a fundamental task, especially for QA (Quality Assurance) processes.
1. Access Jenkins Dashboard:
- Open a web browser and navigate to your Jenkins instance's URL.
- Log in to Jenkins with your credentials to access the Jenkins dashboard.
2. Create or Select Job:
- If you haven't already created the job for your QA tasks, you can create one by clicking on "New Item" on the Jenkins dashboard.
- Enter a name for your job, select the type of job (e.g., Freestyle project, Pipeline), and click "OK."
- If you already have a job configured for your QA tasks, navigate to it from the Jenkins dashboard.
3. Configure Job:
- Configure your job according to your QA requirements. This may include defining build steps, setting up test execution, configuring post-build actions, etc.
- Ensure that your job performs the necessary QA tasks such as running tests, static code analysis, or any other quality checks.
4. Schedule Build:
- In the job configuration page, locate the "Build Triggers" section.
- Check the option for "Build periodically."
- In the "Schedule" field, specify the cron syntax to define when the job should be triggered. For example, to run the job every day at midnight, you can use `0 0 * * *`.
- You can use Jenkins' built-in help or search online for cron syntax if you're not familiar with it.
5. Save Configuration:
- Once you've configured the schedule, scroll down to the bottom of the job configuration page and click "Save" to apply the changes.
6. Monitor Execution:
- Jenkins will now automatically trigger the job based on the schedule you've configured.
- Monitor the job executions from the Jenkins dashboard to ensure that your QA tasks are being performed as expected.
Ways to Pass Payloads in Rest Assured for API Automation
Various ways we can pass payloads to our HTTP methods (POST, PUT, UPDATE) for API automation using Rest Assured.
1. Inline Payload:
This method involves directly passing the payload as a string within the request body. It is suitable for smaller payloads and can be implemented easily using Rest Assured's request specification.
2. External JSON File:
For larger payloads or when reusability is important, storing the payload in an external JSON file is a good approach. Rest Assured allows you to read the JSON file and pass it as the request body. This method enhances code readability and simplifies maintenance.
3. POJO (Plain Old Java Object):
In this approach, you create a Java class that maps to the structure of your payload. Rest Assured can serialize the POJO into JSON/XML and pass it as the request body. This method is beneficial when working with complex and nested payload structures, as it provides strong typing and better code organization.
4. Map or HashMap:
If your payload is relatively simple and doesn't require a predefined structure, you can use a Map or HashMap to represent the payload key-value pairs. Rest Assured will automatically convert the Map into JSON/XML and send it as the request body.
5. Serialization Libraries (GSON, Jackson):
Rest Assured seamlessly integrates with popular JSON serialization libraries like GSON and Jackson. You can use these libraries to convert Java objects or Maps into JSON and pass them as the request body. This approach offers more flexibility and customization options.
6. Form Parameters:
For form data submission, Rest Assured supports adding form parameters to the request. You can use the `.formParam()` method to pass key-value pairs, which will be encoded as application/x-www-form-urlencoded.
Most asked QA interview question
1.What is the use of POM.XML?
Use of pom.xml:
- pom.xml stands for "Project Object Model" and is a fundamental part of Apache Maven, a popular build automation tool primarily used for Java projects.
- The pom.xml file contains project configuration information and acts as a blueprint for building the project.
- Key uses of pom.xml include:
- Defining project metadata such as group ID, artifact ID, version, and dependencies.
- Specifying build settings like plugins, goals, and profiles.
- Managing project dependencies and transitive dependencies.
- Declaring repositories where Maven can download dependencies.
- Configuring project-specific settings like source directories, output directories, and build lifecycle phases.
Overall, pom.xml serves as a central configuration file that Maven uses to manage and build the project, ensuring consistency and reproducibility across different environments.
2. What is the use of testng.xml?
Use of testng.xml:
- testng.xml is a configuration file used specifically with TestNG, a popular testing framework for Java.
- The testng.xml file allows users to define the test suite and configure various aspects of test execution.
- Key uses of testng.xml include:
- Defining test suites: You can specify which test classes or test methods should be included or excluded from the test suite.
- Configuring test parameters: You can set parameters for test methods or classes, which can be accessed during test execution.
- Specifying test groups: You can group test methods or classes and selectively run tests based on these groups.
- Configuring test execution settings: You can define parallel execution, thread counts, timeout settings, and other execution-related parameters.
- Setting up listeners: You can configure listeners to monitor test execution and perform actions based on test events.
- Overall, testng.xml provides a flexible and customizable way to configure and run tests using TestNG.
SQL Interview Questions Commonly Asked for QA
Basic SQL Queries:
Fetch all columns from a table:
SELECT * FROM table_name;
Get distinct values from a column:
SELECT DISTINCT column_name FROM table_name;
Retrieve top N records from a table:
SELECT * FROM table_name LIMIT N;
Filtering and Sorting:
Filter rows where a column equals a value:
SELECT * FROM table_name WHERE column_name = value;
Filter rows within a range:
SELECT * FROM table_name WHERE column_name BETWEEN value1 AND value2;
Retrieve rows with NULL values in a column:
SELECT * FROM table_name WHERE column_name IS NULL;
Sort result set in ascending/descending order:
SELECT * FROM table_name ORDER BY column_name ASC/DESC;
Aggregate Functions:
Count total rows:
SELECT COUNT(*) FROM table_name;
Calculate average, sum, min, max:
SELECT AVG(column_name), SUM(column_name), MIN(column_name), MAX(column_name) FROM table_name;
Group and calculate aggregates:
SELECT column_name, AVG(salary) FROM table_name GROUP BY column_name;
Joins:
INNER, LEFT, RIGHT, FULL joins explained:
INNER: Retrieve common rows from both tables.
LEFT: All rows from the left table and matching rows from the right.
RIGHT: All rows from the right table and matching from the left.
FULL: All rows from both tables.
Retrieve data from multiple tables:
SELECT * FROM table1 JOIN table2 ON table1.column_name = table2.column_name;
Subqueries:
Using a subquery to retrieve data:
SELECT * FROM table_name WHERE column_name IN (SELECT column_name FROM another_table);
Comparing values between tables:
SELECT * FROM table1 WHERE column_name = (SELECT column_name FROM table2 WHERE condition);
Data Modification:
Insert new record:
INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...);
Update records:
UPDATE table_name SET column_name = new_value WHERE condition;
Delete records:
DELETE FROM table_name WHERE condition;
Table Design and Constraints:
Primary key vs. Foreign key differences:
Primary key uniquely identifies a record, while a foreign key links to another table's primary key.
Design a table schema:
Create table with appropriate columns, primary keys, and foreign keys.
Advanced Queries:
Retrieve the nth highest (or lowest) value:
SELECT column_name FROM table_name ORDER BY column_name DESC LIMIT n-1, 1;
Scenario Based Frequently Asked Interview Q&A on TestNG
Scenario: Handling Flaky Tests
Question: How would you deal with flaky tests in your Selenium automation suite using TestNG?
Answer: To address flaky tests, I would implement retry logic in TestNG. By using the retryAnalyzer feature in TestNG, I can specify a custom retry analyzer class that determines whether a failed test should be retried based on certain conditions, such as specific exceptions or test result statuses. This helps improve the reliability of the test suite by rerunning failed tests automatically.
Scenario: Parallel Execution
Question: Explain how you would implement parallel execution of tests in TestNG for faster execution in your Selenium automation framework.
Answer: TestNG allows running tests in parallel, either at the suite or test level, by organizing them into different suites and configuring parallel attributes like "parallel" and "thread-count".
<suite name="MyTestSuite" parallel="tests" thread-count="5">
<!-- Test configurations -->
</suite>
Scenario: Data-Driven Testing
Question: Describe how you would perform data-driven testing using TestNG in your Selenium automation framework.
Answer: TestNG supports data-driven testing through its @DataProvider annotation, which allows me to supply test data from external sources such as Excel sheets or databases. I can create a method annotated with @DataProvider to provide test data, and then annotate my test methods with @Test(dataProvider) to execute the tests with different data sets. This enables to execute the same test logic with multiple input values and verify the expected behavior.
@DataProvider(name = "loginData")
public Object[][] getLoginData() {
return new Object[][] {
{"user1", "pwd1"},
{"user2", "pwd2"},
};
}
@Test(dataProvider = "loginData")
public void loginTest(String username, String password){}
Scenario: Grouping and Tagging Tests
Question: How would you group and tag tests in TestNG for better organization and selective execution in your Selenium automation framework?
Answer: TestNG allows grouping tests using the @Test(groups) annotation, enabling selective execution and better organization of test suites by defining groups in testng.xml. This allows for selective execution of tests and better organization of test suites like smoke, sanity, regression.
@Test(groups = {"smoke", "regression"})
public void loginTest() {
// code
}
SOAP API & REST API
SOAP API
- SOAP APIs were widely used during this time to enable interoperability between applications running on different platforms and written in different programming languages.
- SOAP APIs were particularly popular in enterprise applications, where they were used to expose functionality in a standardized, secure, and reliable way.
- However, with the emergence of RESTful APIs, which are simpler, more flexible, and more efficient than SOAP APIs, their usage has declined in recent years.
- SOAP is designed to be platform and language independent, making it well suited for integration with a variety of systems. It uses a standard format for sending and receiving messages, allowing for a common method of communication between different systems.
- SOAP defines a set of rules for structuring messages and exchanging data over the internet.
- It uses a combination of XML and HTTP to send and receive messages, making it independent of the underlying transport protocol.
- SOAP messages can be sent over a variety of transport protocols, including HTTP, SMTP, and TCP.
REST API
- REST is an acronym for Representational State Transfer.
- It’s an architectural style that specifies guidelines for creating loosely linked apps that communicate via the HTTP protocol.
- REST does not provide how to put the ideas into practice at a lower level. Instead, the REST principles allow developers to customize the details to their specific requirements.
- Also, RESTful web services are online services that follow the REST architectural paradigm.
- A Restful service will use the standard HTTP verbs GET, POST, PLACE, and DELETE to interact with the required components. REST uses XML, JSON (JavaScript Object Notation), or plain text for all requests and responses.
- It is faster than SOAP because JSON (lightweight) is utilized in the request/payload.
Exploratory Testing
- Test to explore the product
- Test to know/learn more about product
- Test to enhance your perception about product
- Test to find risks
- Test to find hidden bugs
- Test to find usability blockers
- Test to build trust on the product
- Test for performance issues/delays
- Test to make sure the end user likes the product
- Test the new processes and good practices to build smooth coordination within Team (Dev/Testers/BA/PO..etc)
- Test to contribute to the world in the smallest possible way.
Monday, 25 March 2024
Salesforce Flows Interview Questions
1. What is Salesforce?
Salesforce is a cloud-based CRM (Customer relationship management) tool providing a wide range of cloud applications like Marketing Cloud, Service Cloud, Sales Cloud, and many more. Salesforce is developed on the top of the Force.com platform.
2. What is Flow?
Salesforce Flow is an automation tool that allows you to build and automate business processes without requiring any coding skills. Flows can be used to collect and update data, automate approvals, create records, and perform other tasks.
3. What is Flow Builder?
Flow builder is a user interface used for building Flows in Salesforce. It consists of three main components namely Canvas, Toolbox, and Button bar.
4. What are the different types of Flow in Salesforce?
Screen Flow, Auto-launched Flow, Record Triggered Flow, Schedule-Triggered Flow, Platform Event – Triggered Flow
5. How many maximum Flow versions can be there for each Flow?
50, to create more flow versions, you need to delete the older versions.
6. What is a Flow template?
Flow templates are pre-designed Flows that allow businesses to utilize these Flow structures and modify them according to their business requirements
7. What is Flow Interview?
A flow interview refers to a particular execution of a flow, which represents a complete run of that flow.
8. What is a fault connector in Salesforce Flow?
In Salesforce flows, a fault connector is a connector that facilitates the management of errors and exceptions that might arise while executing the flow.
9. Pause element in Salesforce can be used with which type of flows?
Auto-launched flow
10. Can we trigger time-dependent flows?
Yes, scheduled Flows can be used to perform this task.
11. How to store error messages using a fault connector to display to the user?
Using {!$Flow.FaultMessage} on a Screen flow component
12. How many maximum numbers of tests per Flow is allowed in Salesforce?
200
13. Flow tests are available for only which type of Salesforce Flow?
Record-triggered flows
14. What is the latest API Version used in Salesforce flows?
57
15. How many Total duplicate updates are allowed in one batch in Salesforce flows?
12
16. According to the suggested best practice, how many same flows per object should be created?
One
17. Can we open a Salesforce flow that is installed from a managed package?
No
18. What happens when testing an inactive flow that contains deleted element?
Delete operation will be triggered
19. How can you trigger a flow in Salesforce?
Flows can be triggered by various events, such as record creation, record updates, button clicks, or custom Apex code.
20. How can data be transferred between different elements within a flow?
Within a flow, information can be exchanged between elements by utilizing variables. These variables serve as containers for storing various types of data, including record IDs, field values, or user input. By leveraging variables, data can seamlessly flow and remain accessible throughout different elements of the flow.
21. What is the purpose of a screen element in a flow?
During the execution of a flow, screens enable users to actively contribute by providing data input or making selections. These screens are capable of presenting various interface elements such as fields, picklists, radio buttons, and checkboxes, allowing users to conveniently and interactively provide the necessary input.
22. Explain the decision element in a flow?
The decision element within a flow empowers you to assess conditions and make determinations regarding the appropriate course of action. Comparable to an "if-else" statement, it serves as a powerful tool for constructing branching logic within the flow. By leveraging the decision element, you can effectively navigate different paths based on the outcomes of evaluated conditions.
23. What is a loop element in a flow and how is it used?
In a flow, the loop element provides the ability to iterate through a collection of records or execute a set of actions repeatedly. This element proves valuable when there is a need to accomplish a task in a repetitive manner within the flow.
24. Total number of Scheduled actions that are executed per hour in Salesforce Flows?
1000
25. Is VLOOKUP Function supported in the Salesforce flow formula field?
No
26. How many Salesforce interviews can be in waiting at a given point of time in Salesforce Org?
50,000
27. How can you create a record using a flow?
Records can be created using the "Create Records" element in a flow. You can specify the object, field values, and any required relationships.
28. Can you update existing records using a flow?
Yes, the Update Records element enables the modification of records within a flow. By utilizing this element, you can precisely specify the target object, set conditions to identify the records to be updated and provide the desired new field values.
29. How can you query records in a flow?
Records can be queried using the "Get Records" element in a flow. You can specify the object, fields, and conditions to retrieve the desired records.
30. What is a subflow?
A subflow is a reusable flow that can be called from within another flow.
31. Explain the use of active elements in a flow?
Action elements perform specific actions, such as sending an email, updating a record, or invoking Apex code.
32. What is the purpose of the "Record-Triggered Flow"?
The "Record-Triggered Flow" starts automatically when a record is created or updated.
33. In the Developer edition Salesforce org, how many Active flows per flow type can exist?
2000
34. In the Developer edition Salesforce org, how many Total flows per flow type can exist?
4000
35. What is the difference between a flow and a flow template?
A flow is a customized business solution created by a user. While a flow template is a pre-built, reusable flow provided by Salesforce, which can be customized to fit specific requirements.
36. What is the purpose of the "Before Save" flow?</p>
The "Before Save" flow is a record-triggered flow that runs before a record is saved to the database.
37. What are Salesforce Flow's best practices?
Always test your Flows Consider Using Subflows Never Perform DML Statements In Loops Document your Flows Never Hard Code Ids Plan for fault handling
Salesforce Admin - 4
Can we convert Lookup to Master-Detail?
Yes, but first you need to populate values in lookup field on each record available on the object.
Can we convert Master-Detail to Lookup?
Yes, but if you have created rollup summary fields then you need to delete those fields before converting master-detail to lookup.
Many-to-Many Relationship?
This can be implemented with the help of Junction Object.
Example :
Object 1 : Class
Object 2 : Student
Junction Object : Create lookup/master-detail field one related to Class and another related to Student Object.
What is Formula Field?
A read-only field that derives its value from a formula expression you define. The formula field is updated when any of the source fields change.
Difference b/w Picklist and Multi-select Picklist ?
- Picklist - User can select one option.
- Multi-Select Picklist - User can select one or more option together.
What is Global Picklist ValueSet?
Global picklist value set can be used by any picklist or multi-select picklist in any object.
What is Field Dependency?
- Create a dependent relationship that causes the values in a picklist or multi-select picklist to be dynamically filtered based on the value selected by the user in another field.
- The field that drives filtering is called the "controlling field." Standard and custom checkboxes and picklists with at least one and less than 300 values can be controlling fields.
- The field that has its values filtered is called the "dependent field." Custom picklists and multi-select picklists can be dependent fields.
What is Page Layout?
Page layout is used to display field values for records.
Through page layout we can control related lists as well.
What is Compact Layout?
Compact Layout is used to display selected fields and buttons on the page. It is also shown when we hover on the lookup relationship field.
What is Related List?
When lookup and master-detail relationship fields are created then on parent object related lists will be available. Through related list we can view child object records on parent object.
Types of Lightning Pages?
- App Page
- Home Page
- Record Page
Component Visibility?
Component Visibility helps to apply filter criteria to control whether component should be visible on the page or not.
What is Validation Rule?
To apply custom validation we can build validation rules.
Validation rule fires when the defined criteria matches upon record insert, update.
What is Feed Tracking?
Feed Tracking enables to track changes of selected fields and related record fields as well. Changes are shown in the chatter component. It shows old value, new value and who changed.
What is Salesforce?
- Salesforce is the world’s most popular CRM system.
- Many companies and customers rely on this dynamic, web-based,low-cost CRM platform.
- It was founded in March 1999 by former Oracle executive Marc Benioff.
- Salesforce CRM provides a complete feature-rich solutions for marketing, sales, services, health, non-profit, education, partner & community management etc.
What is CRM?
- It stands for Customer Relationship Management
- Broadly defined, CRM is a strategy for managing a company’s interactions with clients and sales prospects and ensuring ‘connect’ sustains throughout the relation.
Editions in Salesforce?
- Personal Edition
- Group Edition
- Professional Edition
- Enterprise Edition
- Performance Edition
- Unlimited Edition
- Developer Edition
- Contact Manager Edition
Licenses in Salesforce?
- Salesforce Users
- Salesforce Platform and Lightning Platform Users
- Chatter Plus Users (Chatter Only), Chatter Free Users, Chatter External Users
- Customer Community, Customer Community Plus, and Partner Community External Users
- Portal Users who are a member of a Salesforce Community
What is Field?
- A fields is like a database column.
- There are various data types are available in Salesforce to create fields.
- By entering values in fields, we create a record in Salesforce.
- Field can be standard as well as custom.
What is Tab?
- Clicking on Tabs we can navigate around an app.
- Every tab serves as the starting point for viewing, editing and entering information for a specific object.
- When we click a tab, the corresponding home page that object appears.
- For example, if we click the Accounts tab, the Accounts tab home page appears. It gives you access to all of the account records. We can view details of a particular record by click on it.
What is App?
- An App is a container for all the objects, tabs and other functionality.
- It is similar to a programming project where we keep all our code files.
- In Salesforce App consists simply of a name, a logo, and an ordered set of tabs.
What is Record?
- Records are the rows(entries) in object which are uniquely identified by there ids.
- We can create records by entering values in fields available in an object.
- We can create, edit, view and delete a record in Salesforce.
Standard Navigation and Console Navigation Apps?
Standard Navigation opens one record at a time on the Page where as in Console Navigation if you open more than one records so they are opened in sub tabs together.
Name Datatypes to create fields?
- Auto Number
- Formula
- Roll-up Summary
- Lookup Relationship
- Master-Detail Relationship
- External Lookup Relationship
- Checkbox
- Currency
- Date
- Date/Time
- Geolocation
- Number
- Percent
- Phone
- Picklist
- Picklist (Multi-Select)
- Text
- Text Area
- Text Area (Long)
- Text Area (Rich)
- Text (Encrypted)
- Time
- URL
What is Lookup Relationship?
- Creates a relationship that links one object to another object.
- The relationship field allows users to click on a lookup icon to select a value from a popup list.
- The other is the source of the values in the list.
What is Master-Detail Relationship?
- Creates a special type of parent-child relationship between two objects. One is known as child/detail where we create master-detail relationship field and another one is known as parent/master.
- Required on all detail records.
- Ownership and sharing of a detail record is determined by the master record.
- If user deletes the master record then all detail records are deleted.
- One can create rollup summary fields on the master records so that detail records can be summarized.
What is Rollup Summary Field?
- A read-only field that displays the sum, minimum or maximum value of a field in a related list.
- This field also can count all records available in related list.
- Rollup Summary field is always created on parent object.
Friday, 22 March 2024
Salesforce Admin - 3
Report Type:
A report type in Salesforce defines which objects and fields are available when creating a report. It determines the data that can be included in a report and how that data can be filtered and grouped.
Analytical Snapshot:
An analytical snapshot in Salesforce is a tool used to capture and report on historical data. It allows you to take a snapshot of data at a specific point in time and store it in a custom object for reporting and analysis purposes.
Account Team:
An account team in Salesforce is a group of users who work together on an account. Each account can have multiple account teams, each consisting of a combination of roles such as Account Owner, Account Manager, Sales Representative, etc. Account teams allow for collaboration and sharing of information related to an account.
Different APIs in Salesforce:
Salesforce offers several APIs (Application Programming Interfaces) for interacting with its platform, including:
- SOAP API
- REST API
- Bulk API
- Streaming API
- Metadata API
- Tooling API
- Chatter REST API
- Composite API
- Default Batch Size for Bulk API:
The default batch size for Bulk API in Salesforce is 200 records per batch. However, you can specify a different batch size when submitting a Bulk API job.
Recursive Workflow Rule:
A recursive workflow rule in Salesforce is a workflow rule that triggers itself, leading to an infinite loop of rule execution. This can happen when the actions of the workflow rule cause the same record to meet the rule criteria again, resulting in the rule being triggered repeatedly.
Avoiding Recursive Workflow Rules:
To avoid recursive workflow rules, you can:
Use criteria to prevent the rule from triggering on certain record updates.
Ensure that the actions of the rule do not cause the same rule criteria to be met again.
Use a field update to change a flag field after the workflow rule has executed once, and then include this flag field in the rule criteria to prevent further recursion.
Different Types of Reports:
There are several types of reports in Salesforce, including:
- Tabular Reports
- Summary Reports
- Matrix Reports
- Joined Reports
- Custom Report Types
Different Kinds of Dashboard Components:
Salesforce dashboards can contain various components to visualize data, including:
- Charts (Bar, Line, Pie, Donut, Gauge, etc.)
- Tables
- Metrics
- Gauges
- Visualforce Pages
- Custom Components (Custom HTML or JavaScript components)
- Filter Components
These components allow users to create interactive and insightful dashboards to monitor key metrics and performance indicators in Salesforce.
Visualforce Page: In Salesforce, Visualforce is a framework that allows developers to build custom user interfaces for Salesforce applications. A Visualforce page is a custom user interface created using Visualforce markup language, which is similar to HTML. Visualforce pages can display data, accept user input, and interact with the Salesforce database. They are often used to create custom forms, dashboards, and other user interface elements tailored to specific business needs.
Apex Governor Limits: Apex is the programming language used in Salesforce for creating custom business logic. Apex Governor Limits are runtime limits enforced by the Salesforce platform to ensure efficient resource utilization and to maintain the performance and stability of the multi-tenant environment. These limits include restrictions on the number of records that can be queried, the amount of CPU time that can be consumed, the number of DML (Data Manipulation Language) statements that can be executed, and more.
Governor Limits in Sandbox Instances: Yes, governor limits also apply to sandbox instances. Sandbox environments are essentially copies of production environments, and Salesforce enforces governor limits in sandboxes to ensure consistency in behavior between sandbox and production environments. This helps developers test their code under conditions that closely resemble the production environment.
Time Dependent Actions in Workflow Rules: In Salesforce, time-dependent actions in workflow rules cannot be added if the workflow rule criteria are not met at the time of evaluation. This means that if the criteria for the workflow rule are not true when a record is created or edited, Salesforce cannot schedule time-dependent actions. Time-dependent actions can only be scheduled when the criteria for the workflow rule are met during record creation or editing.
Types of Email Templates in Salesforce: Salesforce provides several types of email templates that can be used for different purposes:
- Text: Simple text-based email templates with no formatting.
- HTML with Letterhead: Email templates with HTML formatting and the option to include a predefined letterhead.
- Custom HTML: Fully customizable HTML email templates.
- Visualforce: Email templates created using Visualforce markup language, allowing for dynamic content and more complex layouts.
- Custom: Content Type (available in Lightning Experience): Email templates that can contain custom content types such as Custom Object data or other Salesforce data.
Salesforce Admin - 2
Difference between force.com and Salesforce.com:
Salesforce.com is a cloud-based customer relationship management (CRM) platform that offers a variety of services and products for sales, marketing, and customer service.
Force.com is a platform-as-a-service (PaaS) offered by Salesforce.com, which allows developers to build and deploy custom applications on Salesforce's infrastructure.
Types of Sharing Rules in Salesforce:
There are three main types of sharing rules in Salesforce:
Criteria-based Sharing Rules: These rules automatically share records with groups of users based on specified criteria.
Owner-based Sharing Rules: These rules automatically share records owned by a specific user or group with other users or groups.
Manual Sharing: This allows individual record owners to manually share their records with other users or groups.
Web-to-Case in Salesforce:
Web-to-Case is a Salesforce feature that allows organizations to automatically create cases in Salesforce from web forms submitted by customers on their website.
For example, when a customer submits a support request through a web form, Web-to-Case can capture the information and create a new case in Salesforce, streamlining the support process.
Web-to-Lead in Salesforce:
Web-to-Lead is similar to Web-to-Case but is used for capturing leads from web forms.
For instance, when a visitor fills out a contact form on a company's website, Web-to-Lead captures the information and creates a new lead record in Salesforce, enabling sales teams to follow up with potential customers.
Converting formula field into any other data type:
No, formula fields in Salesforce cannot be directly converted into another data type. Formula fields are virtual fields calculated based on other fields' values and cannot hold manual input data. If you need to change the data type of a field used in Lead conversion, you might need to reassess your data model or workflow to accommodate the change.
Changing data type of a field used in Lead conversion:
Yes, you can change the data type of a custom field used in Lead conversion. However, you should be cautious as changing the data type can lead to data loss if the new data type cannot accommodate the existing data properly. It's advisable to back up your data and thoroughly test the impact of the change before proceeding.
Difference between Role and Profile in Salesforce:
Roles: Roles in Salesforce define the hierarchy of users within an organization and control record-level access. Users are assigned to roles, which determine their access to records owned by users below them in the hierarchy.
Profiles: Profiles in Salesforce define the permissions and settings that govern what users can do within the organization. Profiles control access to objects, fields, and features, such as tabs and apps.
Examples of above terms, Definitions:
Imagine you have a company that sells various products and provides customer support. Salesforce.com is the CRM platform you use to manage your sales, marketing, and support processes.
On Salesforce, you use Force.com to develop custom applications tailored to your business needs, such as a custom order management system.
You have set up criteria-based sharing rules in Salesforce to automatically share support cases related to high-priority customers with a specialized support team.
Web-to-Case functionality is integrated into your company's website, allowing customers to submit support requests directly into Salesforce.
Similarly, Web-to-Lead captures leads generated from the website's contact forms and creates lead records in Salesforce for your sales team to follow up with.
You decide to change the data type of a custom field used in Lead conversion to better align with your reporting needs. After careful planning and testing, you make the necessary adjustments to the field.
In Salesforce, roles define the hierarchy of your sales and support teams, determining who can access and manage which records. Profiles, on the other hand, control what each user can do within the system, such as creating or editing records and accessing specific features.
This example illustrates the key differences between force.com and Salesforce.com, types of sharing rules, web-to-case, web-to-lead, handling field data types, and the distinction between roles and profiles in Salesforce.
Salesforce Admin - 1
1. Is it possible to write a validation rule which will fire only on insert of record not on update of Record ?
Yes, it's possible to write a validation rule that fires only on insert of a record and not on update. In many programming or database systems, you can differentiate between insert and update operations.
For example: you can write a validation rule using a function like ISNEW() to check if a record is being inserted.
In this validation rule, ISNEW() returns true if the record is being created for the first time (i.e., inserted), and your_condition_here represents whatever additional conditions you want to apply for the validation rule to fire.
2. Is it possible to schedule a dynamic dashboard in Salesforce?
No, it is not possible to schedule a dynamic dashboard in Salesforce.
3. Is it possible to write a validation rule on record delete?
No, only in insert and update events you can write validation rule.
4. Difference between formula field and rollup summary in Salesforce ?
Formula Field: A formula field in Salesforce calculates its value based on other fields' values or using formula expressions. It displays the calculated result but doesn't store data directly.
Roll-Up Summary Field: A roll-up summary field summarizes data from related records, such as calculating the sum, average, maximum, or minimum of a field in child records and displaying it on a parent record. It stores aggregated data from child records on the parent record.
5. Is there any standard object which is also act as junction object ?
Yes, there are some standard objects which acts as a junction object.
For Example, Standard object OpportunityContactRole is acts as junction object between Opportunity and Contact objects.
6. What is the default DateTime format of Salesforce ?
• Salesforce stores all DateTimes in Coordinated Universal Time (UTC) format.
• Remember that dateTime field values are stored as Coordinated Universal Time (UTC).
• When one of these values is returned in the Salesforce application, it is automatically adjusted for the timezone specified in your organization preferences.
• Your application may need to handle this conversion.
7. How to insert null values into Dataloader ?
Go to data loder -> setting -> check Is null values checkbox.
8. Maximum batch size of data loader?
200
9. What is the difference between trigger and workflow in Salesforce ?
Trigger:
- A trigger is an Apex code that executes before or after specific data manipulation language (DML) events occur, such as insert, update, delete, or undelete operations.
- Triggers are used to implement custom business logic, validation, or automation on Salesforce records.
- Triggers are highly customizable and can handle complex logic but require coding skills.
Workflow:
- Workflow rules are declarative automation tools provided by Salesforce that allow you to automate standard internal processes to trigger certain actions based on specified criteria.
- Workflow rules are easier to set up and manage compared to triggers, as they are created through point-and-click configuration rather than coding.
- Workflow rules can only perform certain predefined actions such as field updates, email alerts, outbound messages, and task creation based on criteria defined in the rule. They are less flexible than triggers but are suitable for many common automation needs.
In summary, triggers are coded solutions that offer more flexibility and complexity, while workflows are declarative tools that provide simpler automation capabilities without requiring coding skills.
10. What is fiscal year in salesforce ?
Salesforce allows two types:
Standard Fiscal Years are periods that follow the Gregorian calendar, but can start on the first day of any month of the year.
(A Gregorian Year is a calendar based on a 12 Month Structure and is used throughout much of the world.)
Custom Fiscal Years are for companies that break down their fiscal years, quarters and weeks in to custom fiscal periods based on their financial planning requirements.
Note: After you enable custom fiscal years, you cannot disable the feature. However, if you need to revert to standard fiscal years, you can define custom fiscal years that follow the same Gregorian calendar structure as the Salesforce standard fiscal years.
11. If user does not have any right on particular record and have only read level access at object level. Can he change the record owner?
Yes. In profile, there is setting for Transfer Record.
12. What is Apex?
It is the in-house technology of salesforce.com which is similar to Java programming with object oriented concepts and to write our own custom logic.
13. What will happen if you try to update record in After Trigger Context?
You will get an error saying record is Read only.
14. We have a Time Based Workflow and there is Action scheduled to be executed. If we Deactivate the workflow, Scheduled actions will be removed from queue or not?
Even after deactivation of workflow, its action will be active in queue.
15. How to clear the Time based workflow action queue ?
Two ways to achieve this.
• Make criteria false for all those records.
• Go to Set up -> Monitoring -> Time Based Workflow and search for scheduled actions and then remove from queue.
#salesforce #admin #salesforceadmin #qa #testing #interview #salescloud #servicecloud
API Authentication
What is API authentication?
API authentication is the process of verifying the identity of a user who is making an API request, and it is a crucial pillar of API security. There are many types of API authentication, such as HTTP basic authentication, API key authentication, JWT, and OAuth, and each one has its own benefits, trade-offs, and ideal use cases. Nevertheless, all API authentication mechanisms share the goal of protecting sensitive data and ensuring the API is not misused.
HTTP basic authentication:
HTTP basic authentication is the most simple way to implement API authentication. It involves sending credentials as user/password pairs in an Authorization header field, where the credentials are encoded using Base64. However, these credentials are not hashed or encrypted, which makes this authentication mechanism insecure unless it is used in conjunction with HTTPS.
API key authentication:
An API key is a unique identifier that an API provider issues to registered users in order to control usage and monitor access. The API key must be sent with every request—either in the query string, as a request header, or as a cookie. Like HTTP basic authentication, API key authentication must be used with HTTPS to ensure the API key remains secure.
JWT authentication:
JWT, which stands for JSON Web Token, is a compact, stateless mechanism for API authentication. When a user logs into an application, the API server creates a digitally signed and encrypted JWT that includes the user's identity. The client then includes the JWT in every subsequent request, which the server deserializes and validates. The user's data is therefore not stored on the server's side, which improves scalability.
OAuth authentication:
OAuth is a token-based authentication mechanism that enables a user to grant third-party access to their account without having to share their login credentials. OAuth 2.0, which provides greater flexibility and scalability than OAuth 1.0, has become the gold standard for API authentication, and it supports extensive API integration without putting user data at risk.
Authorization types supported by Postman
- No auth
- API key
- Bearer token
- JWT bearer
- Basic auth
- Digest auth
- OAuth 1.0
- OAuth 2.0
- Hawk authentication
- AWS Signature
- NTLM authentication
- Akamai EdgeGrid
- ASAP (Atlassian)
API Interview Preparation - 2
What is an API?
API stands for "Application Programming Interface".
It is a system that enables communication between different software.
You can think of it as two people speaking different languages communicating through an interpreter. API acts as an interpreter facilitating understanding between two different software and enabling data exchange.
Benefits of API:
- Security: Establishes a secure connection between two different servers.
- Speed: Speeds up data exchange.
- Convenience: Facilitates software development.
- Saving: Saves time and money.
- Traffic: Increases the traffic of your website or application.
- Visibility: Increases the visibility of your website or application.
Types of API:
- Internal API: APIs used by specific individuals.
- Open API: APIs open to everyone's use.
- Partner API: APIs used between two companies.
- Composite API: APIs that combine multiple APIs.
- REST API: The most commonly used API architecture.
- SOAP API: A more secure API architecture.
Examples of APIs:
- Google Ads API
- Facebook API
- YouTube API
- WhatsApp Business API
Examples:
- Automatic synchronization of a website and a mobile application.
- Integration of an e-commerce site with payment infrastructure.
- Connection of a social media platform with other platforms.
Request
1. HTTP Request Types (Get, Post, Put - Patch, Delete)*2. Base URL*3. Endpoint*4. Request Headers (Location for Additional Information)5. Paramsa. Pathb. Query6. Request Body (Mandatory for Post)7. Authorization, Authentication (Token)
Response
1. Status Code
a. 1xx: The server acknowledges receiving your request and starts processing it.
b. 2xx: The server indicates that it has successfully received, understood, and accepted your request.
i. (200 Ok, 201 Created, 202 Accepted, 204 No Content)
c. 3xx: Indicates that additional steps are required to complete your request.
d. 4xx: The server cannot process your request because you may have made it incorrectly.
i. (400-Bad Request, 401-Unauthorized, 403-Forbidden, 404-Not Found, 405-Method not Allowed)
e. 5xx: Indicates that the server cannot process your request due to a server error.
2. Response Headers
3. Response Body (Json) // There are 6 ways to verify the Body.
Validation Response Body
1. response.asString();
2. response.path("GPATH SYNTAX")
3. Jsonpath jsonpath = response.jsonpath();
Jsonpath.getString("GPATH SYNTAX")
4. HamCrestMatchers
RestAssured.
.given()
.when()
.get("BASEURL + ENDPOINT")
.then()
5. Json to Java with as() method --> DE-SERIALIZATION
6. POJO (PLAIN OLD JAVA OBJECT)
Authentication - Authorization
Authentication - Who is this?
401: Invalid credentials
401: Unauthorized
The API doesn't know who you are.
Authorization - Give permissions
403: You don't have sufficient privileges to perform the operation.
403: Forbidden
The API allows entry but with limited privileges.
API Architectures
API architectures are a set of principles and rules that determine how APIs are designed and developed.
Different API architectures have different advantages and disadvantages. The most commonly used API
architectures are as follows:
1. REST API (Representational State Transfer):
- It is the most widely used API architecture.
- It is simple and easy to use.
- It utilizes HTTP methods (GET, POST, PUT, DELETE).
- It uses data formats such as JSON or XML.
- It is scalable and flexible.
2. SOAP API (Simple Object Access Protocol):
- It is a more secure API architecture.
- It is XML-based.
- It uses standards such as WSDL (Web Service Definition Language).
- It is more complex and harder to use.
REST: Preferred when speed, flexibility, and simplicity are important.
SOAP: Preferred in situations where security and error management are critical.
API vs Web Services?
Both APIs (Application Programming Interfaces) and Web Services are ways to communicate between applications. However, they have some important differences:
API (Application Programming Interface)
- Scope: APIs are more general concepts. They are software interfaces used for any communication protocol and data exchange.
- Protocols: They can use various protocols including REST, SOAP, GraphQL, and more.
- Formats: APIs support JSON, XML, and other data formats.
- Flexibility: APIs are more flexible architecturally and provide a broader range of interaction betweenapplications on different platforms.
Web Services
- Nature: Web services are a specific subset of APIs.
- Protocols: They are inherently tied to specific web technologies. They use protocols like SOAP (usually transmitting data in XML format) and less commonly XML-RPC, UDDI, etc.
- Standards: Web services have stricter standards and protocols.
- Compatibility: When it comes to cross-platform compatibility with systems built on different technologies, web services may be more restrictive compared to APIs.
In Summary:
All Web Services are APIs, but not all APIs are Web Services. Web Services are more rigid and use mandatory protocols like SOAP and XML. SOAP APIs typically support an XML document called WSDL (Web Service Definition Language) that defines the functionality of the API.
APIs allow for more flexibility with architectures like REST, GraphQL, and offer more options for data formats like JSON.
Which One to Choose?
What you choose will depend on your objectives:
Integrating different platforms: If you need to work with legacy systems using SOAP and require more robust standards, web services might be appropriate.
High flexibility and different protocols: If you need a more flexible architecture or prefer lighter data formats like JSON, APIs are a better choice.
Additional Notes:
In modern usage, the term "API" often refers to web-based APIs like REST APIs. However, APIs do not require network connections (operating system libraries can also be considered APIs).
Web Services are now considered an older technology, and API types like REST have become more popular.
What is Serialization and Deserialization?
Serialization: Serialization is the process of converting the state or structure of an object or data structure in memory into a format suitable for storage. This process is typically done by converting an object or data structure into a format such as JSON, XML, or binary. Serialization allows an object's state to be transferred from memory to disk or over a network while preserving its state.
Summary:
It is the process of converting an object or data structure into a specific format for storage or transmission purposes.
Deserialization: Deserialization is the opposite of serialization. It involves converting data retrieved from a format (such as JSON or XML) back into its original object or data structure. This process allows data stored or transmitted on disk or over a network to be reconstructed by the program for use in memory.
Summary:
It is the process of converting a serialized object or data structure back into its original form. Serialization and deserialization are important parts of APIs and allow for data exchange by converting different data types into each other.
Why is it used?
Data Storage: Objects or data structures need to be serialized for storage on disk, in a database, or over a network.
Data Transmission: Objects or data structures need to be serialized to be transferred between different systems or applications.
Interoperability: A common format is used for data exchange between different programming languages and applications.
Example:
A Java application can serialize a user object to JSON format and send this JSON data to a web API.
The web API can deserialize the JSON data back to a user object using deserialization and store this object in a database.
What is an Endpoint?
- It is a specific address that provides access to a service or resource.
- An Endpoint is the entry point for a request made to an API.
- Endpoints retrieve specific data or trigger operations that modify data on the server.
- Endpoints specify the type of request using HTTP methods.
What are XML and JSON concepts?
XML (Extensible Markup Language): It is a markup language used to define and store data.
JSON (JavaScript Object Notation): It is a lightweight data interchange format used to represent data. Data is stored in a "Key" and "Value" format
- Feature XML JSON
- Complexity More complex. Simpler.
- Readability Less readable. More readable.
- Flexibility Less flexible. More flexible.
- Performance Slower. Faster.
- Data Types Supports more Supports fewer
XML Use Cases: Used in areas such as web services, configuration files, data transmission.
JSON Use Cases : Used in areas such as web APIs, NoSQL databases, data interchange with JavaScript.
Gson
Gson is a Java library developed by Google for converting Java objects to JSON (serialization) and JSON to Java objects (deserialization).
- JSON is a data interchange format, while Gson is a Java serialization/deserialization library.
- JSON is simple and works across different platforms. Gson is specifically designed for Java and offers more flexibility
Swagger
Swagger is an open-source software used for designing, documenting, and testing APIs. With features like easy design and creation, standard format, and live testing, it makes your API more usable and developer-friendly.
How to Test an API?
As a tester we send a API request and verify the status code, response body and checking the endpoints of the api URL is working as expected
- Pozitive - I send valid requests, headers, parameters, and JSON bodies, and verify that the response is 200/201.
- Negative - I send invalid requests, headers, parameters, and bodies, expecting the response not to be 200.
How to Test a REST API?
- API Validation: Making sure each REST API endpoint works as expected.
- Postman: A popular API platform for manual testing.
- Rest Assured: A library for automating API tests with Java
Methods:
- HTTP Requests: Sending requests to API endpoints using various HTTP methods like POST, PUT, GET, DELETE.
- Response Verification: Checking if the API returns the correct status codes (200, 400, 401, 500, etc.) and if the response content is as expected. Headers can also be verified.
- Positive and Negative Testing:
- Positive Tests: Testing with valid request parameters, headers, and JSON bodies to verify that the API works as expected in successful scenarios (200 status code and correct JSON response).
- Negative Tests: Testing with invalid request parameters, headers, and JSON bodies to verify that the API handles error scenarios (non-200 status codes and error messages) correctly.
Summary:
Comprehensive testing using different HTTP methods. Preparation of positive and negative test scenarios. Verification of HTTP response codes, response bodies, and headers. Use of appropriate tools for manual testing (Postman) and automated testing (Rest Assured).
RestAssured
RestAssured is an easy-to-use, flexible, and comprehensive open-source library for testing REST APIs in Java. With RestAssured, you can test the functionality of API endpoints, verify expected responses and error codes, and create automated test scenarios.
JsonPath
One of the ways to verify the response body.
Jsonpath jsonpath = response.jsonpath();
#APITesting #QualityAssurance #testautomation #testing #automation #softwaretesting #qa #api #software
Salesforce AI Associate Certification - 3
What is semantic retrieval in the context of LLMs? Searching for relevant information in other data sources What additional protection do...
-
Difference between force.com and Salesforce.com : Salesforce.com is a cloud-based customer relationship management (CRM) platform that offer...
-
What is an API? API stands for "Application Programming Interface". It is a system that enables communication between different so...