• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gripmock / grpctestify-rust / 30298297267

27 Jul 2026 07:27PM UTC coverage: 80.765% (+6.6%) from 74.202%
30298297267

Pull #81

github

web-flow
Merge 85fe608c2 into 67c08fb25
Pull Request #81: rhai

47702 of 59063 relevant lines covered (80.76%)

23192.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/execution/workflow_graph.rs
1
use crate::parser::ast::{Section, SectionType};
2

3
pub struct WorkflowSummary {
4
    pub total_requests: usize,
5
    pub total_responses: usize,
6
    pub total_errors: usize,
7
    pub total_extractions: usize,
8
    pub total_assertions: usize,
9
    pub has_streaming: bool,
10
}
11

12
pub fn get_workflow_summary(sections: &[Section]) -> WorkflowSummary {
×
13
    let total_requests = sections
×
14
        .iter()
×
15
        .filter(|s| s.section_type == SectionType::Request)
×
16
        .count();
×
17
    let total_responses = sections
×
18
        .iter()
×
19
        .filter(|s| s.section_type == SectionType::Response)
×
20
        .count();
×
21
    let total_errors = sections
×
22
        .iter()
×
23
        .filter(|s| s.section_type == SectionType::Error)
×
24
        .count();
×
25
    let total_extractions = sections
×
26
        .iter()
×
27
        .filter(|s| s.section_type == SectionType::Extract)
×
28
        .count();
×
29
    let total_assertions = sections
×
30
        .iter()
×
31
        .filter(|s| s.section_type == SectionType::Asserts)
×
32
        .count();
×
33

34
    let has_streaming = total_requests > 1 || total_responses > 1;
×
35

36
    WorkflowSummary {
×
37
        total_requests,
×
38
        total_responses,
×
39
        total_errors,
×
40
        total_extractions,
×
41
        total_assertions,
×
42
        has_streaming,
×
43
    }
×
44
}
×
45

46
/// Get call type description based on workflow
47
pub fn get_call_type(summary: &WorkflowSummary) -> &'static str {
×
48
    if summary.total_errors > 0 && summary.total_requests == 1 && summary.total_responses == 0 {
×
49
        "Unary Call Expecting Error"
×
50
    } else if summary.total_requests == 1 && summary.total_responses > 1 {
×
51
        "Server Streaming Call"
×
52
    } else if summary.total_requests > 1 && summary.total_responses == 1 {
×
53
        "Client Streaming Call"
×
54
    } else if summary.total_requests > 1 && summary.total_responses > 1 {
×
55
        "Bidirectional Streaming Call"
×
56
    } else if summary.total_requests == 1 && summary.total_responses == 1 {
×
57
        "Standard Unary Call"
×
58
    } else {
59
        "Multi-Step Workflow"
×
60
    }
61
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc