GitHub user soralee opened a pull request:

    https://github.com/apache/zeppelin/pull/2438

    [WIP][ZEPPELIN-2693] Test: interpreter mode action test

    ### What is this PR for?
    Adding to interpreter mode (globally shared mode, Per user/Scoped mode, Per 
user/isolated mode) action case on Selenium test.
    Here is for checking scenario.
    
    #### 1.  globally in shared mode
    ```
    admin : set 'globally in shared' mode of python interpreter
    
    User 1: create new note
    User 1: Code “%python user = user1” in the first paragraph
    User 1: Code “%python print user” in the second paragraph and run it
    User 1: Check if the result is user1 in the second paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 2: create new note
    User 2: Code “%python user = user2” in the first paragraph
    User 2: Code “%python print user” in the second paragraph and run it
    User 2: Check if the result is user2 in the second paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 1: Run the second paragraph again.
    User 1: Check if the result is user2 in the second paragraph
    User 1: Restart python interpreter in the note.
    System: Check if the number of python interpreter and python process is 0
    ```
    
    #### 2. Per user in scoped mode
    ```
    admin : set 'Per user in scoped' mode of python interpreter
    
    User 1: create new note
    User 1: Code “%python user = user1” in the first paragraph
    User 1: Code “%python print user” in the second paragraph and run it
    User 1: Check if the result is user1 in the second paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 2: create new note
    User 2: Code “%python user = user2” in the first paragraph
    User 2: Code “%python print user” in the second paragraph and run it
    User 2: Check if the result is user2 in the second paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 2
    
    User 1: Run the second paragraph again.
    User 1: Check if the result is user1 in the second paragraph
    User 1: Restart python interpreter in the note.
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 2: Restart python interpreter in the note.
    System: Check if the number of python interpreter process is 0
    System: Check if the number of python process is 0
    
    User 1: Run the first paragraph
    User 2: Run the first paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 2
    
    admin: Restart python interpreter in interpreter tab
    System: Check if the number of python interpreter process is 0
    System: Check if the number of python process is 0
    ```
    
    #### 2. Per user in isolated mode
    ```
    admin : set 'Per user in isolated' mode of python interpreter
    
    User 1: create new note
    User 1: Code “%python user = user1” in the first paragraph
    User 1: Code “%python print user” in the second paragraph and run it
    User 1: Check if the result is user1 in the second paragraph
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 2: create new note
    User 2: Code “%python user = user2” in the first paragraph
    User 2: Code “%python print user" in the second paragraph and run it
    User 2: Check if the result is user 2 in the second paragraph
    System: Check if the number of python interpreter process is 2
    System: Check if the number of python process is 2
    
    User 1: Run the second paragraph again.
    User 1: Check if the result is user1 in the second paragraph
    User 1: Restart python interpreter in the note.
    System: Check if the number of python interpreter process is 1
    System: Check if the number of python process is 1
    
    User 2: Restart python interpreter in the note.
    System: Check if the number of python interpreter process is 0
    System: Check if the number of python process is 0
    
    User 1: Run the first paragraph
    User 2: Run the first paragraph
    System: Check if the number of python interpreter process is 2
    System: Check if the number of python process is 2
    
    admin : Restart python interpreter in interpreter tab
    System: Check if the number of python interpreter process is 0
    System: Check if the number of python process is 0
    ```
    
    ### What type of PR is it?
    [ Test ]
    
    ### Todos
    1. globally in shared mode scenario
       - * [ ] - add logic to check process - interpreter process and python 
process
       - * [ ] - add logic to restart python interpreter button in note
       - * [ ] - add logic to restart python interpreter in interpreter tab
    
    2. * [ ] - make `Per user in scoped mode` scenario
    3. * [ ] - make `Per user in isolated mode` scenario
    
    ### What is the Jira issue?
    * [adding Interpreter mode 
test](https://issues.apache.org/jira/browse/ZEPPELIN-2693)
    
    ### How should this be tested?
    
    1. build zeppelin with `mvn clean package -DskipTests`
    
    2.1. total test : run `TEST_SELENIUM='true' mvn test -pl 'zeppelin-server' 
--am -DfailIfNoTests=false -Dtest=InterpreterModeActionsIT`
    
    2.2.  globally mode -
    `TEST_SELENIUM='true' mvn test -pl 'zeppelin-server' --am 
-DfailIfNoTests=false -Dtest=InterpreterModeActionsIT#testGloballyModeAction`
    
    2.3.  Per user in scoped mode -
    `TEST_SELENIUM='true' mvn test -pl 'zeppelin-server' --am 
-DfailIfNoTests=false -Dtest=InterpreterModeActionsIT#tesPerUserScopedAction`
    
    2.4. Per user in isolated mode -
    `TEST_SELENIUM='true' mvn test -pl 'zeppelin-server' --am 
-DfailIfNoTests=false -Dtest=InterpreterModeActionsIT#tesPerUserIsolatedAction`
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/soralee/zeppelin 
ZEPPELIN-2693_adding_Interpreter_mode_test

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2438.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2438
    
----
commit 3ca3566e2190086b4d75224807effbd46dea8ef6
Author: soralee <sora0...@zepl.com>
Date:   2017-06-26T15:19:55Z

    Test: adding initial interpreter mode action test

commit 9547c32398bec02a038dda75514e08ca7b7c80f0
Author: soralee <sora0...@zepl.com>
Date:   2017-06-26T16:08:40Z

    fix: add permission to user1 and user2, add todo annotation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to