iceScrum | How to make (& automate) sprint plan screenshots ? – iceScrum

iceScrum Forums Discuss on iceScrum

Viewing 4 posts - 1 through 4 (of 4 total)

  • Author
    Posts
  • #39322

    fraaalesi
    Participant

    Hello all,
    i’d like to automate the export of screenshot of the “Sprint plan” page.
    The goal is to associate to each software build a screenshot so the testers know which story were done or not **at the time of the build**.

    The misc export features I looked at in IceScrum are not exactly as what appear in the browser.
    Is there an easy way to create and export such screenshots ?

    I’d like to automate it from jenkins by the way (with specific user/login) so any solution is welcome 😉

    Cheers !

    #39335

    Vincent Barrier
    Keymaster

    Hello,

    You could you something like selenium test tool or any tool like browserstack.com to automate this task and get a “clean” screenshot of your sprint plan.

    I like the idea, we will think about it in a more clean way..

    Cheers;

    #40059

    fraaalesi
    Participant

    Hi, I managed easily to make a screenshot with PhantomJS (headless Chrome browser). Here is the script if anybody has a use for it:

    
    page.settings.userAgent = "Mozilla/5.0 (Windows NT x.y; rv:10.0) Gecko/20100101 Firefox/49.0";
    
    function doLogin(){
        page.evaluate(function(){
            var frm = document.getElementById("loginForm");
    
            frm.elements["username"].value = "myLogin";
            frm.elements["password"].value = "XXXXXX";
    
            frm.submit();
        });
    }
    
    function screenshot(){
        
        page.viewportSize = {
            width: 1600,
            height: 6000
        };
    
        page.open('http://192.168.38.123:8080/icescrum/p/SPHERE#sprintPlan', function() {
            window.setTimeout(function () {        
                page.render('icescrum.png');
                phantom.exit();
            }, 2000);    // wait 2s for javascript do update the graphic boxes
        });
    
    }
    
    page.onLoadFinished = function(status){
    
        console.log( (!phantom.state ? "no-state" : phantom.state) + ": " + status );
        if(status === "success"){
            if( !phantom.state ){
                doLogin();
                phantom.state = "logged-in";
            } else if(phantom.state === "logged-in"){
                screenshot();
                phantom.state = "screenshot";
            } else {
                //console.log("ERROR: unhandled state... ");
            }
        }
    };
    
    page.onConsoleMessage = function (message){
        console.log("msg: " + message);
    };
    
    page.open("http://192.168.0.1/icescrum/login");
    #40188

    Nicolas Noullet
    Keymaster

    Glad to know that you found a solution, thank you for sharing it here so the community can use it! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Questions and help’ is closed to new topics and replies.