Software Engineering

What is Generative AI in Finance Why is Fraud Detection Important in Finance? How Generative AI works in Fraud Detection Advantages of Generative AI in Fraud Detection Future Trends in Generative AI for Fraud Detection Wrapping Up Why Choose Tx for Generative AI in Finance? The financial sector is consistently under severe threat from sophisticated … Continue reading “Generative AI for Fraud Detection and Prevention in Finance”
The post Generative AI for Fraud Detection and Prevention in Finance first appeared on TestingXperts.

An Overview of Large Language Models (LLMs) Why is LLM Evaluation Necessary? Factors to Consider When Evaluating LLMs Large Language Models Evaluation Challenges Best Practices to Overcome LLM Evaluation Challenges How can Tx help with Large Language Models Evaluation? Why Choose Tx for Generative AI in Finance? Since the emergence of gen-AI, we have seen … Continue reading “Evaluating Large Language Models (LLMs): Key Factors to Consider”
The post Evaluating Large Language Models (LLMs): Key Factors to Consider first appeared on TestingXperts.

wondering where I can find some valid alternative to Postman the API Client? (If you are wondering why… see this Reddit Post)
I’ve done my research and figure out these candidates:

APIDog: Maybe the closet “postman alternative” we got, it offers everything postman has, but more usable in general.
Ain: enhanced command-line api client that I can run in a terminal.
VSCode Rest Client: I use it when I want to stay in my IDE.

Any other suggestions?

Playwright is a popular test automation tool that offers a lot of reporting options for its users such as built-in reporters, custom reporters, and support for integrating third-party reporters. The Playwright’s default in-built reporter is the list reporter. However, when running tests via the CI tool, Playwright will switch to the Dot reporter by default.
The post Playwright Reporting: Customizing the Dot Reporter appeared first on Codoid.

I’m working on restructuring some deadline driven code, which basically means I’m largely rebuilding it from the ground up. One of the problems is that the QA automation tests are very fragile because every element is found by raw xpaths that rely on the page structure (divs, trs, no id’s are class names).
As such, I’m working on implementing a proper page object model. I understand that I want to use instance variables for the page objects so that my tests can be multi-threaded. The usage of instance variables leads me to wonder, how should I go about creating new page object instances? Like for instance, if I navigate from the landing page to the user profile page, what entity should be responsible for constructing the profile page object model instance?
In the example above, I’m leaning towards having the landing page have a method that triggers a transition to the user profile page and returns a new page object (as opposed to having each page instantiate their own page object). To mean this ensures that one session has a consistent driver passed about and reduces complications in the actual test, but was unsure if this would be “correct” within the page object model framework, or maybe if there’s even a third better way to handle this.

I have written a code to launch my app and click on the element, the app is launching but after launching when it is trying to click, I am getting an error which I am not able to understand why.

Error

Feb 19, 2019 2:54:42 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor
at pageobjects.HomePage.(HomePage.java:12)
at pages.SignUp.main(SignUp.java:22)
Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 2 more

This is the class code

package pages;

import java.net.MalformedURLException;
import java.util.concurrent.TimeUnit;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import page_objects.Home_page;

public class SignUp extends MobileCap
{

public static void main(String[] args) throws MalformedURLException
{
// TODO Auto-generated method stub

AndroidDriver<AndroidElement> driver = Capabilities();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Home_page h = new Home_page(driver);
h.SignUp.click();

}
}

I’m new to jmeter and would appreciate if someone could help me out on this.
I recorded a script in jmeter from Login to Logout using firefox as my browser. When I checked the input parameters, it is sending out username, password and an encrypted password (AES) before it can log in into the site.
In Welcome.do page it has the code for password encryption (AES/256). In the loginaction.do it returns the parameters along with the masked and encrypted pw (e.g username = testuser1, password = ******, encrypted_password = uicbaicbqibvie20910).
I already tried the boundary expression and it is able to take the encrypted_pw from welcome.do but I noticed that it’s not the same as the encrypted_pw(returned from server) when user clicks on Sign In button.

