Detalhes do Grupo Particular

Global Moderators

Forum wide moderators

  • I often talk about automating tactially and strategically. When we automate tactically we do what it takes to get the job done for us. When we automate strategically we build for the long term.

    The same is true for programming tools. We can start small and tactical and scale strategically. In this example I create a Counterstring tool.

    Counterstrings

    I have written about Counterstrings before:

    And you can find James Bach’s original writing and work on Counterstrings at satisfice.com

    Since I don’t have a tool for creating Counterstrings in the Web I set out to create one.

    I thought this would be a good simple tutorial for JavaScript, tactical tooling and eventually strategic tooling (by converting it into a Chrome extension).

    A Counterstring is a string like this *3*5*7*9*12*15* where the * represent the position in the string of the number immediately proceeding it.

    How to write it?

    Chrome has “Snippets”

    • right click, inspect
    • in Sources select the “Snippets” tab
    • create a + New Snippet

    This is a built in JavaScript Editor within your browser.

    To see it work type into the snippet:

    console.log("hello");
    

    Click the play icon, and your script should run and you’ll see "hello" written to the console.

    To create a Counterstring tool start by creating a function:

    function getCounterString(count){
        console.log("hello");
    }
    

    If you run this, nothing will happen.

    But after running it, if you type into the console getCounterString(5) you should see "hello" written to the console.

    We will make it output a counterstring.

    Counterstring generation function

    function getCounterString(count){
        
        var counterString = "";
    
        while(count>0){
    
            var appendThis = "*" + count.toString().split("").reverse().join("");
            
            if(appendThis.length>count){
                appendThis = appendThis.substring(0,count);
            }    
    
            counterString = counterString + appendThis;
    
            count = count - appendThis.length;
        }
    
        return counterString.split("").reverse().join("");
    }
    

    If you run this, nothing will happen.

    But after running it, if you type into the console getCounterString(5) you should see "*3*5*" written to the console.

    How does it work?

    Declare a function called getCounterString which takes one parameter called count. That is how we are able to specify the length of the counterstring we want when we call the function getCounterString(5)

    function getCounterString(count){
    

    Create a String variable which we will build the counterString in:

        var counterString = "";
    

    We need to loop around all the values in the counterstring e.g. 5, 3, and 1. So I will decrease the count as we process the values and I’ll use a while loop to do this e.g. while count is greater than 0, keep building the counterstring.

        while(count>0){
    

    Each time I process a count value I will create a string like "*5" or "*3" I will append this to the counterString. But I can’t just write "*13" because I’m going to reverse the string later so I reverse the number as I create it e.g "*31" which would be reversed and read from left to right as "13*". The way I reverse a string in JavaScript is to .split("").reverse().join("") which uses split to convert it to an array, reverse to reverse it then join to convert the array back to a String.

            var appendThis = "*" + count.toString().split("").reverse().join("");
    

    Another complication is that I can’t just add the number to the String otherwise I’ll end up with "1*" as my 1 character string, and it isn’t it is two characters. So if the String I want to append is greater than the number of characters left then I only want a part of that string, e.g. a substring.

            if(appendThis.length>count){
                appendThis = appendThis.substring(0,count);
            }    
    

    Then I append my number String to the counterstring.

            counterString = counterString + appendThis;
    

    Then I decrement ‘count’ by the number of characters I just added to the counterstring.

            count = count - appendThis.length;
    

    Then I continue the while loop if count still has characters to process.

        }
    

    Then, finally, I return the reversed counterString.

        return counterString.split("").reverse().join("");
    }
    

    Refactoring

    Since I have repeated code .split("").reverse().join("") I create a reverseString method

    function reverseString(reverseMe){
        return reverseMe.split("").reverse().join("");
    }
    

    Which I would call in my getCounterString function by:

    var appendThis = "*" + reverseString(count.toString());
    

    And

    return reverseString(counterString);
    

    This would give me a getCounterString function which I could run from the console, and I could then copy and paste the counterstring - a very basic tool.

    Easier to use

    var count = window.prompt("Counterstring Length?", "100");
    var counterString = getCounterString(count);
    console.log(counterString);
    

    The above code creates an input dialog and asks me “Counterstring Length?”, and I can enter the length I want. It stores the value I enter into a variable called count which it then uses to call the getCounterString method.

    And I print the generated Counterstring to the console, using console.log to make it easier to copy and paste.

    Even easier to use

    I can manipulate the DOM, i.e. the Web Page, from JavaScript.

    And if I select an input field before running the script then the I can use document.activeElement to find the input field that I selected and can set the value of that field.

    document.activeElement.value=counterString;
    

    If I select an input field, and then run the snippet then the counterstring should be added to the input.

    Note: this bypasses HTML max length attribute controls since it injects the text directly into the field Value, and doesn’t type the keys.

    Video

    I’ve created a video showing all this in action:

    Watch on YouTube

    Code

    And you can find the source code on Github.

    https://eviltester.com/blog/eviltester/2019-02-19-counterstring-snippets/

    postado em Feed de Blogs e Posts
  • Dia internacional do teste de software Dia 20 de Fevereiro é considerado o dia internacional do teste de software ✅ devido ao lançamento do livro “The art of Software Testing“, do autor Glenford J. Myers, sendo o primeiro livro focado especificamente na disciplina de teste de software. Para comemorar esta data a Escola Talking About Testing está com … Continue lendo Promoção na Escola Talking About Testing

    https://talkingabouttesting.com/2019/02/19/promocao-na-escola-talking-about-testing/

    postado em Feed de Blogs e Posts
  • Está dizendo que ela gera um evento? Algo tipo, manda para o rabbit…ou similar? Independente, se não for algo que a chamada te traga, precisa ver onde fica e como acessar para efetuar essa validação. Por exemplo = Se ele gera um evento e joga em uma fila para ser consumido, tu precisa conectar nessa fila, captar o evento e validar a informação.
    Como falei, só dizer log ficou meio aberto…Por isso não compreendi bem a dúvida.

    postado em Geral
  • Na verdade, já que se ocorreu uma transformação ágil, vale concordar como time que os teste gerados não resolvem o que o time procura e vale procurar outras soluções. A equipe está aberta a ajudar nesse problema?

    postado em Geral
  • Como assim logs?Poderia explicar melhor o seu problema?

    postado em Geral
  • Hoje mesmo eu respondo 🙂

    postado em Geral
  • Descrição:

    A vaga é para QA Sênior na Carenet Longevity, uma startup de saúde que recebeu aporte de um fundo de investimentos no começo deste ano. Temos um novo projeto, para monitoramento de dados e precisamos de um QA sênior para criação de cenários e automatização de testes.

    Requisitos:

    • Sólida experiência na área de Quality Assurance
    • Experiência com automatização de testes

    Desejável:

    • Experiência de automatização de testes em Javascript (mocha, chai, jest, frisby)
    • Experiência em ambiente com metodologia ágil (Scrum)

    Local: São Paulo/SP (Vila Olímpia)

    Favor encaminhar CV para [email protected]

    postado em Vagas
  • No último sábado, 9 de Fevereiro de 2019, rolou o primeiro bate-papo do grupo de mentoria do blog Talking About Testing, onde Alekson Fortes, Henrique de Souza e eu (Walmyr Filho), conversamos sobre DevOps baseado nos 3 caminhos descritos no livro “The DevOps Handbook: How to Create World‑Class Agility, Reliability, and Security in Technology Organizations“, … Continue lendo Bate-papo sobre DevOps – Grupo de mentoria Talking About Testing

    https://talkingabouttesting.com/2019/02/14/bate-papo-sobre-devops-grupo-de-mentoria-talking-about-testing/

    postado em Feed de Blogs e Posts
  • Se tu gostava do testlink, o test management vai servir como uma luva para vc… Pois lembra muito ele (Mas sem tantos problemas que ele tinha). Agora, se o projeto é ágil, vale ter casos de teste?

    postado em Geral
  • Q: What is the best fuzzer (automated software testing tool) to find 0-days? Why?

    A:

    0-day is a very broad statement.

    I tend to use the payload fuzzers in BurpSuite and OWasp Zap Proxy, but these require me to identify the target that I’m testing, and the appropriate data scope and range to fuzz.

    I suspect you might be more interested in application or file based fuzzers.

    Google have introduced a service for fuzzing applications.

    github.com/google/oss-fuzz

    There are many lists of fuzzers to read through.

    New tools are being created for this all the time and there is a constant flood of research on fuzzing:

    scholar.google.co.uk/scholar?hl=en&as_sdt=0%2C5&q=fuzzing&btnG=

    Since the fuzzers all work at different levels and on different technologies you have to be very specific in your research to make sure you don’t overload yourself with tools (with is all too easy to do in Security Testing)

    owasp.org/index.php/Fuzzing

    https://eviltester.com/blog/eviltester/quora/2019-02-13-what-best-fuzzer/

    postado em Feed de Blogs e Posts