<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unit tesing with Unity and CMake in nrf connect SDK on windows</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114687/unit-tesing-with-unity-and-cmake-in-nrf-connect-sdk-on-windows</link><description>Hello Team, 
 We use nrf connect sdk on windows for development. 
 We are trying to setup the unit tetsing environment for our project and came across https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/test_and_optimize/test_framework/testing_unity_cmock</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Sep 2024 07:52:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114687/unit-tesing-with-unity-and-cmake-in-nrf-connect-sdk-on-windows" /><item><title>RE: Unit tesing with Unity and CMake in nrf connect SDK on windows</title><link>https://devzone.nordicsemi.com/thread/504100?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 07:52:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18394c7b-b051-42d3-9944-b3e5b0cb24bd</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Apologies for the delayed response. I was away attending workshops. As far as I know, the VS Code extension doesn&amp;#39;t integrate with Twister for unit testing, and we currently have no plans to support Twister.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unit tesing with Unity and CMake in nrf connect SDK on windows</title><link>https://devzone.nordicsemi.com/thread/503148?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 14:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aa223b4-18ec-4ecd-b8b9-b5cbe089d619</guid><dc:creator>Adarsh</dc:creator><description>&lt;p&gt;Hi Abhijith,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply..&lt;/p&gt;
&lt;p&gt;I have tried to run the twister with WSL Still it skips the tests. Just like in windows&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1726755165284v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;is the unity test examples from nordic(/ncs/nrf/tests/unity/example_test/) tested with Twister on nordic side ?&lt;/p&gt;
&lt;p&gt;Or are you guys using west to run the tests :)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding&lt;/p&gt;
&lt;p&gt;Adarsh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unit tesing with Unity and CMake in nrf connect SDK on windows</title><link>https://devzone.nordicsemi.com/thread/502567?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2024 08:45:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:942cca5a-4c95-4e07-b8dc-6f226cde5686</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]from my understanding its not possible to run the twister/build for native_posix in windows. Is it correct ?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, you&amp;#39;re right. The native_posix board in Zephyr is meant to run on POSIX-compliant systems like Linux or macOS. On Windows, you can use the Windows Subsystem for Linux (WSL), but it won&amp;#39;t run directly on Windows.&lt;/p&gt;
[quote user=""]After running the Twister (in my case &amp;quot;python C:\ncs\v2.7.0\zephyr\scripts\twister -T . -p qemu_cortex_m3&amp;quot;),seems like twister skips the test cases. Please see the attached screenshot.[/quote]
&lt;p&gt;From the screenshot, it seems that Twister is skipping the test cases instead of running them. I&amp;#39;m not entirely sure why this is happening maybe it&amp;#39;s due to the test case configuration. I suggest double-checking the &lt;code&gt;testcase.yaml&lt;/code&gt; file to see if there are any constraints causing the skips..&lt;/p&gt;
[quote user=""]We also have second source project with another chip manufacturer.There also we use Zephyr. Is it possible to use the same framework(Unit testing with Unity and CMake in nrf connect SDK)&amp;nbsp; for other zephyr projects ?From my understanding&amp;nbsp; the CONFIG_UNITY in prj.conf is only available in the nrf connect sdk environment,not in Zephyr[/quote]
&lt;p&gt;It&amp;#39;s true that the &lt;code&gt;CONFIG_UNITY&lt;/code&gt; and the Unity-based unit testing framework in the nRF Connect SDK is designed specifically for the nRF ecosystem and isn&amp;#39;t available directly in upstream Zephyr. However, I think you can still use the same general framework (Unity, CMock, CMake) for unit testing in other Zephyr-based projects, though you might need to set it up manually.&lt;br /&gt;&lt;br /&gt;If you&amp;#39;d rather use a native Zephyr solution, consider switching to ZTest, which is built into Zephyr and designed for testing on different platforms. You can &lt;a href="https://docs.zephyrproject.org/latest/develop/test/ztest.html"&gt;check out this page&lt;/a&gt; from Zephyr for more details.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>