Re: [Elementary-dev-community] Test Driven Development
I have just checked this Youtube video but it does not really make any clue for a new comer and I feel that they (new comers) will loose their interest in TDD as no any real life examples in that Video, but some (unnecessary) test methods which does not make any sense how could it be adopted it in a real life coding. So, I am thinking of doing some real life example like writing a Dexter's like contact app starting from scratch using patterns, TDD and OOP principles and writing some series in my blog. It would be a hard and time consume process, so if there is no any interests I would not start it at all. Anyway, if somebody want to get what I am speaking about, then he/she should read this chapter of the Microsoft's Patterns and Practice book: http://msdn.microsoft.com/en-us/library/jj159340.aspx. And keep in mind I am not coming from the Windows world but UNIX, but have experiences in a lot of programming languages starting from ATT assembly to a huge palette of the others. The whole book is downloadable for free so, it's up to you guys. And keep in mind that I don not want push anything, but as my father told me: How can you make any decision if you do not have almost all the relevant information/knowledge? That would not be really clever. On 9 May 2013 04:35, Craig webe...@gmail.com wrote: Hello again, Between attempting to fix a broken car and shopping for a new one, I haven't had much time to devote to this; however, I did come across this video as a quick primer. Take a look at it if you'd like to see a quick-and-easy example of TDD. http://www.youtube.com/watch?v=O-ZT_dtlrR0 Enjoy, Craig On Sun, May 5, 2013 at 1:00 AM, Pál Dorogi pal.dor...@gmail.com wrote: I have uploaded my stuffs to launchpad, so you can have a look at it at https://launchpad.net/dafproject The dafcore, dafui and dafvalidation projects have unit tests under test directory. On 29 April 2013 16:26, Jaap Broekhuizen jaap...@gmail.com wrote: Pal, that looks very interesting, please do upload it to launchpad so we can have a closer look :) In te mean time, I have created a google document to have a central point of investigation for elementary automated testing. Feel free to add information to the doc whenever you can, but please keep it clean! :) You can find it here: https://docs.google.com/document/d/1cTsWpeT0h4FD81T-xs4bEWlALsO__j3rL1A7iB-SWz0/edit I haven't found any BDD frameworks yet, but I have found some interesting testing frameworks. I think I'll set up a testing branch for granite some day later this week, maybe test out the different frameworks so we can see what suits us best. If anyone else wants to start setting up a branch like that, you are of course free to do so ;) -- Jaap On Mon, Apr 29, 2013 at 3:08 AM, Pál Dorogi pal.dor...@gmail.com wrote: Hi, You can use cmake for unit test as it supports GLib's test. I use MonoDevelop/Xamarin Studio for developing for huge projects coexists /w cmake (as MD/XS does not support cmake). MD is for rapid development but there is no internal Unit to support vala but C# (Nunit) and some other languages. So, I run some cmake command before and after MD build which runs cmake for cmake build and run test. For example: before build: cmake .. in /build/ dir after build in MD: run build/test/unit_test I added CMakeLists.txt into my MD project and I just need to sync betwwen MD and that file when I add or remove a Vala source file into/from the MD. I do not know how would it works /w launchpad as I do not know how its packaging works /w cmake's unit test, but I think it should work. You just need add some stanza in the project's root CMakeList.txt like this, but it's not simpe as it's using some other features like external projects and so on. set (PROJECT_TEST tests) ... enable_testing (true) add_subdirectory (${PROJECT_TEST}) and add create some CMakeList.txt in the ./test dir ### # Sources ### set (UNIT_TESTS unit_tests) set (VALA_SOURCES Model/Address.vala Model/Person.vala Model/Gender.vala ValidatorTest.vala TestMain.vala ) set (PKG_DEPS gtk+-3.0 glib-2.0 gee-1.0) # set (CMAKE_VERBOSE_MAKEFILE ON) set (CMAKE_FIND_LIBRARY_SUFFIXES .so) # External Packages definitions. set (EXTERN_PROJ dafunit) set (EXTERN_SOURCE_DIR src) set (INTERN_PROJ dafvalidation) set (INTERN_SOURCE_DIR ${PROJECT_SOURCE}) include (ExternalProject) ExternalProject_Add (${EXTERN_PROJ} #PREFIX ../../${EXTERN_PROJ} SOURCE_DIR ../../../${EXTERN_PROJ} BINARY_DIR ${CMAKE_BINARY_DIR}/${EXTERN_PROJ}/build INSTALL_DIR UPDATE_COMMAND
Re: [Elementary-dev-community] Beta2 review from Dedoimedo
FYI this is a review of beta1, not beta2. Judging by the screenshots, he didn't care to update the system either, and most complains are about quite obvious beta bugs. I also disagree with dedoimedo's review methodology, but that's a different story. 2013/5/18 ttosttos Sa ttost...@gmail.com Folks, Do a quick search for elementary OS on Google and second link should be dedoimedo's review for Luna Beta2. I'd highly recommend a read. You can't control what other's write and some of their points may be wrong/unfair (some completely miss the point in my opinion). In any case, it's good to stop and see where they have a valid point. Criticism helps you improve. It may be good to reach out to them to educate or communicate how some of the issues will be addressed. That review isn't really good press and is prominently displayed by Google. Cheers ttosttos -- -- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp -- Sergey Shnatsel Davidoff OS architect @ elementary -- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp
Re: [Elementary-dev-community] Test Driven Development
To everyone interested in implementing automated testing and QA procedures I highly recommend reading logs Martin Pitt's Ubuntu Dev Week sessions on the topic. They can be found at http://irclogs.ubuntu.com/2013/01/31/%23ubuntu-classroom.html, his IRC nick is pitti. I've added some things he mentioned to our document ( https://docs.google.com/document/d/1cTsWpeT0h4FD81T-xs4bEWlALsO__j3rL1A7iB-SWz0/edit), especially on behavioral testing, but I still highly recommend reading the original session. 2013/4/29 Jaap Broekhuizen jaap...@gmail.com Pal, that looks very interesting, please do upload it to launchpad so we can have a closer look :) In te mean time, I have created a google document to have a central point of investigation for elementary automated testing. Feel free to add information to the doc whenever you can, but please keep it clean! :) You can find it here: https://docs.google.com/document/d/1cTsWpeT0h4FD81T-xs4bEWlALsO__j3rL1A7iB-SWz0/edit I haven't found any BDD frameworks yet, but I have found some interesting testing frameworks. I think I'll set up a testing branch for granite some day later this week, maybe test out the different frameworks so we can see what suits us best. If anyone else wants to start setting up a branch like that, you are of course free to do so ;) -- Jaap On Mon, Apr 29, 2013 at 3:08 AM, Pál Dorogi pal.dor...@gmail.com wrote: Hi, You can use cmake for unit test as it supports GLib's test. I use MonoDevelop/Xamarin Studio for developing for huge projects coexists /w cmake (as MD/XS does not support cmake). MD is for rapid development but there is no internal Unit to support vala but C# (Nunit) and some other languages. So, I run some cmake command before and after MD build which runs cmake for cmake build and run test. For example: before build: cmake .. in /build/ dir after build in MD: run build/test/unit_test I added CMakeLists.txt into my MD project and I just need to sync betwwen MD and that file when I add or remove a Vala source file into/from the MD. I do not know how would it works /w launchpad as I do not know how its packaging works /w cmake's unit test, but I think it should work. You just need add some stanza in the project's root CMakeList.txt like this, but it's not simpe as it's using some other features like external projects and so on. set (PROJECT_TEST tests) ... enable_testing (true) add_subdirectory (${PROJECT_TEST}) and add create some CMakeList.txt in the ./test dir ### # Sources ### set (UNIT_TESTS unit_tests) set (VALA_SOURCES Model/Address.vala Model/Person.vala Model/Gender.vala ValidatorTest.vala TestMain.vala ) set (PKG_DEPS gtk+-3.0 glib-2.0 gee-1.0) # set (CMAKE_VERBOSE_MAKEFILE ON) set (CMAKE_FIND_LIBRARY_SUFFIXES .so) # External Packages definitions. set (EXTERN_PROJ dafunit) set (EXTERN_SOURCE_DIR src) set (INTERN_PROJ dafvalidation) set (INTERN_SOURCE_DIR ${PROJECT_SOURCE}) include (ExternalProject) ExternalProject_Add (${EXTERN_PROJ} #PREFIX ../../${EXTERN_PROJ} SOURCE_DIR ../../../${EXTERN_PROJ} BINARY_DIR ${CMAKE_BINARY_DIR}/${EXTERN_PROJ}/build INSTALL_DIR UPDATE_COMMAND PATCH_COMMAND INSTALL_COMMAND ) ExternalProject_Get_Property(${EXTERN_PROJ} BINARY_DIR) include_directories (${BINARY_DIR}/${EXTERN_SOURCE_DIR}) include_directories (${CMAKE_BINARY_DIR}/${INTERN_SOURCE_DIR}) # PkgConfig find_package (PkgConfig) find_package (GObjectIntrospection 0.9.12) include (GObjectIntrospectionMacros) pkg_check_modules(DEPS REQUIRED ${PKG_DEPS}) set (CFLAGS ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}) add_definitions (${CFLAGS}) set (LIBS ${DEPS_LIBRARIES}) set(LIB_PATHS ${DEPS_LIBRARY_DIRS}) link_directories(${LIB_PATHS}) # Does not work set (ENV{PKG_CONFIG_PATH} ${EXTERNAL_BINARY_DIR}/src) vala_precompile (VALA_C ${VALA_SOURCES} PACKAGES ${PKG_DEPS} posix CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/${INTERN_SOURCE_DIR}/${INTERN_PROJ}.vapi ${BINARY_DIR}/${EXTERN_SOURCE_DIR}/${EXTERN_PROJ}.vapi OPTIONS ) add_executable (${UNIT_TESTS} ${VALA_C}) # Does not work add_dependencies (unit_tests dafvalidation) target_link_libraries(${UNIT_TESTS} ${LIBS}) target_link_libraries(${UNIT_TESTS} ${BINARY_DIR}/${EXTERN_SOURCE_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}${EXTERN_PROJ}${CMAKE_FIND_LIBRARY_SUFFIXES}) target_link_libraries(${UNIT_TESTS} ${CMAKE_BINARY_DIR}/${INTERN_SOURCE_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}${INTERN_PROJ}${CMAKE_FIND_LIBRARY_SUFFIXES}) add_test(${UNIT_TESTS} ${CMAKE_CURRENT_BINARY_DIR}/${UNIT_TESTS}) ### I am going to upload it to lp so, if you would like to have a look at it just let me know and
Re: [Elementary-dev-community] Beta2 review from Dedoimedo
Also, afaik we have already discussed this article a few weeks ago? -- Jaap On Sun, May 19, 2013 at 1:49 PM, Sergey Shnatsel Davidoff ser...@elementaryos.org wrote: FYI this is a review of beta1, not beta2. Judging by the screenshots, he didn't care to update the system either, and most complains are about quite obvious beta bugs. I also disagree with dedoimedo's review methodology, but that's a different story. 2013/5/18 ttosttos Sa ttost...@gmail.com Folks, Do a quick search for elementary OS on Google and second link should be dedoimedo's review for Luna Beta2. I'd highly recommend a read. You can't control what other's write and some of their points may be wrong/unfair (some completely miss the point in my opinion). In any case, it's good to stop and see where they have a valid point. Criticism helps you improve. It may be good to reach out to them to educate or communicate how some of the issues will be addressed. That review isn't really good press and is prominently displayed by Google. Cheers ttosttos -- -- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp -- Sergey Shnatsel Davidoff OS architect @ elementary -- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp -- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp
Re: [Elementary-dev-community] Test Driven Development
Yep, you are right, we need both. but we currently do not have any GUI Testing framework /w Vala. Also, I meant by we do not need any GUI test which is very hard to achieve that we do not need to have any GUI Test to start applying TDD and if there is any bug in the toolkit which would affect the app then we cannot do much about that. On 19 May 2013 22:34, Jaap Broekhuizen jaap...@gmail.com wrote: So, using OOP (and the other things I talked about) we can separate the GUI code from the Business Logic (loose coupling and others), therefore we do not need any GUI Test which is very hard to achieve. Also, I would say the Toolkits are quite stable and have some strict APIs, but if there is a bug in any Toolkit, we cannot do much but wait for their fix. I don't agree. GUI/Behavioral testing is not meant to unittest the GUI framework, it is to test whether the GUI is behaving after the specification. You are basically testing the User Experience automatically (not completely true, but close enough). We will need Unit Testing and Behavioral Testing both. Met vriendelijke groet, Jaap Broekhuizen Aquamarijnstraat 273 9743 PG Groningen jaap.broekhuizen.nu jaap...@gmail.com 06 - 39 81 36 97 On Sun, May 19, 2013 at 3:26 PM, Pál Dorogi pal.dor...@gmail.com wrote: I have read it, but, it's not really what I talked about. The facts, that we need nice GUI Apps in eOS which should be written in Vala. Vala is a real OOP language therefore we could use it writing apps using OOP principles and can forget all the old fashioned programming in C things which is still very common (I grew up /w C, loved and still love it, but not for GUI apps) in Linux GUI programming. So, using OOP (and the other things I talked about) we can separate the GUI code from the Business Logic (loose coupling and others), therefore we do not need any GUI Test which is very hard to achieve. Also, I would say the Toolkits are quite stable and have some strict APIs, but if there is a bug in any Toolkit, we cannot do much but wait for their fix. So, we can focus on the stability of the App as we do not need to really care about the GUI as it can live without our layers. Also, the bugs, for example, if we do not use OOP principles and if there is a bug in an app, it could affect all the code base if it's not well structured (lot of hard cross dependencies to the other Objects, for example lot of using in the source codes where we should not use that/those module(s)/object(s) at all and some other smell-code things. And a bit later an other bug appears, and an other, and one more. So, how would we fix it? How could we work on it parallel if my work/fix would affect to the whole app? It would be a real mess in solving the issue as a lot of cross dependencies are across all the code base. In my experience it would be a nightmare. With TDD we can use tests for the trivial bug hunting and also we can create a test method(s) for the newly appeared bugs and we could fix them more easily than in the current development cycles, of course if we structured the app to handle these situations. But, keep in mind these things I talked about (TDD, Design Patterns, SOLID etc.) are not the Holy Grail for everything, but some helpers which can make our life much easier if we fully understand and are able to implement them, which could be as everything can be found in the Internet and we have a nice programming language: Vala which is capable for implement those things. On 19 May 2013 19:56, Sergey Shnatsel Davidoff ser...@elementaryos.org wrote: To everyone interested in implementing automated testing and QA procedures I highly recommend reading logs Martin Pitt's Ubuntu Dev Week sessions on the topic. They can be found at http://irclogs.ubuntu.com/2013/01/31/%23ubuntu-classroom.html, his IRC nick is pitti. I've added some things he mentioned to our document (https://docs.google.com/document/d/1cTsWpeT0h4FD81T-xs4bEWlALsO__j3rL1A7iB-SWz0/edit), especially on behavioral testing, but I still highly recommend reading the original session. 2013/4/29 Jaap Broekhuizen jaap...@gmail.com Pal, that looks very interesting, please do upload it to launchpad so we can have a closer look :) In te mean time, I have created a google document to have a central point of investigation for elementary automated testing. Feel free to add information to the doc whenever you can, but please keep it clean! :) You can find it here: https://docs.google.com/document/d/1cTsWpeT0h4FD81T-xs4bEWlALsO__j3rL1A7iB-SWz0/edit I haven't found any BDD frameworks yet, but I have found some interesting testing frameworks. I think I'll set up a testing branch for granite some day later this week, maybe test out the different frameworks so we can see what suits us best. If anyone else wants to start setting up a branch like that, you are of course free to do