<?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 fatih kağan on Medium]]></title>
        <description><![CDATA[Stories by fatih kağan on Medium]]></description>
        <link>https://medium.com/@fatihkaganemre?source=rss-94c61b51089b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0oyHPhwsXeyox37l.</url>
            <title>Stories by fatih kağan on Medium</title>
            <link>https://medium.com/@fatihkaganemre?source=rss-94c61b51089b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:45:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fatihkaganemre/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[Gitlab Code Coverage for Swift Packages.]]></title>
            <link>https://medium.com/@fatihkaganemre/gitlab-code-coverage-for-swift-packages-6838b19e368e?source=rss-94c61b51089b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6838b19e368e</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[gitlab-ci]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[fastlane-ios]]></category>
            <category><![CDATA[code-coverage]]></category>
            <dc:creator><![CDATA[fatih kağan]]></dc:creator>
            <pubDate>Fri, 18 Apr 2025 18:45:14 GMT</pubDate>
            <atom:updated>2025-04-18T18:45:14.816Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I worked on setting up <strong>code coverage reporting</strong> in <strong>GitLab</strong> for a project built as a <strong>Swift Package Manager (SPM) framework</strong>. The setup includes <strong>multiple sub-packages</strong>, and there’s also a smart testing mechanism that only runs tests for recently changed parts of the code — which made things a bit more interesting.</p><h4><a href="https://docs.gitlab.com/ci/testing/code_coverage/"><strong>Gitlab Documentation</strong></a></h4><p>As expected the first step i took was to check the Gitlab documentation. <br>GitLab mainly offers two ways to display test coverage:</p><ol><li><strong>Using regex patterns</strong> to extract coverage numbers directly from the job logs.</li></ol><pre>test-unit:<br> script:<br> - coverage run unit/<br> coverage: &#39;/TOTAL.+ ([0–9]{1,3}%)/&#39;</pre><p>2. <strong>Uploading structured coverage reports</strong> (like lcov, Cobertura, or JUnit) as CI artifacts, which GitLab can parse and visualize.</p><pre>test:<br>  script:<br>    - run tests with coverage<br>  artifacts:<br>    reports:<br>      coverage_report:<br>        coverage_format: cobertura  # or jacoco<br>        path: coverage/coverage.xml</pre><h3>📊 Using xcov for Better Coverage Logs</h3><p>If you’re using <strong>Fastlane</strong> with <strong>GitLab CI</strong>, it’s definitely worth considering <a href="https://github.com/fastlane-community/xcov">xcov</a> to generate clean and structured code coverage reports. It&#39;s especially helpful when you&#39;re planning to extract coverage data using regex or want better visibility into which files are covered.</p><h4>✅ Why Use Xcov?</h4><ul><li>It creates a clear, formatted log that makes it easy to parse coverage with regex.</li><li>It supports multiple output formats including <strong>JSON</strong>, <strong>HTML</strong>, and <strong>Markdown</strong>.</li><li>By default, xcov looks for the .xcresult file in your project&#39;s <strong>DerivedData</strong> directory, so you don’t need to manually specify it unless you want to.</li></ul><p>Here’s an example of the kind of summary xcov prints in your CI logs:</p><pre>+------------------------+----------+<br>| File                  | Coverage |<br>+------------------------+----------+<br>| ViewController.swift   | 93.33%   |<br>| UserManager.swift      | 76.47%   |<br>+------------------------+----------+<br>| Overall Coverage       | 82.10%   |<br>+------------------------+----------+</pre><h4>🛠️ Sample usage with Fastlane:</h4><pre>xcov(<br>  is_swift_package: true,<br>  output_directory: &quot;xcov_output&quot;<br>)</pre><p>You can also customize the output format by adding options like:</p><pre>output_types: &quot;json,html,markdown&quot;</pre><p>For more options and parameters, check the <a href="https://github.com/fastlane-community/xcov#parameters">official xcov documentation</a>.</p><h4><a href="https://github.com/SlatherOrg/slather"><strong>Slather</strong></a><strong> for Cobertura</strong></h4><p>As mentioned earlier, one way to visualize test coverage in GitLab is by uploading a <strong>Cobertura-formatted</strong> report. GitLab natively supports this format and can display coverage directly in the merge request UI or the pipeline summary.</p><p>However, there’s a catch: <strong>neither Xcode nor xcov generates Cobertura files by default</strong>. Luckily there are many tools for that and probably one of the most famous one of those tools is slather and it is fastlane compatible. The downside: <strong>Slather doesn’t support Swift Package Manager (SPM)</strong> at the time of writing.</p><p>The biggest challenge I faced was dealing with <strong>multiple </strong><strong>.xcresult files</strong>, due to a smart testing setup that only runs tests on changed modules. This made tools like xcov or simple regex extraction insufficient.</p><p>So, I wrote a custom solution — and thanks to AI tools, it was surprisingly manageable. As a bonus I also used danger. I already was using danger for the app. And coverage results were looking really cool <a href="https://github.com/fastlane-community/danger-xcov">with danger</a>.</p><h4>💡 My Solution</h4><ol><li><strong>Archived all </strong><strong>.xcresult files</strong> into a single folder during testing.</li><li><strong>Merged them</strong> using xcresulttool if there were multiple.</li><li><strong>Used Danger</strong> (which I already had set up) with danger-xcov to show the results directly in the merge request.</li></ol><p>Here’s a simplified version of the Fastlane setup:</p><pre>lane :test do <br>  smart_testing<br>  merge_xcresults<br>  danger_check<br>end</pre><p>It is not a rocket science but it took some time for me to write this code, so i decided to write this article. I hope it will be helpfull for someone out there :D.</p><p>In smart_testing, I updated the code to collect each test run’s .xcresult file:</p><pre>def smart_test(modules_to_test) do <br>  modules_to_test.each do |element|<br>    .... some crazy code which still i dont know what it does :D <br>    archive_xcresult_file<br>end<br><br>def self.archive_latest_xcresult<br>  xcresults = Dir[&quot;.build/Logs/Test/*.xcresult&quot;]<br>  latest_result = xcresults.max_by { |f| File.mtime(f) }<br>      <br>  if latest_result<br>    archive_dir = File.join(build_path, &quot;archived_results&quot;)<br>    FileUtils.mkdir_p(archive_dir)<br>      <br>    timestamped = File.join(<br>      archive_dir,<br>      &quot;#{File.basename(latest_result, &#39;.xcresult&#39;)}_#{Time.now.to_i}.xcresult&quot;<br>    )<br>    FileUtils.cp_r(latest_result, timestamped)<br>   end<br>end</pre><p>What archive function does is simply checks the build directory for any xcresult file (I ve mentioned that xcov searches derived data by default but the tool what i use for smart testing was saving xcresult files to .build directory.) trying to find the latest one with its timestamp and save it to <strong>archived_results</strong> directory.</p><p>Now lets go to the fastlane see how it is used in test lane.</p><pre>def merge_xcresults<br>  xcresult_files = Dir.glob(&quot;../.build/archived_results/*.xcresult&quot;)<br>  <br>  if xcresult_files.count &lt; 2<br>    if xcresult_files.count == 1<br>      # Move the single .xcresult file to .build/Logs/Test<br>      destination_dir = &quot;../.build/Logs/Test&quot;<br>      FileUtils.mkdir_p(destination_dir)<br>      destination = File.join(destination_dir, File.basename(xcresult_files.first))<br>      FileUtils.mv(xcresult_files.first, destination)<br>    end<br>    return<br>  end<br>  <br>  output_file = &quot;../.build/Logs/Test/merged.xcresult&quot;<br>  sh(&quot;xcrun xcresulttool merge #{xcresult_files.join(&#39; &#39;)} --output-path #{output_file}&quot;)<br>end</pre><p>I check the ../.build path because the Fastfile is located in the fastlane directory, which sits alongside .build and the Xcode project. If there&#39;s only <strong>one </strong><strong>.xcresult file</strong>, I move it to .build/Logs/Test for Danger to use. If there are <strong>multiple files</strong>, I merge them using xcresulttool into a single merged.xcresult.</p><p>Now lets go to the Dangerfile. Make sure to add danger-xcov to your Gemfile and run bundle install. Hopefully it make sense. If not please write it in comments so i can describe it more detailed. And here is the <strong>Dangerfile</strong>:</p><pre><br>merged_xcresult_path = File.expand_path(&quot;.build/Logs/Test/merged.xcresult&quot;)<br><br>if File.exist?(merged_xcresult_path)<br>  xcov.report(<br>    xccov_file_direct_path: merged_xcresult_path,<br>    is_swift_package: true    <br>  )<br>else<br>  xcresult_files = Dir.glob(&quot;.build/Logs/Test/*.xcresult&quot;)<br>  if xcresult_files.any? <br>    xcov.report(<br>      xccov_file_direct_path: xcresult_files.first,<br>      is_swift_package: true    <br>    )<br>  end<br>end</pre><p>First, I check if the merged result file exists. If it doesn’t, I fall back to the first available .xcresult file. Then, I pass the file path to xcov.report — and it takes care of the rest.</p><p>It’s not rocket science, but it took a bit of work — and that’s why I decided to write this article.</p><p>Hope it helps someone! And if you know a better way, I’d love to hear it 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6838b19e368e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Insightful Approach to Kumite Training]]></title>
            <link>https://medium.com/@fatihkaganemre/an-insightful-approach-to-kumite-training-e0f2209558a0?source=rss-94c61b51089b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0f2209558a0</guid>
            <category><![CDATA[kumite]]></category>
            <category><![CDATA[karate]]></category>
            <category><![CDATA[training]]></category>
            <category><![CDATA[fight]]></category>
            <category><![CDATA[martial-arts]]></category>
            <dc:creator><![CDATA[fatih kağan]]></dc:creator>
            <pubDate>Thu, 23 May 2024 10:26:43 GMT</pubDate>
            <atom:updated>2024-05-23T10:26:43.585Z</atom:updated>
            <content:encoded><![CDATA[<p>Kumite is becoming more and more athletic and tactical. Speed, endurance, power and acceleration are fundamentals however most of the coaches might agree that it is not enough anymore. Some might say the timing is the most important or tactics. On the other hand, without confidence none of them matter. It is very hard to consider all those and many more. Such as mental problems, injuries, family problems et cetera. Being a coach is very challenging and also a great pleasure especially when the results come.</p><p>This article is not a declaration of extensive knowledge but rather an acknowledgment of continuous learning. I believe one of the best ways to learn is through sharing knowledge, embracing both positive and negative feedback, and learning from it. Hence, your feedback is invaluable to me.</p><p>As an engineer, I have discovered that my background provides certain advantages in coaching. I approach training systematically, take meticulous notes, and track improvements and results rigorously. In this article, I will share key insights from my notes.</p><p>A single training itself is very important. It might fix a small problem of an individual athlete or resolve a bigger problem of a group. But I prefer to make weekly training plans and define long term goals. Each club and every athlete has different problems to fix. I hope some of these bullet points will give you ideas to improve your training methodologies:</p><ul><li><strong>Each training should sum-up to an improvement</strong></li></ul><p>I try to make training more structural and to the point. You can not fix or improve everything at once. You should decide what to improve during the week or month. It is also not good to do a lot of different exercises in one training session.</p><ul><li><strong>Warm up should be related to the rest of the training</strong></li></ul><p>The warm up can include games, foot work, plyometrics, kick or hand drills, reflex or conditioning exercises etc. it is very important to choose a good warm-up for preparing athletes to the next part of the training. After a footwork warm up, stationary exercises for the main part of the training does not make sense.</p><ul><li><strong>Conditioning exercises are better at the beginning or at the end of the training session during the hot part of the season</strong></li></ul><p>Conditioning exercises are like poison for the coaches. If the athletes are very tired and make repetitive movements with full energy. It seems like very good training. But is it?</p><p>You can easily make athletes tired with 100 gyaku zuki. After 20 punches their technique will get worse and worse. It has pros and cons. Moreover they will use most of their energy for this single exercise. They might also lose their motivation for the rest of the training. The conditioning exercises are important but keeping them short and giving some goals to the athletes is much more efficient especially during the hot season. The goal can be related to time or amount.</p><ul><li><strong>It is not good to change the exercises very often just to make athletes comfortable and not bored.</strong></li></ul><p>This point is very interesting. At the very beginning of my coaching career I was trying to change exercises often. But the purpose of those exercises were pretty much the same. It might be more fun for the athletes however it is much harder to track the improvement for the coach. I believe changes are good when needed.</p><ul><li><strong>Each training should give freedom to athletes at the end to practise what they learnt</strong></li></ul><p>As coaches we prefer to control the rhythm of the training. When we see a group of athletes which can not keep up with our training plan. The very first approach is to change it completely or somehow evolve it. Is that really good? Maybe we should give them more time to repeat the exercises or maybe split it into smaller and easier exercises.</p><ul><li><strong>Sparring and parts from fight are very useful but at least some part of it should be easy</strong></li></ul><p>The competitor group might get frustrated during the sparring session, it is also a source of injuries. Therefore making the sparring more light and more fun is the key. Winning should not be the point most of the time. Giving athletes some goals, letting them to track their improvement and combining a sparring session with some games might bring great results.</p><ul><li><strong>Simple hand or leg techniques before a tactical exercise will fire up the athletes</strong></li></ul><p>Before starting a tactical training it is better to fire up the athletes with simple hand or/and leg exercises. Those exercises should be simple for the mind. But you should not tire them too much as mentioned before. It is supposed to be a physical warm up for tactical training.</p><ul><li><strong>It is always better to keep tactical training as simple as possible.</strong></li></ul><p>Tactical training is hard to prepare for coaches but even harder for the athletes to apply. Athletes like simple exercises such as, someone throws kizami zuki and the goal is anticipation or contra attack. When you complicate the situation with some movements, provocation , breaking the opponents goal, it becomes very hard for the athlete to think and implement all of those at once. So I recommend splitting each of them into different exercises. If it is still hard for them, maybe the key as always is patience.</p><p>I heard someone say “<em>Karate is like water to me. I don’t know if I really love it but I can’t live without it</em>”. I would barely agree with this. I love Karate and I think we should not forget this while training hard. I am very thankful in advance for any kind of feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0f2209558a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>