<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrii Bosonchenko on Medium]]></title>
        <description><![CDATA[Stories by Andrii Bosonchenko on Medium]]></description>
        <link>https://medium.com/@andboson?source=rss-424566e3b528------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bFeC36hFUQ7jFvcQUr_Q0g.jpeg</url>
            <title>Stories by Andrii Bosonchenko on Medium</title>
            <link>https://medium.com/@andboson?source=rss-424566e3b528------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:23:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andboson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Which local LLM is best for coding and code review on a 32 GB MacBook? I tested 18 setups]]></title>
            <link>https://andboson.medium.com/which-local-llm-is-best-for-coding-and-code-review-on-a-32-gb-macbook-i-tested-12-setups-fc5593257b1f?source=rss-424566e3b528------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc5593257b1f</guid>
            <dc:creator><![CDATA[Andrii Bosonchenko]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 21:24:25 GMT</pubDate>
            <atom:updated>2026-11-21T11:23:19.236Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8x3Y-C2AuPTCNRNXNiJug.png" /></figure><p>I keep a MacBook Pro (M1 Pro, 32 GB) as a local inference box. Models are cheap to download and hard to compare: every model card says it is great at coding, and every engine claims to be the fastest on Apple silicon. So I stopped reading and ran the same small test against everything I had installed.</p><p>This is a practical comparison, not a leaderboard. The question was simple: <strong>which model do I actually want behind my editor and my review workflow, on this machine?</strong></p><h3>Hardware and setup</h3><ul><li><strong>Machine:</strong> MacBook Pro, Apple M1 Pro, 32 GB unified memory, serving over the local network</li><li><strong>Engines:</strong> LM Studio (MLX and GGUF), Splash (an Apple-silicon engine), Ollama, and llama.cpp (built from source, needed for the newest architecture)</li><li><strong>Client:</strong> a plain Python script (standard library only) calling each OpenAI-compatible endpoint</li><li><strong>Models:</strong> Arete 27B, Flint, Qwen3.6–35B-A3B, qwen-agentworld-35B-A3B, Gemma 4 26B-A4B, KAT-Coder v2.5-dev, and a 2B Liquid model as a floor. All 4-bit quantizations. Later additions: Devstral-small-2, Qwen3-Coder 30B, Qwen2.5-Coder 14B, Inkling-2-mini, and Qwen3-Coder-Next, which is the one 2-bit exception.</li></ul><p>Memory is the real constraint. A 27B–35B model at 4-bit takes 16–20 GB, so only one large model can sit in memory at a time. That matters later.</p><blockquote><strong>A note on wired memory.</strong> By default macOS lets the GPU wire only a share of unified memory, roughly two thirds to three quarters, which on a 32 GB Mac is too little for a 20 GB model plus its context cache. On this machine the limit is raised to 30088 MB (about 29.4 GB), set with sudo sysctl iogpu.wired_limit_mb=30088; the setting resets on reboot. I did not benchmark with the default limit, so I cannot say how much it changes the numbers, but without it the larger models are the first to fail to load or slow down.</blockquote><h3>How I tested</h3><p><strong>Coding (3 tasks, checked by tests).</strong> Each model gets a prompt and must return one code block. I run it against hidden assertions:</p><ol><li>parse_duration: parse strings like 1h30m15s into seconds, rejecting bad input in eight different ways.</li><li>merge_intervals: merge overlapping intervals without mutating the input.</li><li>LRUCache: O(1) get and put with correct eviction order.</li></ol><p>A task passes only if every assertion passes.</p><p><strong>Code review (8 planted issues).</strong> A short Python snippet with a SQL injection, a mutable default argument, a leaked connection, an off-by-one in pagination, a division by zero, a swallowed exception, a wrong average denominator, and fetch-all-then-slice paging. The model is asked to list every bug. I score by pattern-matching each planted issue in the answer, then read the answers to sanity-check the score.</p><p><strong>Settings.</strong> Temperature 0.2 for every request, no system prompt, and sampling parameters other than temperature left at each server’s defaults. The first pass used max_tokens 8192. Several reasoning models ran out of tokens before answering, so later runs used 32768. The results below say which budget each row had.</p><h3>Results</h3><p>Coding is tasks passed out of 3, review is planted bugs found out of 8, speed is generated tokens per second.</p><ul><li><strong>Arete 27B — Splash (MLX):</strong> coding 3/3, review 8/8, ~20 tok/s</li><li><strong>Inkling-2-mini, low reasoning — llama.cpp (GGUF Q4_K_M)</strong>: coding 3/3, review 8/8, ~15 tok/s</li><li><strong>Inkling-2-mini, medium reasoning — llama.cpp</strong>: coding 3/3, review 7/8, ~15 tok/s (the default high effort was too slow to finish)</li><li><strong>Arete 27B — LM Studio (MLX):</strong> coding 2/3, review 8/8, ~10 tok/s</li><li><strong>Flint — Splash (GGUF):</strong> coding 3/3, review 7/8, ~52 tok/s</li><li><strong>qwen-agentworld 35B-A3B — LM Studio (MLX):</strong> coding 3/3, review 7/8, ~36 tok/s</li><li><strong>qwen-agentworld 35B-A3B — Ollama (GGUF):</strong> coding 3/3, review 7/8, ~32 tok/s</li><li><strong>Gemma 4 26B-A4B — LM Studio:</strong> coding 2/3, review 7/8, ~34 tok/s</li><li><strong>Flint (mixed 4-bit) — LM Studio (MLX):</strong> coding 2/3, review 7/8, ~42 tok/s</li><li><strong>KAT-Coder v2.5-dev — LM Studio (MLX):</strong> coding 3/3, review 6–7/8, ~44 tok/s</li><li><strong>KAT-Coder v2.5-dev — LM Studio (GGUF):</strong> coding 3/3, review 6/8, ~33 tok/s</li><li><strong>Arete 27B, low reasoning — Splash:</strong> coding 3/3, review 6/8, ~25 tok/s</li><li><strong>Qwen3.6–35B-A3B — LM Studio (MLX):</strong> coding 2/3 (3/3 on a rerun with a bigger token budget), review 6/8, ~45 tok/s</li><li><strong>Devstral-small-2 (2512) — LM Studio (MLX)</strong>: coding 2/3, review 5–6/8, ~10 tok/s</li><li><strong>Qwen3-Coder 30B — LM Studio (MLX)</strong>: coding 3/3, review 4/8, ~41 tok/s</li><li><strong>Qwen2.5-Coder 14B — LM Studio (MLX)</strong>: coding 1/3, review 5/8, ~18 tok/s</li><li><strong>Qwen3-Coder-Next (2-bit) — LM Studio (MLX)</strong>: coding 1/3, review 4/8, ~40 tok/s (the 2-bit output was partly garbled)</li><li><strong>LFM3-Omni 2B — LM Studio:</strong> coding 1/3, review 3/8, ~66 tok/s</li></ul><h3>What I learned</h3><p><strong>Arete is the best reviewer.</strong> It was the only model to find all eight planted problems, plus extras I had not planted (unstable sort order, cache key missing parameters, LIKE-wildcard injection). On Splash it is fast enough to use: about 20 tok/s.</p><p><strong>Flint on Splash is the best everyday model.</strong> It passed every coding task, found 7/8 review issues, and ran at about 52 tok/s with the model staying resident. That is the combination I would leave running all day.</p><p><strong>Reasoning budgets decide many “failures”.</strong> Three models failed one coding task on the first pass, and none of them were wrong. They spent the whole 8k token budget thinking and never wrote the answer. With a 32k budget they passed. If your agent sets a small max_tokens, reasoning models will look worse than they are.</p><p><strong>Low reasoning effort is a real trade-off.</strong> On Splash, reasoning_effort: low cut Arete’s total time by about two thirds with coding unchanged at 3/3. The review dropped from 8/8 to 6/8, losing the two subtlest bugs. Use low for tested code, default for serious reviews. On LM Studio the same parameter appeared to have no effect on KAT-Coder.</p><p><strong>Engine choice matters as much as model choice.</strong> The same Arete weights ran about twice as fast on Splash as on LM Studio. For the same qwen-agentworld model, LM Studio’s MLX build was about 13% faster than Ollama’s GGUF.</p><p><strong>New architectures depend on engine support, and a model that runs is not always a model that works.</strong> Inkling-2-mini would not load in LM Studio, Splash or mlx-lm. It only ran after I rebuilt llama.cpp from the latest source, because my compiled binary was months older than the support for it. When a model refuses to load, check the engine&#39;s build date before blaming the model. The opposite case was Qwen3-Coder-Next at 2-bit: it loaded fine, then produced garbled code.</p><h3>Caveats</h3><ul><li>Three coding tasks and one review snippet is a small test. It tells you about this kind of work, not about large refactors or long-context tasks.</li><li>Review scoring uses pattern matching, so it can miss a correct finding phrased in an unusual way.</li><li>Token budgets differ between rows, and sampling defaults other than temperature were left to each server.</li></ul><h3>Takeaway</h3><p>If you have 32 GB of Apple silicon and want one setup: <strong>Flint on Splash for daily coding, Arete for reviews.</strong> Give reasoning models a generous token budget, and measure your own machine, because engine, quantization and memory pressure moved the results as much as the model did. The late entrant to watch is <strong>Inkling-2-mini</strong>: at low reasoning effort it matched Arete&#39;s 8/8 review and passed every coding task at about 15 tok/s, but it needs a freshly built llama.cpp and its default reasoning level is too slow for everyday use.</p><p><em>made with @Claude</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc5593257b1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mac Mini M4 16 GB, local AI]]></title>
            <link>https://andboson.medium.com/mac-mini-m4-16-gb-local-ai-76076738cb7e?source=rss-424566e3b528------2</link>
            <guid isPermaLink="false">https://medium.com/p/76076738cb7e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[m4-mac-mini]]></category>
            <category><![CDATA[llama-cpp]]></category>
            <category><![CDATA[16gb]]></category>
            <dc:creator><![CDATA[Andrii Bosonchenko]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 12:36:43 GMT</pubDate>
            <atom:updated>2026-08-05T12:47:47.225Z</atom:updated>
            <content:encoded><![CDATA[<p>What it can run</p><blockquote><strong>TL;DR:</strong><br>KAT-Coder-V2.5-Dev is a winner, not a surprise</blockquote><p>I wanted to experiment with how this, a consumer-grade, highly efficient desktop device can be used to run local AI agents and handle heavy coding evaluation tasks.</p><h3>The Hardware &amp; Software Setup</h3><ul><li><strong>Primary Desktop:</strong> Mac mini M4 (16GB Unified Memory)</li><li><strong>Secondary Setup:</strong> Working horse laptop with low VRAM (~4GB)</li><li><strong>Network:</strong> Connected via Ethernet, static IPs</li><li><strong>AI Agent:</strong> <em>Oh My Pi (OMP)</em> — a feature-rich agent framework with provider model auto-discovery.</li></ul><p>OMP models.yml:</p><pre>╰─$ cat ~/.omp/agent/models.yml                      <br>providers:<br>  llama.cpp:<br>    baseUrl: http://192.168.10.1:8081/v1<br>    api: openai-responses<br>    auth: none<br>    discovery:<br>      type: llama.cpp<br>    models:<br>       - id: Kwaipilot_KAT-Coder-V2.5-Dev-Q4_K_M.gguf<br>         reasoning: false<br>         contextLength: 40536<br>         maxTokens: 32000<br>  ollma-mac:<br>      baseUrl: http://192.168.10.1:11434<br>      api: openai-responses<br>      auth: none<br>      discovery:<br>        type: ollama</pre><p>GPU memory usage limit:</p><pre>➜  ~ cat /etc/sysctl.conf                                  <br>iogpu.wired_limit_mb=14388</pre><h3>Why llama.cpp?</h3><p>Most of these models were run via llama.cpp because it offers greater flexibility and significantly higher speeds (yielding around <strong>25–30 tokens per second</strong>) compared to running the same models through Ollama natively.My llama.cpp run config:</p><pre>➜  ~ ./Work/llama.cpp/build/bin/llama-server \<br>  --model /Users/drew/ThinkingCap-Qwen3.6-27B.i1-Q2_K.gguf  \<br>  --port 8081 --host 192.168.10.1  --ctx-size 65535 -ngl 99   --mmap \<br>  --flash-attn on --threads 4</pre><p>You can use models downloaded from Ollama with llama.cpp too.</p><p>To do that, you need to run ollama show —modelsfile &lt;modelname&gt; and use FROM location.</p><p>After a series of experiments, I collected this list of models, created by Claude Opus.</p><h3>The Evaluation Task</h3><p>After a series of experiments, Claude Opus helped me compile and score a list of models based on a rigorous engineering benchmark.</p><ul><li><strong>The Workload:</strong> Each model was given the exact same codebase and the exact same prompt.</li><li><strong>The Ground Truth:</strong> A human-verified reference document written by an engineer with full access to the code and infrastructure configuration.</li><li><strong>Scoring Criteria:</strong> Factual accuracy, completeness, and appropriateness of technical depth for an engineering audience (service names, internal URLs, retry backoffs, batch-size constants, and event names).</li></ul><p><em>Context on the Service:</em> The codebase tested was a Go binary that consumes event notifications from a message queue, downloads/parses CSV inventory snapshots from object storage, reconciles them against a downstream commerce platform, and pushes batched updates via a REST/GraphQL API. A second scheduled job handles stuck records. It’s a realistic, un-exotic test case where hallucinations are easy to catch.</p><h3>Model Rankings &amp; Performance</h3><p><em>(Average response rate across tests: 12–25 tokens per second)</em></p><p>The screenshot shows how Mac handles memory management. I was impressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnxGs-nfmyvoFpeW_WnuYw.png" /></figure><h3>1. mradermacher / KAT-Coder-V2.5-Dev (i1-GGUF, IQ3_XXS, via ollama — ~43 min execution)</h3><ul><li><strong>The Verdict:</strong> The strongest performer of the set.</li><li><strong>Why it won:</strong> It reproduces almost every fact in the reference doc with pinpoint precision — including dead-letter-queue retry/retention limits, storage lifecycle policies, cross-account replication, per-environment timeouts, and internal edge-case routing rules. It cleanly walks the multi-step processing pipeline and nails the batching constants. Structurally, it mirrors the reference layout closely without unnecessary padding.</li></ul><h3>2. Qwen3.5–35B-A3B (UD-IQ3_XXS, via llama.cpp — ~8 min execution)</h3><ul><li><strong>The Verdict:</strong> Extremely accurate, fast, and structured.</li><li><strong>Why it stands out:</strong> It features helpful diagrams for system context, sequence flows, and dependency graphs that accurately reflect the event-driven pipeline. It correctly names actual event types, ownership-routing rules, and real observability metrics. Its only minor slip was labeling a counter metric as a histogram. The added “business rules” and “future considerations” sections provide great synthesis without hallucinating specifics.</li></ul><h3>3. Qwen3.6–27B-A3B-Coder (IQ3_M, via llama.cpp — ~29 min execution)</h3><ul><li><strong>The Verdict:</strong> Thorough, well-structured, and appropriately deep.</li><li><strong>Why it ranks here:</strong> It provides the correct module breakdown, pipeline flowchart, and a solid list of integration API methods matching the real client interface. It correctly flags “no shared mutable state” and per-service dependency injection. The only critique is a minor cron-format mismatch on the scheduled job’s default schedule (6-field vs. the reference’s 5-field default).</li></ul><h3>4. Piko-9b (~10 min execution)</h3><ul><li><strong>The Verdict:</strong> Surprisingly close to ground truth in tone and coverage.</li><li><strong>Why it’s notable:</strong> It accurately explains ownership-routing mechanisms, reconciliation rules, batch constants, and graceful shutdown sequences. It rounds out its output with a useful glossary and an explicit adherence to the actual source code logic.</li></ul><h3>5. Qwen3.6–27B-A3B-Coder-MTP (GGUF, via llama.cpp)</h3><ul><li><strong>The Verdict:</strong> A solid, highly capable alternative leveraging multi-token prediction mechanics.</li><li><strong>Why it lands here:</strong> Bringing multi-token prediction into the mix alters the generation dynamics, striking a strong balance between raw text generation throughput and structural coherence. It maintains the rigorous code-comprehension strengths inherent to the Qwen coder lineage while navigating the dense repository layout efficiently.</li></ul><p><strong>The rest:</strong></p><pre>6. Qwen3.6-27B-A3B-Coder-vision (CD-Q3_K_L, via llama.cpp, ~9 min)<br><br>Comprehensive and structurally sound (entry point, config, wrappers, services, shutdown, deployment), and it correctly captures batch constants, metrics, and the shutdown sequence. It introduces a couple of unverifiable or likely-invented specifics — a claim that a constant was “reduced from” some prior value, and a CI workflow filename that doesn’t match the real one. Minor hallucinations rather than core factual errors; largely reliable but slightly less trustworthy than the top tier.<br><br>7. gemma-4-26B-A4B-it (bartowski, IQ2_M, ~9 min)<br><br>Concise but accurate: both flowcharts (main processing path and scheduled job) match the real control flow, including the core reconciliation rule and the status-based targeting for the scheduled job. Correct as far as it goes, but noticeably shallower than the top-ranked files — it omits configuration-schema and infrastructure details, and doesn’t name the actual event type used internally. Good accuracy-to-depth ratio, limited technical depth.<br><br>8. Qwen3.6-27B-A3B-Coder-i1 (GGUF, mrad, IQ3_M, 10 min)<br><br>Good directory-level accuracy and a mostly correct configuration table. Correctly identifies the core reconciliation logic and the batch-sizing heuristic along with its known limitation. Inflates a “monolith” framing as a stated risk that isn’t present in the ground truth, and is somewhat thinner on the external API integration details (auth flow, retry classification) than top-tier docs.<br><br>9. gemma-4-A4B-98e-v6-coder-it (mannix, IQ4_K_M, ~4 min)<br><br>Reasonably deep, covering batch limits, metrics, and error-handling strategy accurately. Its configuration-schema example uses the wrong naming convention (mismatched key casing) compared to the reference’s actual schema — a real error an engineer would trip over. Also invents an unsupported “Assumptions” section, which slightly undermines trust in the rest of the document.<br><br>10. OmniCoder-2-9B (mradermacher, Q6_K, ~13 min)<br><br>Actually one of the more complete-looking documents in the set — correct batch constants, correct metric names, correct health endpoint, and the correct event name for the activation flow. Ranks mid-table because its configuration-schema example uses the wrong key-naming convention versus the real schema, and it misattributes the logging library used. Also invents an unsupported “Assumptions” section. Solid structure undercut by naming-convention and library-attribution errors.<br><br>11. Laguna-XS-2.1 (bartowski, IQ2_M, ~8 min)<br><br>Covers the right shape of the system (queue listener, batch processor, scheduled checker, health server) and correctly lists the batch/retry constants, but introduces a fabricated messaging-system node with no basis in the reference, misattributes the logging approach, and adds specific but unverifiable operational details that read as plausible fill-in rather than sourced fact. Decent breadth, moderate reliability.<br><br>12. KAT-Coder-V2.5-Dev (mradermacher, i1-GGUF-IQ3_XXS, via llama.cpp, ~8 min)<br><br>Well-organized with good coverage of build/deploy/testing mechanics, but contains a clear factual error: understates a key batching limit by roughly 50x. Also fabricates unverifiable specifics — an invented internal team/contact name and specific dashboard URLs. These errors, combined with generic “troubleshooting/contact” filler not grounded in the codebase, push it into the lower-middle tier despite otherwise reasonable structure.<br><br>13. Qwen3-Coder-30B-A3B-Instruct (unsloth, UD-IQ2_M, ~8 min)<br><br>Thin and generic — most sections restate the same few facts (queue ingestion, external sync, scheduled job, health endpoints) without engaging the actual reconciliation logic, routing rules, or backoff parameters that make this service’s design distinctive. Also mislabels several counter-type metrics as gauges. Low technical depth for the intended audience, though nothing it states is outright fabricated.<br><br>14. Qwen3.6-27B-A3B-Coder-i1 (mradermacher, IQ3_M, ~10 min)<br><br>Structurally reasonable but contains several concrete factual errors: renames a key internal event and its parameters incorrectly, invents specific API paths that don’t exist, and states the wrong default schedule for the recurring job (hourly vs. the real daily default). These are the kind of details an engineer would rely on and get wrong, which is more damaging than the generic-but-safe files ranked above it.<br><br>15. gemma-4-it (12b)<br><br>Short and directionally correct on the two flows and basic component list, but shallow — doesn’t mention batch sizes, backoff parameters, the ownership-routing mechanism, or the exact name of the internal activation event. Also misattributes the logging library used. Acceptable as a quick orientation, well below engineer-grade documentation.<br><br>16. gemma-4-mlx (12b)<br><br>The shortest and shallowest file in the set — essentially a paragraph-level summary with a generic component list and no discussion of batch sizes, reconciliation logic, configuration schema, or metrics. Also gets a basic HTTP endpoint path wrong. Too thin to be useful as engineering documentation.<br><br>17. InternScience-Agents-A1-4B (Q4_K_M-GGUF, via ollama, ~6 min)<br><br>The weakest entry, with multiple clear factual errors: repeatedly misnames a core status value, states the wrong language runtime version, and includes a self-contradictory note that denies the service is event-driven immediately after describing it reacting to queued events. Also invents specific but unverifiable infrastructure details. Combined with generic, low-depth coverage elsewhere, this ranks last.<br></pre><h3>Conclusion &amp; Takeaways</h3><p>Running 27B to 35B parameter models locally on a <strong>16GB Mac Mini M4</strong> used to feel like a pipe dream, but low-bit quantizations (like IQ3_XXS and IQ3_M) combined with Apple&#39;s unified memory architecture make it entirely viable.</p><p>If you are a developer looking to run local AI agents or audit codebases offline:</p><ul><li><strong>The 16GB M4</strong> punches well above its weight class, delivering usable tokens-per-second speeds for models that traditionally required dedicated multi-GPU setups.</li><li><strong>Quantized Qwen and Coder variants</strong> at the 27B–35B scale are sharp enough to parse complex business logic and architecture documents without catastrophic hallucinations.</li></ul><p>What models are you running locally on your Apple Silicon setup? Let me know in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76076738cb7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing API integrations]]></title>
            <link>https://andboson.medium.com/testing-api-integrations-7a152015ba33?source=rss-424566e3b528------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a152015ba33</guid>
            <category><![CDATA[mocking]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[mock-server]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <dc:creator><![CDATA[Andrii Bosonchenko]]></dc:creator>
            <pubDate>Fri, 07 Jan 2022 17:36:13 GMT</pubDate>
            <atom:updated>2022-01-07T17:36:13.264Z</atom:updated>
            <content:encoded><![CDATA[<p>…with <a href="https://github.com/andboson/http-echo-logger">github.com/andboson/http-echo-logger</a></p><p>Let’s consider how to run E2E tests API integration using only the local environment.</p><p>For instance, we have an order processing system and an external warehouse system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*kEkexJIbnT0r1QJc97xCdA.png" /><figcaption>System diagram</figcaption></figure><p>We have to check how does the integration between these two system work.<br>The Warehouse system is not fully deployed yet.</p><p>But we have API documentation and our work for the integration is completed and successfully tested.</p><p>Let’s check if our Order system correctly posts requests and can process responses from the Warehouse service.</p><p>docker-compose.yml with our service and docker-container with mock-server:</p><pre>version: &#39;3.8&#39;<br>services:<br>  request-logger:<br>    image: andboson/http-cli-echo-logger<br>    ports:<br>      - &quot;8888:80&quot;<br>    environment:<br>      CUSTOM_ENDPOINTS: |-<br>          /graphql::{&quot;data&quot;:{&quot;products&quot;:{&quot;edges&quot;:[{&quot;node&quot;:{&quot;product&quot;:{&quot;id&quot;:&quot;1077&quot;,&quot;ref&quot;:&quot;JAR-01&quot;,&quot;quantity&quot;:99}}}]}}}<br>          /oauth/token::{&quot;access_token&quot;:&quot;33f2b5a7-8341-46b5-92c8-9eeecf4f4ae3&quot;,&quot;token_type&quot;:&quot;bearer&quot;}<br>  order-service:<br>    build:<br>      dockerfile: Dockerfile<br>      context: .<br>    ports:<br>      - &quot;8080:80&quot;</pre><p>Here we have two endpoints with some mock response data</p><p>Now we can make curl-request to our service and see logged requests in the mock-server logs (or with HTTP interface)</p><p>In the same way, we can test publishing to AWS topics (with http-subscription), etc</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a152015ba33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to export Golang tests results to Jenkins]]></title>
            <link>https://andboson.medium.com/how-to-export-golang-tests-results-to-jenkins-3893c718ec97?source=rss-424566e3b528------2</link>
            <guid isPermaLink="false">https://medium.com/p/3893c718ec97</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[jenkins-pipeline]]></category>
            <dc:creator><![CDATA[Andrii Bosonchenko]]></dc:creator>
            <pubDate>Sat, 23 Jan 2021 18:03:10 GMT</pubDate>
            <atom:updated>2021-01-23T18:09:36.085Z</atom:updated>
            <content:encoded><![CDATA[<p>A short manual, so let&#39;s go to the point.</p><p>The task:<br>I want to see Golang test result in Jenkins build and see failed tests.</p><p>A piece of our Makefile:</p><pre>dep:<br>   go get -u github.com/go-bindata/go-bindata/...<br>   go get -u github.com/golang/mock/mockgen/...<br>   go get -u github.com/jstemmer/go-junit-report<br>   go mod tidy<br>   go mod vendor<br><br>generate:<br>   go generate -x ./...<br><br>test: generate dep<br>   go test -v -tags=&quot;unit integration&quot; -covermode=atomic -coverprofile=coverage.out ./cmd/... ./common/... 2&gt;&amp;1 | go-junit-report <em>-set-exit-code </em>&gt; report.xml<br>   go tool cover -func coverage.out</pre><p>So you have to install a lib `<em>github.com/jstemmer/go-junit-report</em>` wich can convert output from Golang tests to `junit` format report.</p><p>Here is a part from Jenkins pipeline file:</p><pre>post{<br>    always{<br>        junit &#39;report.xml&#39;<br>    }<br>}</pre><p>If you have a remote test server, you need to get an artifact from the remote:</p><pre>stage (&#39;Get artifacts&#39;){<br>    steps{<br>         script {<br>            sh &quot;rsync --exclude=.env -avz --delete YOUR_REMOTE_PATH/report.xml ${WORKSPACE}/report.xml&quot;<br><br>            archiveArtifacts artifacts: &#39;report.xml&#39;, fingerprint: true<br>        }<br>    }<br>}</pre><p>And you will see something like that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_oaD2YMCY_buqV72TBXbcg.png" /></figure><p>And at the bottom, you can find a link to the full tests result.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3893c718ec97" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>