How do I masked the pw so that the real pw will not be logged in server.log?
How will I get the returned encrypted_pw from server?
When I checked the server.log, I also noticed that it seems like jmeter is not able to connect to jboss web server for pw authentication. Is there a configuration that I need to add in order to make the needed connection?

Since it is unable to successfully pass the authentication stage, it is returning a Session Timeout Error and user is unable to login.
So, I try logging in from the website itself and it is able to successfully authenticate my test user account.
What approach should I do in order to resolve this issue? 
Thank you for replying.

API testing is a critical aspect of software testing as APIs serve as the communication channels between different software components, allowing them to interact and exchange data. API testing not only involves validating the functionality, but also the performance, security, and reliability of APIs to ensure they meet the intended requirements and perform as expected.
The post The Only API Testing Checklist You Need in 2024 appeared first on Codoid.

We are currently testing out DevOps but one thing that I can’t do is have MSTest hit our internal server (which is housed in Azure) that contains selenium and such.
DevOps of course is external.
I am no networking guru, but is there a way to build a connection between the two?
Or do we have to make our selenium server outward facing?

I have the following code

driver.find_element_by_id(“Element_ID”).send_keys(str(sheet.cell(row=r, column=2).value))

Values is taken from excel, but instead send_keys, I want to use document.getElementsByName script.

How can I adapt the getElementsByName script for my situation?

I’m wondering what some other options are for accessing the test automation framework dependencies from my test classes.
Right now I have a layered architecture:

Framework layer (contains all shared code for accessing deployed services)
Harness layer (builds the classes and dependencies within the framework. Ie handles DI)
Test layer (controls the flow of the tests via the objects created in the harness)

I’ve got a test base class in the harness layer that has access to the various API, database, and UI classes needed to run our tests. So using inheritance to provide access to these dependencies.
A sample test class would look like:
public class MyTestClass : TestBase
{
[Test]
public void sample_test()
{
APIs.MyAPI.GetSampleEndpoint(); // APIs is an inherited field in test base
}
}

I feel inheritance is the best way to go about the issue of dependencies within a test class. The downside is managing the wrapping class that the “APIs” field is attached to.
Are there better options to go about managing a large list of dependencies in a clean way?

Selenium webdriver is not able to pull up the chrome dev tools. From what it looks like puppeteer could do this, but will it give me a way to save the interactive timeline report? Can puppeteer be run in a headfull mode? in an incognito tab? I saw the developers page but no specific examples

I have a test scenario where the web application checks for the user’s leave intent i.e., mouse hovering from the page to the browser close and then a frame gets triggered. Is there any way to do it?

Edit: So the dev implementation is that when the user is moving to the top of the document frame gets triggered and it is not browser close but moving to corner of the document.

I am using Selenium 4 in java to control Chrome and Edge and other browsers in order to test a video call app. I have a test where I’m starting up 2 different browsers at once in order to get them to communicate with each-other. I am using OBS to provide virtual webcams with customizable feeds so that I can switch input for either browser.
When I start up 2 Chromium-family browsers I get an issue that only the first one I launch (at a time) can get and show the full list of cameras while the other one shows nothing – even after waiting 15+ minutes. If I launch Firefox and Chrome as my browsers then they both can access the webcam list.
Since Firefox is not planned to be supported for the first version of the webapp, that leaves mostly chromium family browsers for me to test with (I’m on windows so I can’t test safari at this point). Does anyone know why this is happening and how I could fix it?
How I start Chrome:
ChromeOptions chromeOptions= new ChromeOptions();
chromeOptions.addArguments(“use-fake-ui-for-media-stream”);
chromeDriver = new ChromeDriver(chromeOptions);

How I start Edge:
EdgeOptions edgeOptions= new EdgeOptions();
edgeOptions.addArguments(“use-fake-ui-for-media-stream”);
edgeDriver = new EdgeDriver(edgeOptions);

