Forum > Suggestions
Wish list: Eclipse-style unit tests; clear project structure.
mvampire:
Can I write a wish here? ;)
As I wrote at http://lazarus.freepascal.org/index.php/topic,15681.0.html,
I'm dreaming about:
1) Eclipse-style unit tests in Lazarus, when tests are in the same project, and I can right click on the unit/test (or package with multiple tests) and run it as a test.
2) Caused by 1, more sophisticated Project Inspector / Package Explorer and clear project structure. What I wish - is to have some kind of packages, like different folders for source, tests, resources, etc. And also ability to control (move/delete/rename) packages/folders/files. I assume it would be cool if project structure will be created automatically when starting new project. To be precise, Maven-like project structure, when tests and main source have different resources (so it becomes possible to use different files with properties for tests and main program) will be awesome!
3) Also caused by 1st - possibility to have several runnable units (classes) in 1 project - also like in Eclipse. Or it's already possible?
Can I ask if there are any plans for this? If not, is it possible to plan it? ;) Generally, if somebody wants some feature, which steps he can do to put his wish into the project roadmap? Which criterias it should pass to be accepted?
Thanks.
P.S. If I, in some (not near) future will have time for it, can I start/try to implement it by myself? How to start then (but please don't describe it too precisely, because even if I will have sufficient skills for it, I probably have no time for it now)?
Leledumbo:
We have a dedicated page for wish list ;)
1) It probably could be implemented by automatically generating test project in temporary directory that uses the test case unit and running it.
2) It's already possible via project templates package possibly combined with build modes.
3) I don't understand this one... units aren't meant to be run, programs are.
--- Quote ---Can I ask if there are any plans for this?
--- End quote ---
Not sure, but I guess no plan yet.
--- Quote ---If not, is it possible to plan it?
--- End quote ---
If you could convince the developers, why not?
--- Quote ---Generally, if somebody wants some feature, which steps he can do to put his wish into the project roadmap? Which criterias it should pass to be accepted?
--- End quote ---
From my point of view: proven to be useful, not breaking compatibility, there's (an) implementor(s) and maintainer(s).
--- Quote ---If I, in some (not near) future will have time for it, can I start/try to implement it by myself?
--- End quote ---
Sure.
--- Quote ---How to start then (but please don't describe it too precisely, because even if I will have sufficient skills for it, I probably have no time for it now)?
--- End quote ---
Start messing up with your installation ;)
I mean, understand the source code and modify as necessary to make the features implemented. Then try submitting the patches and explain to developers.
CaptBill:
This is a task for Tinycore Linux. You have an excellent foundation with a repository system, your own personal one. You simply are building extensions/packages like a .deb (Debian).
Now you have a system based on mounting/dismounting your custom "extensions", packages, or whatever ...like virtual hard disks even.
With a standardized system like this setup, you can even mount files from a remote server. Or I can connect to your "repo" and open a package from your personal FTP repo, etc.
Tinycore is so small (7 megs) booting from CD/DVD is the way to go.say bybye to you virus scanner. You get a pristine boot envy time. So th OS loads to ram then the FTP/http Extension server starts and you next mount a file system from your custom repo.
The TProcess component is your go to component. All the tools can be driven strait from the command line.
Definitly a good one for the wish list
Cheers
marcov:
--- Quote from: mvampire on January 09, 2012, 01:17:17 am --- which steps he can do to put his wish into the project roadmap? Which criterias it should pass to be accepted?
--- End quote ---
The best way is to submit a patch. If the feature is very involved, it is better to have some minimal test implementation first (that you are willing to throw away)
There is no project roadmap (except for improving current widgets), just the todo of each developer of what he wants to implement.
--- Quote ---P.S. If I, in some (not near) future will have time for it, can I start/try to implement it by myself? How to start then (but please don't describe it too precisely, because even if I will have sufficient skills for it, I probably have no time for it now)?
--- End quote ---
Always, best is to first do a hackish solution to get to a prove of concept situation, and then ask regular developers about it. (they can tell you if it needs to be spun into a package, can be a standard feature etc).
Note that there is not only the matter of implementation but also of longterm maintainership.
mvampire:
Thank You for the good and fast answers!
--- Quote from: Leledumbo on January 09, 2012, 03:04:14 am ---
1) It probably could be implemented by automatically generating test project in temporary directory that uses the test case unit and running it.
...
3) I don't understand this one... units aren't meant to be run, programs are.
--- End quote ---
Yes, maybe I wrote a bit unclear.
I suggest an ability to have unit-tests in the same project with tested units. Unit test is not a program, it's a unit. So I mean running such a unit with unit test, without running the whole program.
Generally, but not necessary, I want an ability to have several programs in the project, not only running unit tests possibility.
For example, let's assume that there are following units in the project:
CarSelling.pas - program to sell cars, which uses SaveDataToDatabase.pas unit to save some data to database
BycicleSelling.pas - program to sell bicycles, which also uses SaveDataToDatabase.pas unit to save some data to database
SaveDataToDatabase.pas - unit providing database functionality
TestAutoSelling.pas - unit with test case for testing CarSelling.pas program
TestBicycleSelling.pas - unit with test case for testing BicycleSelling.pas program
TestDatabaseSave - unit with test case for testing SaveDataToDatabase.pas unit
So, can I compile and run CarSelling, BicycleSelling (as separate programs) and all 3 unit tests (to be run as unit tests, not as programs) from 1 project? As I undestood - currently it's not possible.
Currently, for unit tests a separate project should be created, as I have understood, which is uncomfortable, IMHO. On the other hand, I don't see any IDE/compiler limitations to implement/automate this and make unit tests available without creation of an extra, separate project for unit tests only. Moreover, as I mentioned in the other thread, I think that tests are very important and providing a comfortable clear and well-structured enviroment for unit tests can significantly increase competitiveness and attractiveness of Lazarus.
--- Quote ---
2) It's already possible via project templates package possibly combined with build modes.
--- End quote ---
Can I ask then how exactly can I get Maven-like project structure for my project? With different property files for tests and main program?
I also meant there that it would be cool if all new projects will already have some basic structure by default (when starting a new project), and not all-files-in-one-folder.
--- Quote ---We have a dedicated page for wish list
--- End quote ---
Thanks, I will then describe all my ideas more precisely within next days there, also using Eclypse screenshots.
Navigation
[0] Message Index
[#] Next page