Skip to main content

euv_automation/
lib.rs

1//! euv-automation
2//!
3//! Dev-only UI automation testing driver, AI Schema v1/v2 (`euv.ai.schema.v1` /
4//! `euv.ai.schema.v2`) same-frame runtime/layout introspection protocol,
5//! non-blocking async `DevAutomationBridge`, and versioned `euv.ui-e2e.v1`
6//! recorder/replayer/verdict engine. All live dev bridge hooks compile to
7//! zero-cost no-ops under release builds (`#[cfg(not(debug_assertions))]`).
8
9mod anomaly;
10mod dev_gate;
11mod driver;
12mod e2e;
13mod fixture;
14mod schema;
15mod selector;
16
17#[cfg(test)]
18#[path = "../tests/mod.rs"]
19mod tests;
20
21pub use {
22    anomaly::*, dev_gate::*, driver::*, e2e::*, fixture::*, schema::*, selector::*,
23    serde_json::Value,
24};
25
26#[cfg(not(target_arch = "wasm32"))]
27use std::time::Instant;
28use std::{
29    cell::{BorrowMutError, RefCell, RefMut},
30    collections::{BTreeMap, HashMap, HashSet},
31    fmt::{self, Formatter},
32    rc::Rc,
33    str::from_utf8,
34    sync::{
35        Arc,
36        atomic::{AtomicU64, Ordering},
37    },
38};
39#[cfg(all(debug_assertions, not(target_arch = "wasm32")))]
40use std::{
41    io::{self, ErrorKind, Read, Write},
42    mem::take,
43    net::{SocketAddr, TcpListener, TcpStream},
44    str::{Lines, SplitWhitespace},
45    sync::{
46        Mutex,
47        atomic::{AtomicBool, AtomicUsize},
48        mpsc::{Receiver, SyncSender, TryRecvError, TrySendError, sync_channel},
49    },
50    thread::{self, Builder, JoinHandle, sleep},
51    time::{Duration, SystemTime, UNIX_EPOCH},
52};
53
54#[cfg(any(test, all(debug_assertions, not(target_arch = "wasm32"))))]
55use serde_json::from_value;
56#[cfg(test)]
57use serde_json::json;
58use {
59    euv::*,
60    lombok_macros::{CustomDebug, Data, New},
61    serde::{Deserialize, Serialize},
62    serde_json::{Error, Map, from_str, to_string, to_string_pretty, to_value},
63};