Error en test de QA

Iniciado por LoKogan, Septiembre 13, 2020, 06:42:00 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Septiembre 13, 2020, 06:42:00 PM Ultima modificación: Septiembre 13, 2020, 10:54:42 PM por Gabriela
Buenas ,tengo este error cuando corro el código de testeo y no tengo idea a qué se refiere


When realizo una petición 'POST' a 'ANALYSIS' al endpoint de analisis - 'request/cat_analisis' # CatSteps.realizoUnaPeticiónOperationAEntityAlEndpoi
ntDeAnalisisRequest(String,String,String)
      java.lang.NoSuchMethodException: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(api.model.Analysis)
        at java.base/java.lang.Class.getMethod(Class.java:2108)
        at ar.steps.CatSteps.realizoUnaPeticiónOperationAEntityAlEndpointDeAnalisisRequest(CatSteps.java:59)
        at ?.realizo una petición 'POST' a 'ANALYSIS' al endpoint de analisis - 'request/cat_analisis'(You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
eature:22)

    Then obtengo el status code '401'                                                              # CatSteps.obtengoElStatusCodeStatusCode(int)
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.049 s <<< FAILURE! - in TestSuite
[ERROR] ApiExampleProjectTestRunner.runScenario  Time elapsed: 1.24 s  <<< FAILURE!
java.lang.NoSuchMethodException: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login(api.model.Analysis)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   ApiExampleProjectTestRunner.runScenario » NoSuchMethod services.AnalisisServic...
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[WARNING] Could not delete temp directory C:\Users\Usuario\AppData\Local\Temp\surefire9777909246201055538 because Directory C:\Users\Usuario\AppData\Loc
al\Temp\surefire9777909246201055538 unable to be deleted.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  17.420 s
[INFO] Finished at: 2020-09-13T18:40:55-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project lippia-api-example-project: There
are test failures.
[ERROR]
[ERROR] Please refer to D:\UTN\Autodidacta\Crowdar\Lippia-API-sample-project-master\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
"cmd" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.


Hola @You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
Como estas ejecutando los tests?

Saludos



mvn -P academy "-Dcucumber.tags=@AnalysisCat" test
con esa instrucción, no se si responde a tu pregunta..

Proba dandole click derecho al testng.xml y ponele RUN.
Es otra forma de correrlo, como para ir descartando.

Saludos!


Me sigue tirando el mismo error, aparentemente está en esta linea

@When("realizo una petición '(.*)' a '(.*)' al endpoint de analisis - '(.*)'")
    public void realizoUnaPeticiónOperationAEntityAlEndpointDeAnalisisRequest(String operation, String entity, String request) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        EntityConfiguration.valueOf(entity).getEntityService().
                getMethod(operation.toLowerCase(), Analysis.class)
                .invoke("", request);

    }
}
pero no entiendo por qué si está igual a las otras