Issues when running functional tests

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    1 posts
    Member since:
    Nov 2019

    Posted 11 Dec 2019 Link to this post

    We have a series of functional tests which test that our endpoints are returning a 200 status code and return a file with a content type of application/pdf.

    When running the tests individualy the all pass however when clicking "run all tests" we find that tests fail at random. So sometimes 2/10 will pass other times 9/10 etc.

    A null reference exception is returned with the addition of "CancelProcessingException: An error occurred while evaluating the report parameters. Report source cannot be processed. Check the InnerException for more information." unfrtunatley the inner exception is also null.

     

    An example of one of our functional tests is as below:

            [Fact]
            public async Task Post_valid_data_returns_success_and_correct_content_type()
            {
                // Given
                var client = _factory.CreateClient();

                // When
                var response = await client.PostAsJsonAsync(BASE_URL,
                   new ReportDataExample().GetExample());

                // Then
                await response.EnsureSuccessStatusCode();
                response.Content.Headers.ContentType.ToString().Should().Be("application/pdf");

            }

    I have attached a copy of the full error including stack trace. If anyone could advise on what the issue may be and/or a possible solution it would be greatly appreciated.

     

  2. Neli
    Admin
    Neli avatar
    252 posts

    Posted 16 Dec 2019 Link to this post

    Hello Ryan,

    Based on the description, I suspect that this is a bug that is already logged in our system- Occasional NullReferenceException on rendering. Feel free to vote for it. In the post, you can also find a workaround.

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top