Hello,<br><br>We are students from Toulouse, France and we are working on Amarok as<br>
a university project. One of our tasks has been to create new context applets<br>using the <a href="http://last.fm">last.fm</a> services. The applets we created are Upcoming Events and<br>Similar artists.<br><br>We have met an issue while trying to create unit tests for the Data Engines of<br>
our applets.I will try to explain it clearly, I hope you can understand =)<br><br>Actually, the current Amarok unit tests system is not based on the KDE standard<br>unit tests system. Indeed, instead of building a specific executable for the tests, those<br>
ones are integrated in the main amarok command by passing the --test option. This way,<br>we avoid the need of initializing all the Amarok &quot;context&quot; in order to test the methods:<br>Amarok is launched and then the tests are performed.<br>
<br>Anyway, while working on Data Engines, we are stuck because we simply can&#39;t link to <br>our engines in our test files. It is the consequence of the fact that the Data Engines are not<br>linkable from our test directory. The tests are part of amaroklib_LIB_SRCS and the engines<br>
link to amaroklib_LIB_SRCS but are not part of it. The result is we can&#39;t instanciate any of<br>our data engines in the test folder. Adding the DataEngines classes into amaroklib_LIB_SRCS<br>will result in linking error due to recursive inclusion  (if I understand correctly).<br>
<br><br>We have thought about two solutions:<br><ul><li>Perform &quot;black box tests&quot; instead of &quot;white box&quot; ==&gt; use the DataEngine methods<br>instead of MyAppletDataEngine methods. But the problem is the way to request a<br>
DataEngine from the KDE plugin service seems complex regarding to the Applet::dataEngine(QString)<br>method. If you someone knows a more simple way to request the DataEngine, please let us know.</li><li>Set up standard unit tests in the Qt/KDE way for our engines. It could be a first step<br>
for a massive migration. The difficulty resides in initializing enough context to have our<br>methods work into the tests.</li></ul>If we can collect ideas and/or opinions about this problem, it would be a great help =)<br>
Thanks for your support.<br><br>Best regards,<br>The IUP ISI Amarok team<br>