This is the 9th day of my participation in the August More Text Challenge.

Hey, it’s Milo. Company three, please! Beg attention test development pit goods!

If you want to have more conversations with the author after reading the article, you can click read the article to find the comment section at the bottom and leave a comment to the author!

Project address: pity. Readthedocs. IO /

review

In fact, I don’t need to go back, I talked about how to generate build data in my last post, after all, I write 😁 in a row.

Write the fetch/query report interface

Now that we have the data for the report, let’s think about how we need to find the build record we want.

  • Time dimension

    Let’s say I want to find the last two days.

  • Executor dimension

    I want to check the data of XXX’s execution in the team just now.

  • Test plan level (not yet supported because it’s manual)

    I wanted to know how my test plan was going, and I just stared at him.

  • Wait, wait, wait. You can add more if you need to

This asynchronous writing is starting to work well, but sqlAlchemy doesn’t support it yet. I’ve been looking for a long time but I can’t find a good way to page query. The earth method is the only option:

  1. Query quantity by condition
  2. Paging queries according to conditions

Returns two parameters, the specific data and the total number of queries. The build record is large enough to be paginated. And the time parameter is a must, if you do a good job here can show the time range, such as only query within a month of the data, or more data will be very slow.

Talk to the front

In fact, the front end is a very simple query operation, after so many years of my practice I found that the front end is difficult in the design and style, logic processing is not complex. So I think people should use the off-the-shelf UI component if they can, otherwise it’s ugly and cumbersome to write native.

Configure the left ➤ and * id to be similar to Jenkins’ success or failure.

Then above is the report query dimension, not too difficult.


So that’s it for today, as you may have noticed. We only have summary data here. The blogger does not store the results of every use case. What kind of report is this?

That’s ok. In the next section we’ll look at how to write/get case execution reports.