Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also write file that tyche needs to differentiate between the same te… #29

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

pppls
Copy link
Contributor

@pppls pppls commented Oct 20, 2024

…st run at differnt times.

specify default directory name and files.

Name of file containing testcases is {date:yyyy-M-dd}_testcases.jsonl. So "2024-10-19_testcases.jsonl".
Name of file containing testinfo is {date:yyyy-M-dd}_testinfo.jsonl. So "2024-10-19_testinfo.jsonl".

Located in ".cscheck\observed" directory, which is generated wherever the test is run.

I also verified that the test cases are generated in realtime by building the nuget package and copying the tests I write in a separate project.

@AnthonyLloyd AnthonyLloyd merged commit 698c891 into AnthonyLloyd:master Oct 20, 2024
3 checks passed
@AnthonyLloyd
Copy link
Owner

Thanks

@pppls
Copy link
Contributor Author

pppls commented Oct 20, 2024

@hgoldstein95 would you be able to add the above location to Tyche?

@AnthonyLloyd
Copy link
Owner

AnthonyLloyd commented Oct 20, 2024

@pppls @hgoldstein95 Should the location be by the instead test dll? I'm worried trying to get from the test dll to the project directory instead is a bit buggy.

@pppls
Copy link
Contributor Author

pppls commented Oct 20, 2024

Not sure. To be clear, what I meant was that Tyche probably needs to update their vscode settings.json to:

{
    "editor.autoSurround": "never",
    "editor.autoClosingBrackets": "never",
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "files.autoSave": "afterDelay",
    "[json]": {

        "editor.quickSuggestions": {
            "strings": true
        },
        "editor.suggest.insertMode": "replace"
    },
    "terminal.integrated.profiles.windows": {
        "PowerShell": {
          "source": "PowerShell",
          "icon": "terminal-powershell",
          "args": ["-ExecutionPolicy", "Bypass"]
        }
      },
    "terminal.integrated.defaultProfile.windows": "PowerShell",
    "git.enableSmartCommit": true,
    "git.confirmSync": false,
    "svelte.enable-ts-plugin": true,
    "tyche.observationGlobs": [
    
        "**/.cscheck/observed/*.jsonl", <-- NEW 
        "**/.hypothesis/observed/*.jsonl",
        "**/.quickcheck/observations/*.jsonl"
    ],
}

But I'm not sure if that's all there is to it.

@AnthonyLloyd
Copy link
Owner

That looks relative to the dll? Maybe it should just look for **/observed/*.jsonl or something only Tyche specific.

@pppls @hgoldstein95 Does Tyche work with tests running in parallel? I'm just considering if it can globally be turned on by config or if there is no need.

@pppls
Copy link
Contributor Author

pppls commented Oct 20, 2024

No, I completely forgot to mention that yesterday. The usage of the Channel ensures that testcases will be written sequentially to the "2024-10-19_testcases.jsonl" file within the test being run. But running two separate tests in parallel that both write to this file will very likely result in race conditions.

@hgoldstein95
Copy link

Tyche just reads updates to the provided file, so if the tests were synchronized to ensure that the actual jsonl data is valid, I think it shouldn't matter if the data for two tests were interleaved in the file.

As for whether Tyche should be looking for **/observed/*.jsonl, my original rationale for having one directory per framework was to avoid accidental overlap if there were multiple frameworks in the same project or something like that. And there's an added bonus that folks who implement Tyche for their frameworks are incentivized to get in touch with me, which means I can provide support and publicize the different frameworks who have built integrations.

By default I'll add **/.cscheck/observed/*.jsonl to the Tyche default configuration, but let me know if you disagree with my reasoning.

@hgoldstein95
Copy link

The directory is relative to the VSCode workspace, by the way. Not the test binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants