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

Tests logic #1369

Merged
merged 8 commits into from
Jul 18, 2018
Merged

Tests logic #1369

merged 8 commits into from
Jul 18, 2018

Conversation

ninabreznik
Copy link
Contributor

@ninabreznik ninabreznik commented Jun 18, 2018

screenshot_2018-06-18_16-36-50
screenshot_2018-06-18_16-36-32

@yann300
Copy link
Collaborator

yann300 commented Jun 18, 2018

Insight for the first implementation of the test tab:

The panel contains:

  • List of checkboxes + labels:
    This list all the files ending with *_test.sol from the current path

  • Action to start test:
    Selected *_test.sol files have their own tests executed.

  • Panel showing test results:

    sample (that already how the test tab currently show results) :

    test1
        ✓ Check winning proposal
        ✓ Check winnin proposal with return value
        
    2 passing (1s)
    
    
    test2
        ✘ Check winning proposal
        ✓ Check winnin proposal with return value
    test3
        ✓ Check winning proposal
        ✓ Check winnin proposal with return value
    
    3 passing (2s)
    
    1 failing
    1) test2 Check winning proposal
    error: 1 should be the winning proposal
    

test1, test2 and test3 are solidity contracts implementing tests, they can be located in any *_test.sol.
There can be multiple contracts per file.


  1. should it run all tests it can find in any folder?
    No, it run test from the current folder

  2. should it run all tests it can find in the same path as the currently displayed file in the editor (browser, gist, github, ...)?
    Yes

  3. should it do (2.) but only for browser and remixd?
    it does 2) for all the files / explorer

  4. something else?
    --

And how should that change when we make things selectable (when we add checkboxes to select which tests we want to run)?

  1. should it only list the options available in either above (1., 2. 3. or 4.?)
    It should list all *_test.sol files from the current path.
    by default all the files are checked.

  2. should it be able to display all options and you could run a selection of test files from different root folders (e.g. browser, gist and github)?
    It should just display the *_test.sol from the current folder.

  3. something else?
    --


  • when a test file is selected in the editor, perhaps we should perhaps allow to run it instead of displaying list of file
  • in the result list, displaying also the name of the file (cause there could be collision in the name of contracts)
  • when clicking on run test just after having done a change in the editor might not take in account recent changes

@yann300 yann300 added this to the M2 - IDE milestone Jul 4, 2018
@yann300 yann300 changed the title Tests logic [work in progress] Tests logic Jul 5, 2018
callback(error)
}, api.importFileCb)
}
})
}

let runTests = function () {
container.innerHTML = ''
function getTests () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test files list should also be updated when the currentPath change, not sure this is implemented here

@yann300 yann300 merged commit 03777aa into master Jul 18, 2018
@axic axic deleted the tests-logic branch September 19, 2018 09:05
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.

2 participants