Questions tagged [test-automation]
The test-automation tag has no usage guidance.
61
questions
0
votes
1
answer
59
views
Check if a checkbox is ticked in a Screen flow
Hi all I am using a screen flow and here if all the checkboxes I have added in a screen is checked then a field update should happen in an object.
Here I have added all the checkboxes in the screen. ...
0
votes
1
answer
412
views
Cypress as UI test automation tool for Salesforce [closed]
Does anyone have experience using Cypress as a UI test automation tool for a Salesforce based project? If so, what are the drawbacks, constraints or implications, e.g. regarding login or possible ...
0
votes
1
answer
57
views
Is there any solution for easy maintenance of Selenium automation scripts for testing Salesforce?
Whenever there is salesforce upgrade, the Xpaths of lot of web elements get effected. This causes us to maintain them. Is there any better solution to this problem?
I have found a solution for input ...
0
votes
3
answers
77
views
Could I call the same method many times in the same test?
Is a bad practice call the same method many times in the same test method?
Example:
@isTest static void testSelectDevice{
List <Product2> device1 = new List<Product2>();
List <...
1
vote
1
answer
73
views
Can we automate Security Token reset for automated testing? [closed]
We have automated tests that run on our sandboxes (not scratch org but traditional sandbox) prior to each release to production. This testing framework includes the generation and use of Salesforce ...
0
votes
0
answers
35
views
Get Test Apex Classes of a specific package in Salesforce [duplicate]
I am trying to import test suites name/id from Salesforce.
Since Salesforce may include a large number of test suites - we would like to allow the user to import test suites from a specific package/...
0
votes
0
answers
33
views
Regression Test Issue with DML operation
I have a task to write a regression test in apex. So there are 2 objects call Project task Line Item Entry and Project Task Line Item. In there if i insert a new record to Project Task Line Item Entry ...
0
votes
0
answers
93
views
Testing queueable method which relies on jobId
I've updated my code to do some logic along these lines
if no job has been created, create a job using System.enqueueJob(QC) and store it's job id.
take a bunch of data and store it in a custom ...
0
votes
1
answer
55
views
Salesforce lightning components qa automation [closed]
I am new to Salesforce testing, we have an automation suite written with protractor currently and its working fine with classic version of sf.
However now most of the new requests are towards ...
1
vote
0
answers
35
views
Not able to find elements of a sfdc login screen using UIautomater
We have created native Android mobile App using 'com.salesforce.mobilesdk:SalesforceSDK:8.+' mobile sdk for the login functionality in the app. We use the Community url for login.
We are trying to ...
0
votes
1
answer
440
views
Getting Malformed Query error when hitting SOQL using Rest API
I have a requirement to fetch query results of a SOQL query using REST API. Even after encoding the SOQL search I keep on getting Malformed Query error. I am so far unable to find a reason to it.
This ...
0
votes
0
answers
34
views
How can I get a list of fields that I added to one form in Salesforce?
I'm pretty new to Salesforce and I'm wondering if there is a way to get all the fields and HTML elements that I'm using with those forms to do some future testing with cypress and selenium. Does ...
1
vote
0
answers
35
views
Selectors for automating the Salesforce Mobile Login Screen [closed]
Is there a JS or WDIO library or example anywhere for the best way to automate the Salesforce Mobile APP Logon Page.
My dev team are placing clear identifiers on all the bespoke screens of the app we ...
1
vote
0
answers
143
views
CircleCI, re-run tests that failed in parallel mode during build
note: I'm stuck in an org-centric world, so CircleCI is setup w/my dev sandbox, not scratch orgs.
Recently, I set up a CircleCI build to run my sandbox orgs tests w/RunLocalTests on each pull request. ...
0
votes
1
answer
67
views
Test apex class salesforce coverage code
i have a test class for salesforce
@IsTest
public class JsonGCloudApiApex_TEST {
// This test method should give 100% coveragex
static testMethod void testParse() {
...
0
votes
1
answer
235
views
Unable to invoke async test job: Subscriber handshake failed due to a socket timeout
there is a known issue SFDX- when using in JENKINS :sfdx force:apex:test:run: An ERROR: Unable to invoke async test job: Subscriber handshake failed due to a socket timeout on trailblazer site with no ...
0
votes
0
answers
40
views
What is the mechanism Lightning uses to avoid loading tabs in background?
I'm working on UI test automation and noticed Lightning avoids loading tabs in background. You can test yourself - cmd + click on some records and wait - then open new tab and it's only then ...
2
votes
1
answer
69
views
UNABLE_TO_LOCK_ROW error while running salesforce apex test on circleci
I'm getting UNABLE_TO_LOCK_ROW while running the apex test on CircleCI
How can I avoid the deadlock while running tests?This is due to parallel execution of test(Not sure about this). Do We have ...
2
votes
2
answers
152
views
Salesforce automated testing techniques [closed]
I am a Salesforce QA tester and as all my testing has been manual up to this point, I am interested to learn how to automate some of the new upcoming features and possibly existing processes on ...
0
votes
0
answers
35
views
Possible to keep (or equivalent of) a public static variable across test classes in an async test run?
I have test methods I want to use from test class A in test class B, in an async test run if test A runs before Test B I don't want to invoke the test A methods in test B because they already ran and ...
0
votes
2
answers
216
views
How to Test the Performance of Rest web services in Salesforce( at the same time there is multi requests), Is there any tool?
lets say if 10 users hitting web service at same time(concurrency),then how we can check performance.
Please share your Ideas
Thanks in Advance..
0
votes
1
answer
162
views
Can Performance Testing possible in a Partial Copy sandbox?
Salesforce suggests Performance Testing only in Full Copy sandbox. Is there any reason why it cant be done in a Partial Copy sandbox?
1
vote
0
answers
272
views
Lighting web component UI testing with robotframework-selenium: Not able to interact with LWC element
I am trying to automate a page with LWC, But due to shadow DOM, I am able to interact with element.
Is there a way where we can interact with the element.
1
vote
2
answers
655
views
Selenium WebDriver and Developer Console
So I'm automating some different things with Selenium WebDriver in one of our orgs.
One of the more tricky ones has been interacting with the Execute Anonymous window inside of the developer console. ...
3
votes
0
answers
28
views
Any way to re-enable first time login screen?
Doing some automation testing, and wondering if there is any way to re-enable the screen that shows up the first time a user logs into a sandbox asking you to register your phone number or click 'I ...
2
votes
1
answer
93
views
Tests for Marketing Cloud Journey [closed]
I have a requirement to test marketing cloud functionality and the only testing information I've found concerns sending test emails. In my experience, if something goes wrong with any kind of drip ...
1
vote
1
answer
3k
views
How to pass multiple arguments to a test case using CumulusCI?
Problem statement:
Unable to pass multiple variable values to my test case using CumulusCI command:
cci task run robot...
Sample Code:
*** Settings ***
Resource C:/Dev/myproject/robotframework/...
13
votes
2
answers
731
views
Any way to get consistent test counts when parallel testing is used?
Moving to parallel testing has made one of our builds run 4x faster but the test result files returned from:
sfdx force:apex:test:report
after polling via:
sfdx force:apex:test:run
vary on every ...
4
votes
3
answers
989
views
Is it impossible to automate testing on the Lightning interface?
To be more specific, I'm studying a use case where an automation would be preferable instead of just passing it to a user (for QA an acceptance). On the Lightning Experience interface, however, I've ...
1
vote
0
answers
32
views
Salesforce Lightning WebPage Rendering
Im a Test Automation Engineer. I was analyzing an application built using Salesforce Lightning. I tried to identify an element (Image) in DOM using a tool. I observed that the tool identified the DOM ...
0
votes
1
answer
3k
views
How to bypass the verification code when run test case from Selenium script?
I want to run my test case with Selenium script. But whenever I login with selenium it aways ask for verification code. I know I can do it using the Profile Id, but I want to do it with code. ...
1
vote
1
answer
108
views
Using ids to identify page elemensts for UI testing with Selenium
We are using Selenium to test our UI and need to be able to find a reliable way to identify the elements of the page we are working with. I am working with a button and have defined an id to be able ...
1
vote
0
answers
213
views
Advantages of Cinnamon for UI test automation [closed]
We want to start automating our UI tests and have found Cinnamon that seems to be a better and more specific Salesforce testing tool. We want to use a testing tool for our managed package that has ...
12
votes
1
answer
707
views
Testing Salesforce CPQ
I'm trying to create some meaningful tests for Salesforce CPQ. I'm trying to create Apex test classes and also UI tests with Selenium.
The problem with the apex tests is that a lot of the important ...
1
vote
0
answers
41
views
Big number of tests run 3 hours. How to decrease the time? [closed]
We've got a pretty big org, that has tens of millions of records and millions of apex code. The org has 1200 tests, that take 3 hours to run. 10 developers, that work in the org, all commit to 1 ...
1
vote
2
answers
789
views
How to automate data import on full sandbox refresh
I am involved in doing QA in a stage full sandbox environment. I am interested in being able to populate the sandbox with a small amount of consistent (I cant rely on production data) test data. Is ...
7
votes
3
answers
11k
views
How to Identify Elements in Salesforce Lightning for Selenium
I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements.
Reason, its having dynamic IDs , and other attributes are either very long , or they are not ...
1
vote
1
answer
312
views
What are most commonly used ways to do automated testing in Apex?
We are an ISV partner and looking for ways to automate our tests for our package. We are looking for something like Mockito for Java and have found ApexMocks library, which is built on top of Stub API....
1
vote
1
answer
544
views
Identify candidates for Selenium test automation?
Salesforce already uses both unit tests & Selenium to automate out-of-the-box features.
Our developers are covering their code with unit tests.
In order to avoid redundancy regarding the above, ...
1
vote
1
answer
471
views
Sender score and side effects releated to mailinator.com or maildrop.cc
I have looked around, however, I can't find accurate information if the Sender Score could be affected if I send hundreds of transactional emails daily to mailinator.com or maildrop.cc or any spam ...
1
vote
1
answer
147
views
Execute tests thru API not showing up in test execution?
So I wrote a C# program that uses the Salesforce Tooling WSDL to call RunTestsRequest . I got that working the only problem I have is the the test results only show up in Apex Test Results and not ...
4
votes
1
answer
556
views
Variable does not exist: fields [= getDescribe().fields]
A couple weeks ago, in the nightly test runs some tests started failing randomly (I guess it is related to the Summer'17 release.)
I was not able to reproduce this, in console or Setup test runs they ...
5
votes
0
answers
1k
views
Selenium testing the Lightning Experience
I'm new to SalesForce and trying to use Selenium to test a page.
When I check the "innerHTML" of a certain div (as selenium sees it), I see the following:
<div class="test-id" data-aura-rendered-...
0
votes
2
answers
375
views
Ghost Inspector test automation and varification Code
I have a Apex page that I need to test using ghost Inspector. I used chrome Extension to record my screen from the login section. The problem i am having is that ghost inspector is failing after login ...
1
vote
1
answer
2k
views
How to cover code related to Custom Metadata logic?
I have a custom metadata called Custom_Metadata__mdt.
I have one custom boolean field in that custom metadata called Custom_Boolean_Field__c.
I need to execute some logic only if value of ...
0
votes
1
answer
2k
views
How to cover a test class to test Account ID = Null [closed]
I need a help in covering the Account ID = Null please find my test class below.
static testMethod void DevelopmentRequestFormControllerNegativeTest() {
Test.startTest();
Profile p = [SELECT ...
1
vote
1
answer
274
views
How to write a apex class for remove production setting while refreshing the sandbox from production
can you please suggest me how i automate the manual customization after refreshing the new sandbox from the production to remove some production setting through apex class.
Noe a days in latest ...
0
votes
1
answer
76
views
Regarding apex class to Test Class
I have A Given Sample Apex Code
@HttpGet
global static String doGet(){
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
try{
...
2
votes
1
answer
39
views
Regarding Apex Class q1
How do you declare a static method inside with another static method? Is it possible? Why are test class methods always static? Can anyone guide me?
2
votes
2
answers
57
views
Regarding Apex class
While Executing Apex Class only Top Level Class should Be Declared as Static in Test Class,Why this Error is Occuring ,How to Avoid this Error?
@isTest
public class BusinessProfile1 {
public void ...