Libraries & Frameworks

The vm hardware configuration is
Processor: Dual Core
RAM : 8GB RAM
Increased the JMETER Heap Space to 8GB but still getting as JAVA HEAP SPACE issue. Also in the Task Manager the while wrunning the script with 3 Vusers for 10minutes for debugging purpose when I looked at Task Manager Memory consumption is upto 80%.

I followed this link to find out the changes I made in Jmeter.bat file for the heap space but not getting heap sapce information.
https://stackoverflow.com/questions/53586174/jmeter-how-to-increase-heap-size

Getting as

I have one requirement:

I need to execute a command in command prompt that should trigger “Start” button of “HTTP(S) Test Script Recorder”. Even if I don’t press “Start” button, the HTTP response should get recorded in non GUI mode.

I did trail and errors for several hours but that didn’t workout for me.

Could anyone please help me out in solving this?

As part of load testing I ran the set of same API’s for several iterations with different user loads. My concern is with the total requests made against the user load. All tests were ran for 10 minutes duration.

In the first iteration I got a report of 1388 total requests for 100 users.

For the second iteration, I got a report of 1393 total requests for 500 users.

My concern is if there are 1388 requests for 100 users, I was expecting 1388*5 (ie.6940 requests) for 500 users, but I am getting only 1393 requets. Can someone help me understand how this logic works for getting the total number of requests made against an API in load testing.

I am using Selenium and JUnit to automate tests.
Lets say there are two tests and each has to authenticate with a different user and perform an action.
Can it be done any smarter than to call an authentication method in each test method? Preferably with annotations so that the username for the test really stands out while skimming through the code and the login method being in @Before method or in TestBase class.

public class AppTest extends TestBase {

// this test must be run with userA
@Test
public void testA() {

authenticateUser (userA);

int count = retrieveNewEmailCount();
assertEquals(NEW_EMAIL_COUNT, count);
}

// this test must be run with userB
@Test
public void testB() {

authenticateUser (userB);

String notificationText = retrieveNoNewEmailNotification();
assertEquals(NO_EMAIL_NOTIFICATION, notificationText);
}
}

Do not comment on business logic in the examples above as this is just simplified example. The real tests are not about emails at all.
In reality there are hundreds of tests and almost a hundred users.
Each user participates from one to hundreds tests. Each test is run once with one particular user only, ie no need to run the same test few times with different users.

There is a web based application for the performance testing. Servers are physical servers.
Application works without proxy setting.
Script is Running successfully using JMeter in vm with the help of Host Entry Files.
After Integrating with Azure Pipeline getting as *Non HTTP response code: java.net.UnknownHostException/Non HTTP response message:url.com.
I have requested my hosting for DNS and got reply from them as done but still I can’t able to login in local getting as connection failed.Asked the hosting team got replied as SSL certificate error.

Could anyone please help me

Insurance is a service-oriented, policy-centered, and product-specific industry. The business processes witness frequent updates, transactions, communication, and interactions between stakeholders (agents, IT teams, customers, and marketing teams). Its increasing complexity and dependency on tech innovations have given rise to the adoption of insurance policy administration systems (PASs). A policy admin system is an application that … Continue reading “Why is Testing Essential for Insurance Policy Administration Systems?”
The post Why is Testing Essential for Insurance Policy Administration Systems? first appeared on TestingXperts.

i am having a funny issue with my gecko driver. The browser loads however it does not redirect to the URL as stated below.

Dim fireDriver As New FireFoxDriver(New FireFoxOptions() With {.BrowserExecutableLocation = “C:Program FilesMozilla Firefoxfirefox.exe”})
handler.WebsiteLogin(fireDriver)