How I start Firefox:
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.addPreference(“browser.cache.disk.enable”, false);
firefoxOptions.addPreference(“browser.cache.disk.capacity”, 0);
firefoxOptions.addPreference(“browser.cache.disk.smart_size.enabled”, false);
firefoxOptions.addPreference(“browser.cache.disk.smart_size.first_run”, false);
firefoxOptions.addPreference(“browser.sessionstore.resume_from_crash”, false);
firefoxOptions.addPreference(“browser.startup.page”, 0);
firefoxOptions.addPreference(“media.navigator.permission.disabled”, true);
firefoxOptions.addPreference(“device.storage.enabled”, false);
firefoxOptions.addPreference(“media.gstreamer.enabled”, false);
firefoxOptions.addPreference(“browser.startup.homepage”, “about,blank”);
firefoxOptions.addPreference(“browser.startup.firstrunSkipsHomepage”, false);
firefoxOptions.addPreference(“extensions.update.enabled”, false);
firefoxOptions.addPreference(“app.update.enabled”, false);
firefoxOptions.addPreference(“network.http.use-cache”, false);
firefoxOptions.addPreference(“browser.shell.checkDefaultBrowser”, false);
firefoxDriver = new FirefoxDriver(firefoxOptions);

In this code i want to navigate to the year 2022 and select July and print that result in the console but the issue is that in the else if condition when checking when this particular condition is encounted where the year is 2022 and the month is december it is passing and it is navigating to next Button which is January 2023 so the loop keeps on running and i cannot get my desired result
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

public class DatePicker {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5000));

driver.get(“https://seleniumpractise.blogspot.com/2016/08/how-to-handle-calendar-in-selenium.html”);

driver.findElement(By.id(“datepicker”)).click();

String desiredMonth = “July”;
String desiredYear = “2022”;

while (true) {
String year1 = driver.findElement(By.className(“ui-datepicker-year”)).getText();
String month1 = driver.findElement(By.className(“ui-datepicker-month”)).getText();

if (year1.equals(desiredYear) && month1.equalsIgnoreCase(desiredMonth)) {
System.out.println(“Desired date reached: the year is ” + year1 + ” and the month is ” + month1);
break;
} else if (year1.equals(desiredYear) && month1.compareTo(desiredMonth) < 0) {
driver.findElement(By.className(“ui-icon-circle-triangle-e”)).click();
} else {
driver.findElement(By.className(“ui-icon-circle-triangle-w”)).click();
}

// Wait for the changes to take effect
wait.until(ExpectedConditions.presenceOfElementLocated(By.className(“ui-datepicker-year”)));
}

driver.quit();
}
}

I am trying to use this xpath to find the number of elements that have a value between X and Y. The problem I am facing is since there is &nbsp in the HTML, and the code doesn’t detect the text value.
Xpath:
//div[@class=”prix”]/div[2]/div[2]/span[1][number(translate(text(), “,”, “.”)) > 4 and number(translate(text(), “,”, “.”)) < 43]

HTML :
<div class=”d-flex-inline productPrice”>
<span>4,42&nbsp;</span>
<span>€/HT</span>
</div>

I tried with replace(text(),” “,””) and replace(text(),”&nbsp;”,””) and other combinations but nothing worked.

I am confused to see what Appium version is installed on my machine. If I look into Appium UI it shows Appium v1.22.3 but When I check from cmd it shows 2.0.0-beta.71. how do I know which one is correct?

I am writing up a white paper to introduce Agile. As my role is a QA engineer working for a consultancy company.

We want customers to hire us to train them in implementing Agile and we DO want our customers to be aware of various traps when implementing Agile as well as false expectations.

I am thinking of adding some scenarios that show if Agile is not properly implemented, it may backfire on you.

Have you experienced any scenarios where Agile does not improve efficiency or even hurdle coding?