Pregunta

Estoy usando la API SOAP de Rally para crear un nuevo testcaseresult contra un caso de prueba que se haya creado previamente.Pero recibo un error cuando creo el resultado: 'Error de validación: TESTCASERESULT.DATE no debe ser nulo'

No estoy seguro de por qué este debería ser el caso, ¿puede ayudar?

    private Boolean createTestResultForTest(String aResult, String aTestCase)
    {
        TestCaseResult myTestCaseResult = new TestCaseResult();
        myTestCaseResult.Build = "1";
        DateTime myDate = DateTime.Now;
        myTestCaseResult.Date = myDate;
        String myQuery = "(FormattedID = " + aTestCase + ")";
        QueryResult myTestCaseReturn = m_rallyService.query(m_workspace, "TestCase", myQuery, "", true, 0, 100);
        long mycount = myTestCaseReturn.TotalResultCount;
        if (mycount > 0)
        {
            TestCase myTestCase = (TestCase)myTestCaseReturn.Results[0];
            myTestCaseResult.TestCase = myTestCase;
        }
        else
        {
            return false;
        }
        myTestCaseResult.Verdict = aResult;


        CreateResult myCreateTestResultResult = m_rallyService.create(myTestCaseResult);
        if (hasErrors(myCreateTestResultResult))
        {
            updateStatus("Could not create test result for test case:" + myTestCaseResult.TestCase.Name);
            printWarningsErrors(myCreateTestResultResult);
            return false;
        }
        else
        {
            myTestCaseResult = (TestCaseResult)myCreateTestResultResult.Object;
            myTestCaseResult = (TestCaseResult)m_rallyService.read(myTestCaseResult);
            updateStatus("Created TestCaseResult: " + myTestCaseResult.TestCase.Name + ", ref = " + myTestCaseResult.@ref);
        }
        return true;
    }

¿Fue útil?

Solución

Creo que ha encontrado un error conocido con la API de jabón de Rally que había olvidado hasta ahora.Básicamente, el error es que incluso cuando especifica un objeto de fecha / hora válida en su TestCaseresult, el Serializador SOAP no reconoce esto a menos que también establezca una bandera específica para que sea verdadera, es decir:

mytestcaseresult.datespecificado= verdadero;

Configure esta bandera y vuelva a ejecutar su código: debería funcionar ahora :)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top