fireDriver.Navigate().GoToUrl(“http://www.google.co.uk”)

I am using firefox 57.0.3 (64-bit), geckodriver-v0.19.1-win64 and written in a VB .Net desktop application.

This is the trace from the driver

1514898589674 geckodriver INFO Listening on 127.0.0.1:63088
1514898590827 mozprofile::profile INFO Using profile path C:UsersGRANTP~1AppDataLocalTemprust_mozprofile.Mt3alKOXTMmE
1514898590829 geckodriver::marionette INFO Starting browser C:Program FilesMozilla Firefoxfirefox.exe
1514898590847 geckodriver::marionette INFO Connecting to Marionette on localhost:63121
1514898592849 geckodriver::marionette DEBUG connection attempt 0/600
1514898594955 geckodriver::marionette DEBUG connection attempt 1/600
1514898597059 geckodriver::marionette DEBUG connection attempt 2/600
1514898599160 geckodriver::marionette DEBUG connection attempt 3/600
1514898601264 geckodriver::marionette DEBUG connection attempt 4/600
1514898603368 geckodriver::marionette DEBUG connection attempt 5/600

If i need to provide any other details please let me know so i can update the question.

I’m new to Xpath and I wanted to know if there was a way to inspect a specific element, that is repeated multiple times throughout the webpage.
For this instance I want to inspect the specific span Allocation Exhausted (See picture below).
However, that element is repeated multiple times and I would like an Xpath, that focus’s solely on any changes for this specific Allocation Exhausted.
Any help would be appreciated!

This is a helper method we use in many places in our Selenium Java tests. The intent is to click a button and then detect that the browser has navigated away from the page by detecting the staleness of the HTML element:
protected static WebDriverWait wdWait;

public static void clickAndWaitForBrowserToLeavePage(WebElement elementToClick) {

WebElement htmlTag = wdWait.until(ExpectedConditions.presenceOfElementLocated(By.tagName(“html”)));
// click on the WebElement
elementToClick.click();
// wait until the <html> tag becomes stale
wdWait.until(ExpectedConditions.stalenessOf(htmlTag));
}

we also have this generalized version:
public static void clickAndWaitForElementToBecomeStale(WebElement elementToClick, WebElement elementToBecomeStale) {
// click on the WebElement to click
elementToClick.click();

// wait until the old WebElement becomes stale
wdWait.until(ExpectedConditions.stalenessOf(elementToBecomeStale));
}

The problem is that sometimes this script appears to not detect the staleness of the element it’s waiting to become stale, probably because it’s already stale before wdwait.until starts, and at that point it detects the same element on the next page, and obviously that’s not going to go stale because we don’t do anything on the new page before we finished this check.
Is there a way to avoid this “we’re waiting an element on the next page instead of an element on the page we just navigated away from” race condition while still retaining the “check we’ve actually refreshed the page”?

I have Jenkins on localhost, configured test project, which is generating passed test:

@Test
public void aFastTest() {
System.out.println(“—- —- —-“);
Assert.assertTrue(true, “Test is true”);
}

Console output is OK in Jenkins:

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

For import to ALM I’m using https://wiki.jenkins-ci.org/display/JENKINS/HP+Application+Automation+Tools

In Jenkins Job configuration I have in Post-build Actions – Upload test result to ALM, set:

Testing result file: **/testng-results.xml

And finally my problem – in the end of Jenkins console log is:

INFO: ‘Upload test result to ALM’ Post Build Step is being invoked.
INFO: No Test Report found.
INFO: ‘Upload test result to ALM’ Completed.

I thought, the path to testing result file is wrong, so I copied it everywhere, in testng-results.xml is valid result, compared to examples on net…Anyone know why there is No Test Report found?

I have to design a test plan for an app and below is the requirement
Run a thread for 1 user for 55 minutes and in between after the thread starts I need to run another user after 30 minutes.
Can you give any suggestions on how can design and what kind of threadGroup can i use?
Update: I have two groups, the first group will start and run for 120 minutes and the second group of users will start after 30 minutes.

Drag and Drop not working..as my drag and drop area not having ‘Frames’ i didn’t use switchTo() here.

Actions action= new Actions(driver);

//driver.switchTo().frame(0);

WebElement drag= driver.findElement(By.xpath(“//div[contains(text(),’GEO’)]”));

WebElement drop= driver.findElement(By.xpath(“//div[@placeholder=’Drag and Drop the subjects which needs evaluation.’]”));

//action.doubleClick(drag);

Thread.sleep(3000);

action.dragAndDrop(drag, drop).perform();

Thread.sleep(3000);

Can anyone please help?

I am trying playwright and try to automate login feature. I have page classes, test classes and separate action class to write common actions like click,enter inputs.
My common action class
import { expect, Locator, Page } from “@playwright/test”

export default class Actions {

page:Page;

constructor(page:Page) {
this.page = page ;
}

public async enterInput(value:string,element:Locator) {
element.fill(value);
await this.page.waitForTimeout(5000);
}

public async clickButton(element:Locator) {
element.click();
await this.page.waitForTimeout(5000)
}

}

My login.page.ts class
import { Locator, Page, expect } from “@playwright/test”;
import Actions from “../common/actions”;
import * as path from “../xpaths/xpath.json”
import fs from ‘fs’;

export default class LoginPage {

page: Page;
action:Actions;

inputUsername:Locator;
inputPassword:Locator;
btnLogin:Locator;
errorText:Locator;

constructor(page:Page) {
this.page = page ;
this.action=new Actions(page);

const pathsxData = fs.readFileSync(“json path here”, “utf-8”);
const pathsx = JSON.parse(pathsxData);

this.inputUsername = this.page.locator(path.usernameInput);
this.inputPassword = this.page.locator(path.passwordInput);
this.btnLogin = this.page.locator(path.loginBtn);
this.errorText=this.page.locator(path.loginError)
}

public async login(username:string,password:string)
{
this.action.enterInput(username,this.inputUsername);
this.action.enterInput(password,this.inputPassword);
await this.action.clickButton(this.btnLogin);
}

public async successLogin(username:string,password:string,title:string){
this.login(username,password);
await expect(this.page).toHaveTitle(title);
}

public async invalidLogin(username:string,password:string,error:string){
this.login(username,password);
await expect(this.errorText).toHaveText(error);
}

public async emptyLogin(username:string,password:string,error:string){
this.login(username,password);
await expect(this.errorText).toHaveText(error);
}

}

My logintest.spec.ts
import { test , expect} from “@playwright/test”
import LoginPage from “../pages/login.page”
import * as data from “../testdata/testdata.json”

test.describe(‘Login Test’, () =>{
let login:LoginPage;

test.beforeEach(async({page}) =>{
await page.goto(“My Url”);
await page.waitForTimeout(5000)
login = new LoginPage(page);
});

test(‘invalid login-username/password both incorrect’, async () => {
login.invalidLogin(data.invalid_username,data.invalid_password,data.invalid_error);
});

test(’empty username/password login’, async()=>{
login.invalidLogin(data.invalid_username,data.invalid_password,data.invalid_error);
});
test(‘successfully login to the system’ , async () => {
login.successLogin(data.username,data.password,data.dashboard_title);
});
});

Whenever I execute the code always getting Target Closed error.Below is the error
Error: locator.fill: Target closed
=========================== logs ===========================
waiting for locator(‘xpath=//input[contains(@id,’outlined-basic’) and contains(@type,’text’)]’)
============================================================

at ..commonactions.ts:16

14 |
15 | public async enterInput(value:string,element:Locator) {
> 16 | element.fill(value);
| ^
17 | await this.page.waitForTimeout(5000);
18 | }

But when I execute code without using action class like below code executes successfully.
import { test , expect} from “@playwright/test”
import LoginPage from “../pages/login.page”
import * as data from “../testdata/testdata.json”

test.describe(‘Login Test’, () =>{
let login:LoginPage;

test.beforeEach(async({page}) =>{

console.log(page.url)

login = new LoginPage(page);
});

test(‘invalid login-username/password both incorrect’, async ({page}) => {
page.goto(“http://192.168.0.127/ussd_qa/login”);
await page.waitForTimeout(5000);
await login.inputUsername.fill(data.username);
await page.waitForTimeout(5000);
await login.inputPassword.fill(data.password);
await page.waitForTimeout(5000);
await login.btnLogin.click();
await page.waitForTimeout(5000);
await expect(login.errorText).toHaveText(data.invalid_error);
});
});

Can someone explain what is wrong here?

Overview of the Incident: What Went Wrong and Why? How Does Rigorous Software Testing Help Avoid Such Issues? Why Partner with Tx for Software Testing? Security Testing and Audits Summary Imagine a scenario: a software company’s development team is at the finish line of completing the code and pushing it to production. They spent countless … Continue reading “How Software Testing Failures Led to a Global Crisis: Key Takeaways”
The post How Software Testing Failures Led to a Global Crisis: Key Takeaways first appeared on TestingXperts.

I am working on an application that whenever I call a page from the menu, the URL does not change. I’m new to Selenium and am creating automation test scripts to perform test cases.
But, for each test script, I have to add a script for user authentication to call the login page and call the required page from the menu.
Is there a way I can call the page directly without user authentication?