Quickly Testing Qt Desktop Applications With Approval Tests
with Approval Tests Clare Macrae (She/her) clare@claremacrae.co.uk 16 September 2020 CppCon (Online)2 Audience: Developers testing Desktop GUIs, including Qt-based ones Approval Tests: claremacrae tations.html3 Contents •Introduction •Qt –Setting Up Testing –Error-prone Things –Approval Tests •Extras –Tools –Summary4 About Me • Scientific C++ and Qt developer since 1999 • My mission: mission: Sustainable and efficient testing and refactoring of legacy code – Co-author of “Approval Tests for C++” • Consulting & training via “Clare Macrae Consulting Ltd” – claremacrae.co.uk • All links0 码力 | 77 页 | 6.96 MB | 5 月前3Leveraging Istio for Creating API Tests - Low Effort API Testing for Microservices
API Tests Low Effort API Testing for Microservices | CONFIDENTIAL • What has changed? – Migration to microservices triggering need for extensive API tests • Problem: – Creating API tests is effort effort intensive – Creating + maintainting E2E, service tests, component tests adds up very quickly • What happens if you do not address the problem? – Thorough test coverage can take a lot of time outcome: Just create E2E tests • What is our solution? – Leverage Istio sidecar to listen to API traffic data and create tests from the data – 10x speed in creating API tests • Can also be sped up0 码力 | 21 页 | 1.09 MB | 1 年前3Behavior-driven Tests for Microservices-based Algo Trading System
Behavior-driven Tests for Microservices-based Algo Trading System Summary : Introduction : This poster will introduce a test framework we use at Bloomberg to enable behavior-based tests in natural language often non-trivial to automate the system-level tests with external dependencies. Controlling external dependencies are especially important for algo tests since certain algo behaviors require hard-to-produce condition. ● Fully automated : Running tests are integrated into CI so algo behaviors are regressed for any dependent code change. ● Natural language layer: Tests are written in natural language so0 码力 | 1 页 | 65.24 KB | 5 月前3Back to Basics Unit Testing
and Mike Shah (tomorrow): Back To Basics, Debugging and Testing Chip Hogg (Wednesday), Making Hard Tests Easy (Robotics Track) Xiaofan Sun (Thursday): Mix Assertion, Logging, Unit Testing and Fuzzing Pete 3Learning Unit Testing CppCon 2015: T. Winters & H. Wright “All Your Tests are Terrible..." 4Rule 0 Write unit tests 5Part 0: Basics of the Basics Unit testing is the act of testing the correctness correctness of your code at the smallest possible unit: the function. Unit tests are small, automated, stand alone executables that perform unit testing on your code. Part 0: Basics 6auto abs(int x) ->0 码力 | 109 页 | 4.13 MB | 5 月前3Spring Framwork Testing v5.3.36 SNAPSHOT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 3.6.2. Writing Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 MockMvc vs End-to-End Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 3.8.2. Further Examples of Client-side REST Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 4. Further Resources0 码力 | 193 页 | 2.53 MB | 1 年前3The Rust Programming Language,2nd Edition
of src/main.rs. Inside src/lib.rs we’ll find the following: Filename: src/lib.rs #[cfg(test)] mod tests { #[test] fn it_works() { } } Cargo creates an empty test to help us get our library started, rather the “Hello, world!” binary that we get when we use the --bin option. We’ll look at the #[] and mod tests syntax in the “Using super to Access a Parent Module” section later in this chapter, but for now, makes a tests module for you. Let’s go into more detail about that now. In your communicator project, open src/lib.rs: Filename: src/lib.rs pub mod client; pub mod network; #[cfg(test)] mod tests { #[test]0 码力 | 617 页 | 1.54 MB | 1 年前3The Zig Programming Language 0.6.0 Documentation
true; // another comment assert(x); } $ zig test comments.zig 1/1 test "comments"...OK All 1 tests passed. There are no multiline comments in Zig (e.g. like /* */ comments in C). This helps allow assert(mem.eql(u8, "hello", "h\x65llo")); } $ zig test test.zig 1/1 test "string literals"...OK All 1 tests passed. See also: Arrays Zig Test Source Encoding Escape Sequences Escape Sequence Name \n Newline i32 = 5678; y += 1; assert(y == 5679); } $ zig test test.zig 1/1 test "var"...OK All 1 tests passed. Variables must be initialized: test.zig test "initialization" { var x: i32; x0 码力 | 214 页 | 5.37 MB | 1 年前3The Zig Programming Language 0.7.1 Documentation
true; // another comment expect(x); } $ zig test comments.zig 1/1 test "comments"... OK All 1 tests passed. There are no multiline comments in Zig (e.g. like /* */ comments in C). This helps allow expect(mem.eql(u8, "hello", "h\x65llo")); } $ zig test test.zig 1/1 test "string literals"... OK All 1 tests passed. See also: Arrays Zig Test Source Encoding Escape Sequences Escape Sequence Name \n Newline i32 = 5678; y += 1; expect(y == 5679); } $ zig test test.zig 1/1 test "var"... OK All 1 tests passed. Variables must be initialized: test.zig test "initialization" { var x: i32; x0 码力 | 225 页 | 5.74 MB | 1 年前3The Zig Programming Language 0.10.1 Documentation
addOne adds one to 41" { 4 5 // The Standard Library contains useful functions to help create tests. 6 // `expect` is a function that verifies its argument is true. 7 // It will return an introducing_zig_test.zig 2 1/1 test.expect addOne adds one to 41... OK 3 All 1 tests passed. The introducing_zig_test.zig code sample tests the function addOne to ensure that it returns 42 given the input 41 "expect addOne adds one to 41"... Lines like this indicate which test, out of the total number of tests, is being run. In this case, [1/1] indicates that the first test, out of a total of one test, is being0 码力 | 239 页 | 8.03 MB | 1 年前3The Zig Programming Language 0.12.0 Documentation
"expect addOne adds one to 41" { // The Standard Library contains useful functions to help create tests. // `expect` is a function that verifies its argument is true. // It will return an error one to 41... OK 2/2 testing_introduction.decltest.addOne... OK All 2 tests passed. The testing_introduction.zig code sample tests the function addOne to ensure that it returns 42 given the input 41 this indicate which test, out of the total number of tests, is being run. In this case, 1/2 indicates that the first test, out of a total of two tests, is being run. Note that, when the test runner program's0 码力 | 241 页 | 7.37 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100