Questions tagged [test-refactoring]

Test Refactoring is a process of refining test scripts to make it easier to read, and more importantly, easier to maintain.

Test Refactoring is a process of refining test scripts to make it easier to read, and more importantly, easier to maintain. Automated test scripts written in Watir, Selenium, RWebSpec should be refactored to make it readable and maintainable. TestWise IDE has refactoring option.

One unique feature of TestWise is its refactoring support, performing test refactoring efficiently and reliably.

4 questions
2
votes
1 answer

Why convert existing tests from JUnit4 to Junit5?

What are the advantages to making the non-trivial effort (even with automated tools) to convert a large number of existing JUnit4 tests to JUnit5? All the sources I see show advantages for writing new tests in JUnit5, but I don't see anything that…
KathyA.
  • 671
  • 6
  • 14
2
votes
1 answer

Compare if a DTO is equal with a Domain Model in Java

I have started trying to get my Unit Tests as cleaner as possible and I came across with: How could I compare in a clean way a DTO and a Domain Model (DM) which contain more than 10 attributes and share some of them but not all? Detail: There can be…
dbenor
  • 55
  • 1
  • 8
0
votes
2 answers

Refactoring and Testing

An example of scenario I'm trying to unit test somehow: A method gets three parameters: Company name, Plane Number 1, Plane Number 2 public Double getDistanceBetweenPlanes(Sting company, String plane1, String plane2) { -Apply some validation logic…
JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57
0
votes
1 answer

This code calculates the total price of a list of items but how can i improve it?

function calculateTotal(items) { let total = 0; for (let i = 0; i < items.length; i++) { if (items[i].type === "food") { total += items[i].price * 1.1; } else { total += items[i].price; } } return total; } const…