mexique1 Posted August 28, 2012 Share Posted August 28, 2012 Hi, As promised, here is the project I started to try to cover PrestaShop's code with unit tests https://github.com/alexsegura/PsUnit It is still really experimental and has only one test case, but I'm sure lots of developers can contribute other test cases. It comes with tools & utilities to simulate a siutation, like for example faking the Configuration class. The goal is also to point out where to refactor code to make it more testable, more open, more modular. Feel free to use GitHub issue tracker to discuss about how and what to test. 1 Link to comment Share on other sites More sharing options...
snajuro Posted August 30, 2012 Share Posted August 30, 2012 Hi Thanks, really appreciate your work. Link to comment Share on other sites More sharing options...
snajuro Posted September 3, 2012 Share Posted September 3, 2012 (edited) Hi, I was looking through the trunk on http://svn.prestashop.com and I found the tests folder. It has some unit and functional tests. Is this the official prestashop testsuite? Edited September 3, 2012 by snajuro (see edit history) Link to comment Share on other sites More sharing options...
mexique1 Posted September 3, 2012 Author Share Posted September 3, 2012 Wow ! Let's take a look.. Link to comment Share on other sites More sharing options...
snajuro Posted September 3, 2012 Share Posted September 3, 2012 Hi, I have been working though the tests. I think they are meant for an earlier version of prestashop but they are not far off. They too will serve as a good starting point. Link to comment Share on other sites More sharing options...
mexique1 Posted September 3, 2012 Author Share Posted September 3, 2012 No no, look there is a DispatcherTest, this class wasn't in 1.4 Now I'm getting HTTP 403 Forbidden when trying to access the /tests folder, while it was working at the office Link to comment Share on other sites More sharing options...
phrasespot Posted September 7, 2012 Share Posted September 7, 2012 Now I'm getting HTTP 403 Forbidden when trying to access the /tests folder You mean you did not checkout a local copy Link to comment Share on other sites More sharing options...
mexique1 Posted September 7, 2012 Author Share Posted September 7, 2012 (edited) I mean at the office I can browse the SVN root folder in any web browser, but not at home.. Strange ! Edited September 7, 2012 by mexique1 (see edit history) Link to comment Share on other sites More sharing options...
phrasespot Posted September 7, 2012 Share Posted September 7, 2012 I mean at the office I can browse the SVN root folder in any web browser, but not at home.. Strange ! I think you will find that now you won't be from the office either. Post again if you can. Link to comment Share on other sites More sharing options...
NemoPS Posted January 21, 2013 Share Posted January 21, 2013 Just experimenting with unit testing, gotta try this out! Thanks pal! Link to comment Share on other sites More sharing options...
mexique1 Posted January 21, 2013 Author Share Posted January 21, 2013 This is outdated now that the project in on GitHub Check my Pull Request : https://github.com/PrestaShop/PrestaShop/pull/70 Link to comment Share on other sites More sharing options...
Recommended Posts