Forum > Suggestions

Wish list: Eclipse-style unit tests; clear project structure.

<< < (3/5) > >>

CaptBill:

--- Quote from: JuhaManninen on January 09, 2012, 07:53:57 pm ---
--- Quote from: CaptBill on January 09, 2012, 07:56:24 am ---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).
[...]

--- End quote ---

CaptBill, did you write the message? It looks like a spam sent by a bot, not relating to the issue.

Juha

--- End quote ---

Hi Juha,
I know I sound like a Tinycore salesman lately, haha. What mvampire desires is achievable, i believe, with a local repository system. You can have a "project package" (package=collection of extensions). Just need to follow the file mounting paradigm in place already in Tinycore. It takes the repo concept to another level, totally separating OS and file system. You don't "install apps" but instead you mount the extensions needed.

With this we have a system that can do the things we need with Lazarus like

Open into a minimalist mode with a FpGui specific environment for example.

Easily switch between multiple snapshots/versions of Fpc and Laz with no problem

Even switch out your window manager without a reboot for testing in different WMs.

The repo concept can be used for more than just downloading apps. Would be a good foundation to build what we are discussing. And Tinycore is structured well for this.

Leledumbo:

--- Quote ---OK. I was just talking from user perspective. Does not matter how exactly it wll be implemented, I meant that I would like to right click on one of the unit in the project (e.g, in project inspector) and click 'run as unit test case'. Then, of course, some code could be temporarily generated, but, as a user (!) I don't want to think about such code (program code to run unit test case). I (AS A USER, not personally) want to: have a project - make a package with unit tests inside this project - create an unit test there - click on unit test - click 'run as unit test' - see the results - see on which line in unit being tested I have a problem.
--- End quote ---
OK, I get it. Now please ask a feature request in the bugtracker and explain this to the developers. Good luck.

BigChimp:

--- Quote from: CaptBill on January 10, 2012, 02:44:43 am ---Hi Juha,
I know I sound like a Tinycore salesman lately, haha. What mvampire desires is achievable, i believe, with a local repository system. You can have a "project package" (package=collection of extensions). Just need to follow the file mounting paradigm in place already in Tinycore. It takes the repo concept to another level, totally separating OS and file system. You don't "install apps" but instead you mount the extensions needed.

With this we have a system that can do the things we need with Lazarus like

Open into a minimalist mode with a FpGui specific environment for example.

Easily switch between multiple snapshots/versions of Fpc and Laz with no problem

Even switch out your window manager without a reboot for testing in different WMs.

The repo concept can be used for more than just downloading apps. Would be a good foundation to build what we are discussing. And Tinycore is structured well for this.

--- End quote ---
CaptBill,

I still don't see how this applies to unitTESTING a project that one is writing. We're not talking about testing Lazarus packages etc... Perhaps I misunderstand what you're saying; if so, try again please  :)

If I understand correctly, mvampire wanted (among other things) tighter integration of a test harness for (unit) tests when coding a project. These unit tests obviously need to refer to the main code in order to test them.

He would like to be able to run unit tests on the code in that project while in the Lazarus IDE, without having to close the primary project and opening a unit test project, or having two Lazarus instances with primary+unit test projects.
Currently this is not possible as Lazarus will only allow setting up a different project containing the FPC/Lazarus unit testing framework; Lazarus allows only one item/unit within a project to be run/debugged.

For this to work, there would be a need to add multiple "projects" (=regular program+associated unit tests) inside a "project group" ("solution" in Microsoft Visual Studio) and let the user choose with the IDE which one he wants to run. This would be either the normal code or the unit tests for the code.

Thanks,
BigChimp

JuhaManninen:
@CaptBill:
> I know I sound like a Tinycore salesman lately, haha. What mvampire desires is achievable, i believe, with a local repository system
> [...]

Ok, then it makes some sense. However, unit testing should be easy on every platform / OS. It may be better to implement it in Lazarus.

@mvampire:
You can make a feature request in bugtracker, true, but I guess nobody will implement it soon.
There are ~1200 open issues for Lazarus, some of them feature requests. The developers have their own priority lists and there are too few developers anyway.
Best would be if you could implement it by yourself (as you mentioned). Nobody can describe it precisely but you just have to study the code and experiment with it. There can be a feature branch in SVN server for your code if needed, or you can make your own branch in a public repo (GitHub, SourceForge etc.).
When you have an idea of the existing code you can ask questions in mailing list. Developers are helpful if you show a true effort to learn and implement something.
That's what I did less than 3 years ago myself. I fixed some bugs and then made a big change to the Configure Build Lazarus dialog.

Be warned though: your feature will take some time because the project and package related code in Lazarus is quite complex.

Juha

PascalDragon:

--- Quote from: marcov on January 09, 2012, 03:07:38 pm ---
--- Quote from: mvampire on January 09, 2012, 02:48:37 pm ---

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:

--- End quote ---

That sounds like project groups, like Delphi has it.

--- End quote ---

And those I already requested here ;)

Regards,
Sven

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version