Jump to content

Stefan Glienke

Members
  • Content Count

    1430
  • Joined

  • Last visited

  • Days Won

    142

Everything posted by Stefan Glienke

  1. Defect is somewhere else and you messed up the string reference counting, if the error occurs on not the first call to Peek then obviously Result contains a prior string reference which the UStrAsg call that is generated for the assignment clears. Did you fix procedure Add(Items:TRingbufferArray); already? Because that must not use Move for managed types
  2. Stefan Glienke

    TestInsight 1.1.9.0 released

    I just released a new version of TestInsight - more details on my blog post.
  3. Stefan Glienke

    TestInsight 1.1.9.0 released

    StartSuite/EndSuite might be used by the GUI listerner to build its hierarchy, I don't know but its not at all required - some sort of names containing their entire path information would be needed to - but I said before - not planned. Regardless we are discussing the wrong issue here - you most likely have multiple instances of the same testcase classes here and thus multiple tests return the same name - I suspect that you have more than 350 tests you showed in the screenshot before. Its as simple as that if I name a file just by its file name I most likely find similar named units in several folders - when I add some information that is unique for each of them - like the directory I can identify them. As I said before if the decorator would not just pass GetName onto its decoratee then the name would be unique. TI is build to be test framework agnostic - and I try to keep it that way and not implement any quirk or unique feature into it - there was enough trouble already with some places where DUnit and DUnitX behaved different in terms of how they named and identified their tests already. Having that said - I am very sure that even without implementing hierarchical display you can be able to use TI for your tests and be able to find out which of the similar named but using different setup tests failed. Edit: I quickly looked into it and I have to say the design with the decorators and the way they are implemented in TestExtensions.pas is a bit crappy but anyhow: We need the BeginTest/EndTest methods here as those are the ones being run for the decorator instances - we use IsDecorator to check is its one and then add/remove from a current path variable. I remember you asking me about running tests in parallel, so make that a thread var - not sure if running tests in parallel makes sure that only tests from different suites are run in parallel because otherwise DUnit itself might be in trouble... anyway - append that as well in GetFullQualifiedName - anyhow you might want to change the TTestDecorator.GetName to use its name and not just generate a generic name that does not tell much. Example: type TMyDecorator = class(TTestDecorator) function GetName: string; override; end; { TMyDecorator } function TMyDecorator.GetName: string; begin Result := FTestName; end; initialization RegisterTest(TMyDecorator.Create(TMyDecorator.Create(TMyTestCase.Suite, 'foo'), 'qux')); RegisterTest(TMyDecorator.Create(TMyTestCase.Suite, 'bar')); end. And these changes in TestInsight.DUnit: +threadvar + currentPath: string; function GetFullQualifiedName(const test: ITest): string; begin * Result := currentPath + (test as TObject).ClassName + '.' + test.Name; end; procedure TTestInsightListener.EndTest(test: ITest); begin + if IsDecorator(test) then + currentPath := Copy(fCurrentPath, 1, Length(fCurrentPath) - Length(test.Name) - 1); end; procedure TTestInsightListener.StartTest(test: ITest); var testResult: TTestInsightResult; begin + if IsDecorator(test) then + currentPath := fCurrentPath + test.Name + '.'; And I get this result
  4. Stefan Glienke

    10.4.1 Update

    They might not run at all because of new procedure entry points that were not there before - see the comment from a user on my blog article trying TI 1.1.9.0 on 10.4.0.
  5. Stefan Glienke

    TestInsight 1.1.9.0 released

    - Warnings are because TI enables the FailsIfNoChecksExecuted option all the time (see TestInsight.DUnit.RunRegisteredTest) - and then turns failures with the message 'No checks executed in TestCase' into a warning. This happens when you don't execute any CheckXXX in your test. Yes sometimes such tests exist - put a FChecksCalled := True into the code or create a class helper for TTestCase with a Pass method (which I did) or inherit from your own improved TTestCase class (which is also what I did in the past). - I have to say all this back and forth showing screenshots and stuff is very tedious and time wasting for us both to find out a solution. Especially since without the exact code I cannot see which results belong to which setup code - hence my question to create some tiny two or three testcases example that demonstrates the issue that I can look into - my guess so far (and I hate guessing with little information) is that due to the approach with decorators there is some information lost that would be needed for a unique name. IIRC in DUnit a decorator inherits from ITest and thus is able to change what is returned from the GetName method - I would guess this is what is needed here to produce a unique name.
  6. Stefan Glienke

    TestInsight 1.1.9.0 released

    Changing icons is not good style - I could have two buttons but then again people would not read hints. Thanks for your offer but I have the Arxialis icon set and take one from their icons if I need another. Thing is internally it is exactly identical function - "run selected tests" - which basically means "run the test app and skip any test that is not selected" - well if there is no test to select that means "run the test app and skip all" - which results in all tests being discovered. If something can be explained by "click this button to discover tests" I would rather spend my time elsewhere more important - possibly by writing some quick guide that explains everything on one or two pages and leaves no room for confusion - then I could at least reply with RTFM when someone asks me 😛
  7. Stefan Glienke

    10.4.1 Update

    Ok, then probably some incompatibility - please report if it ever occurs again with 1.1.9.0 If the fact that with some bad code in a plugin you can completely bring down the IDE is a "problem of the IDE" then I would say it is very likely. I think this has discussed before - especially as some plugins do quite some nasty things which can offer amazing functionality but are very very brittle - and in fact causes quite some work on the IDE devs as they cannot simply refactor or even rename stuff internally as they would like to.
  8. Stefan Glienke

    TestInsight 1.1.9.0 released

    Please show how these tests show in TI grouped by type.
  9. Stefan Glienke

    10.4.1 Update

    That was in 1.1.8.0 right? I just noticed it this morning on my 10.4.1 at home that still had an earlier TI build installed and I got some AV every time I opened a new VCL application. Installing 1.1.9.0 removed it but I cannot recall any particular change that i conciously did for that defect - was it reported on the issue tracker?
  10. Stefan Glienke

    TestInsight 1.1.9.0 released

    I see - if you can pass me some simple demo of how you structure your tests and where it leads to problems identifying which test result belongs to which tests it would help me understanding and possibly finding a solution - you can see the client sources that are shipped what information TI gathers from each test and if it possible is missing some information apart from the position in the hierarchy.
  11. Stefan Glienke

    TestInsight 1.1.9.0 released

    Decision is of course up to you and I am not forcing anyone to use my plugin - after all it excels well for fast running tests and not for test suits that might take minutes or longer to run. Anyhow if the lack of being able to identify failed test by their name is a problem for you there might be something wrong with your test naming. See this example from Spring4D And here the result from Grep as you can see that the TestOrdered and TestOrdered_Issue179 are only implemented once: So I am using inheritance to have a base test class here and then only inherit from that for the different dictionary implementations to be tested. In my case I have the identical test being performed 4 times - and I guess the same will be the case for Aurelius - with potentially some tests that might be different but could still be implemented as virtual methods in some base class and then inherited and thus provide the exact name where they failed. Furthermore simply double clicking on the failed test should lead you do the code. Edit: another question: if you run your test suite as part of CI - how would you know there which SaveBlob failed if you just name a dozen of tests "SaveBlob" - as you can see this is not a particular problem of TI but likely results from some non optimal naming of your tests and simply relying on the hierarchical view of the DUnit UI to find which one it is.
  12. Stefan Glienke

    TestInsight 1.1.9.0 released

    1. Known and as designed - TI is designed with TDD in mind where you usually don't care about some hierarchies and just about passed/not passed - that is why originally it just had the group by type view - only later I introduced the group by fixture view which has no hierarchical display but just groups by the fixture names and its test cases. The issue was brought up several times but to be honest I have no intentions to replicate the full hierarchical view which the DUnit GUI has. 2. That is a wrong understanding - TI only runs the tests when you hit one of the play buttons or when one of the 2 options to run it automatically are enabled - however even then it only runs once the trigger (hit save or idle for the set time) happens. If the test application has an issue and keeps running in the background you can hit the "stop" button which then tries to terminate that process. 3. Obviously my UI is not good enough as I get this question quite often - however reading the tooltips will reveal this option - the second button from the left (the "fast forward" one) has 2 options in one - if there is no test selected it does "discover tests" - that is it runs the project but tells the framework to not execute every testcase - and thus gets all of them as skipped - if any test is selected it changes to "run selected tests". Long story short - simply hit that button and it collects all tests without actually executing them which is then an almost instant action.
  13. Stefan Glienke

    Grep search empty window with 10.4.1

    I can confirm - I noticed this happening as well but could not see yet what exactly is causing it. No fancy grep options though, just plain searching files of some directory or project group The grep window goes blank, just a grey window with nothing on it.
  14. Stefan Glienke

    CPP or C++ Category

    Delphipraxis, not RADStudiopraxis - anyhow I am not the one to decide.
  15. Stefan Glienke

    CPP or C++ Category

    Ok can we then also have a C# and Typescript area because those would be the real half brothers of Delphi (same father ya know)
  16. Stefan Glienke

    CPP or C++ Category

    Why should a Delphi forum have a C++ area?
  17. Possible copyright violation as it contains code related to DXScene and VGScene which was/is under copyright by Eugene Kryukov and was sold to Embarcadero.
  18. Stefan Glienke

    does a class property or a variable exist

    RTTI does not contain any information about class properties or vars/fields For clarification please see my P.S. in this post.
  19. Stefan Glienke

    where can I get general git process questions answered?

    Sounds more like current git workflow is done wrong when there is a struggle with 3 people trying to use it - because git was exactly invented for a distributed team (linux kernel). There are several models out there that have pros and cons - the famous one from over 10 years ago (which I saw had a note added earlier this year): https://nvie.com/posts/a-successful-git-branching-model/ This one refers to another one: https://guides.github.com/introduction/flow/ And since gitlab is a competitor to github they also have their model: https://docs.gitlab.com/ee/topics/gitlab_flow.html Read up on those - try to understand - identify which one fits your situation best and then come back asking some specific questions
  20. Stefan Glienke

    Why is TList freed in this code?

    What do you mean how does it behave - like a multimap
  21. Stefan Glienke

    Why is TList freed in this code?

    That's why IMultiMap<TKey,TValue> from Spring4d is so cool
  22. Stefan Glienke

    a pair of MM test

    I know english is not your native language but to be honest just throwing around numbers and all kinds of different benchmarks it totally confusing for me - it would be very helpful if you could present your findings in a more structured way as I really find the topic interesting but it is very exhausting to follow you.
  23. Stefan Glienke

    a pair of MM test

    Thanks, might be worth putting that info into the github readme because right now this looks like the Sea*.dll are yours where no code nor their source is found for in the repo. Also apart from the raw speed numbers do you have total/peak memory allocated comparisons for the tests you mention as well? Edit: what is the "FastMM5 benchmark utility" you referring to? I see no benchmark in the FastMM5 repo
  24. Stefan Glienke

    a pair of MM test

    X is n times faster than Y is not leading anywhere unless you profile the bottleneck of Y in your benchmark. Run it under VTune or uProf and report your findings. As for your MM it might be faster but nobody serious will download and use some random dlls (that are not even signed) from the internet and put them into production.
  25. Stefan Glienke

    Automated Way to Detect Interface Breaking Changes

    Unless you use generics - they are off limits to be changed (interface and implementation section) in both cases - also for units inline methods are off limits - for packages they are ok because inlining does not happen across binary module boundaries.
×