If you did not enter any assert in your test, and no line of code raised an exception, your test will actually pass (because there was no error).
You should check the status of your app after running the swipe using some Assert or even triggering an exception.
// assert com testng
Assert.assertEquals(<valor atual>, <valor esperado>);
// disparando exceção
throw new RuntimeException("Erro no app");
See an example of how to use the swipe method (extracted from link
public void swipeElementExample(WebElement el) {
String orientation = driver.getOrientation().value();
// pega a coordenada X do canto superior esquerdo do elemento, e adiciona a largura do elemento pra pegar o valor X da extrema direita do elemento
int leftX = el.getLocation().getX();
int rightX = leftX + el.getSize().getWidth();
// pega a coordenada Y do canto superior esquedo do elemento e subtrai a altura pra pegar o menor valor Y do elemento
int upperY = el.getLocation().getY();
int lowerY = upperY - el.getSize().getHeight();
int middleY = (upperY - lowerY) / 2;
if (orientation.equals("portrait")) {
// Swipe do centro-esquerdo para o centro-direito do elemento, em 500 ms
driver.swipe(leftX + 5, middleY, rightX - 5, middleY, 500);
}
else if (orientation.equals("landscape")) {
// Swipe do centro-direito para o centro-esquerdo do elemento, em 500ms
driver.swipe(rightX - 5, middleY, leftX + 5, middleY, 500);
}
}