Sunday, August 7, 2016

TestRetreat 2016-Vancouver

(English, Hebrew might or might not follow at a later time).
-------------------------------------------------------
Edit: Some others are blogging on the same event, so far, I like their posts better than my own:
Claire's blog
Neil's blog
The AST blog (it's Claire again, but from a completely different angle)
-------------------------------------------------------
So, Today was my first day at CAST, or, actually, on TestRetreat, organized by Matt Heusser from Excelon. As I was hoping (but didn't know if to expect it or not), I had a great time and got to meet some great people. I can even remember the names of some of them, so Yay me! The day began with some tea & pastries (There was also coffee, I think) and we were getting to know people just a bit. As expected - those of us that had some prior familiarity with each other had it a bit easier than the rest of us, but since everyone was very friendly, it wasn't as awkward as getting to know a whole bunch of people can sometimes be.

  • After that, there was a series of lightning talks about various Ideas - Starting off with Matt talking about "Frames" - the idea, if I got it right, is that everyone is interpreting the reality through their perspective, feeling and character, and project this when communicating with others. Those frames are often in conflict, and people, without noticing it, tend to accept the most dominant frame and try to work within it, where it is better sometimes to just project your own frame stronger. For instance, Matt used the example of someone saying "I wasn't talking to you" as a way to silence someone - by doing so the speaker implies a set of rules that make it inappropriate for that someone to push into a situations uninvited. A way to project a frame against that would have been "right, but I was talking to you" (I think Matt used the term "holding a frame"). This works also in less violent situations, such as the project manager setting expectations that do not match the team perspective (or, in Matt's case - the consultant's way of working). 
  • Following that, I was called on stage to share my thoughts about the way new tools & skills are opening our eyes to new testing options. It's an Idea I'm really interested in developing, to see where it might lead. Currently, all I have is this notion of "new capabilities make my testing better, I really need to find a way to actively search for new capabilities that I don't know I'm missing. 
  • Claire raised an interesting question about using personal judgement to decide when to go against what you are being told to do as a tester and do what you think is right. 
  • Shachar (which was born in Israel, despite growing up in the US) spoke about maintaining your personal reputation. One point I managed to take of one of his examples was that declaring clearly what you do not intend to do can sometimes be very important to keeping up your reputation. 
  • Miranda spoke about conveying the value of testers especially in an agile world. Two points that remained with me were bringing a different perspective to the table, and bridging that gap between talking about what we build (which developers are really good at) and talking about "what we should be building" (which developers tend to be less good at). 
  • Eric raised the question of "what to do with experienced testers that will enable them to adapt to the changing world around us?" . While my initial response was a bit Darwinian (adapt or die), I think that there might be  some things that the testing community could do (and should do) in order to still have those experienced minds around and benefit from the skills they did acquire and might be relevant. 
  • Ash took that talk and built upon it a great question - The software creation world is changing, should the testing definition expand alongside it to encompass more than the traditional position of testing? 
After the lightning talks, we had and open space where everyone who wanted could raise a subject, and we had six rounds of sessions (3 before lunch, 3 after). Choosing between talks was really difficult, to the extent that I found myself regretting suggesting a talk\discussion, as it was impossible to find a slot that didn't have at least one talk I really wanted to go to. By the end I went to a discussion about how to improve the contribution of a non-coding tester who moved in to the developers' room, and is moving into agile. Despite the fact that I went to this talk to try and help someone in need, I found some of the advice really interesting. 
Next, we had a discussion on "who should be automating what?" which was a title I gave in order to try and see if the role of having some person whose sole responsibility is creating test code. The discussion was quite interesting, but I think it derailed a bit in the into speaking about how does the automation looks like in each of our teams.
Then Was a combined session on creating a global reputation with a bit of community building - we were a small group (4 or 5 of us), but the discussion was fairly interesting, and when the buzzer hit for lunch, it felt way too soon.
After lunch (which was nice, we even got a beer and had some nice discussions that I have no recollection of, besides feeling they were pretty fun to have) we did a quick threat modeling intro session (I really want to perfect this one out), followed by a massive conversation about types of failures we've all seen at some point and might want to be more weary of in the future.
The last formal discussion I took part in was a question I raised - how to wake up testers back at work? how to make sure that the company culture is encouraging learning and developing testing skills? I can't say that I know what will I do when I get home, but I do have some processing to do.
There were, also, some sessions I really hated to miss out - from  Natalie's session about linux command-line tools (some of them I know and use a lot, others less so), Matt's session on "interviewing testers" (he had a better name for that), "you can't outsource trust" and "the skillset of tomorrow tester".

Following that packed day, we went on a diner cruise, and had the opportunity to watch Matt's kind tomfoolery, and I got to know a bit better some of the people around.
So, all in all, a great day.

And, in Monday, CAST begins!

Friday, August 5, 2016

Page objects are not enough -Pt.2

Disclaimer - code post, hence, English only.

In a previous post, I mentioned that page objects are not enough, and introduced the concept I call "flows" (I can't take credit for the name - it was already in use when I first got to work). The idea, basically, is to add a layer between the tests and the page objects that will be responsible of complex operations that are not in-scope for a single page object.
However, the flows have some limitations and while better than using raw page-objects, it can still be inconvenient to the point where we said "There must be a better way to do this". 
The main problems we were seeing were: 
  • We used static flows, which meant that we were sending a ton of parameters for each flow - which suffers from readability & usability issues similar to  what can be seen in telescoping constructors.
    Essentially, a call to a flow would look like this:
    PurchaseFlows.checkout(driver,reporter,baseUrl,cardDetails,null,null,false);
    Where the function signature is:
    public static checkout(WebDriver driver,Reporter reporter,String baseUrl,CardDetails cardDetails,SHIPPING_OPTIONS shippingOptions,String discountCoupon,Boolean shouldAbortPurchase){...}
  • Code duplication
    Every now and then we wanted to do "this flow, only change this little thing" and this tiny change, in the middle of the flow, forced us to create another flow (or, when we were lazy, to add another parameter to the flow, which will be null 95% of the times it will be called, as in the previous code snippet).
  • multiple functions doing the same business action. It's partially connected to the previous point, but using the naïve version of flows will end up having many flows that are similar in terms of business logic, but different in implementation (for instance: "purchase a book and register" is similar to "purchase a book with a registered user" and "purchase a book without registering")
  • Ugly tests.
    Since we had several flavors in our system, writing a test that will simply perform a single purchase looked like this:
    if (isCardSmsEnabled){
         SMSFlows.checkout(driver,reporter,baseUrl,preferredPhoneNumber,otp, null);
    }else if (isPurchaseWithPassword){
        PasswordFlows.checkout(driver,reporter,baseUrl,password,null,false,null);
    }else{
       NonRegisteredFlows.checkout(driver,reporter,baseUrl,cardDetails,null,null, false);
    
    }
    Sure, we could put this logic in a seperate method, except that then we would have doubled the parameters that should be null (why would an SMS enabled purchase need a password?)
  • Refactoring is painful.
    When we began, we did the mistake of sending username & password as strings. At some point it didn't work anymore and we moved to sending a "User" object. Now I had to go over each and every flow and change them to support this new behavior - and it took me 3 days of knowing that I could have been doing something useful with my time instead of this partial refactoring. Why partial? because I didn't go and change all of the calls to the flows - If there were more than 5 calls to a flow with username and password, I just left it lying around, which I could do only by overloading the methods to support both calls. 
So we clearly needed to find a solution. We wanted this solution to be simple to use, flexible and as future-proof  as we could get it. Each of these properties came from a pain we experienced:

  • Simple to use - This includes both not having a large number of parameters and not having to worry about the different flavors in our system. It should be "write once, run with all configurations". The pain here was what is described in the 1st and 4th bullet above. 
  •  Flexible - we should be able to change the "default" behavior in a test without too much of a fuss and without causing ripples that will affect other tests. The story behind this was the one that made us realize our flows solution was not good enough anymore. We had a new timeout feature: after a certain time from the purchase start, if it was not completed, end the session and fail the purchase. Now, imagine what was the situation we were in: the flows didn't have any notion of "wait", and each flow was passing anywhere between 1 and 4 screens that we wanted to wait for a while before submitting the page. In the flows world, the choice was between sending a complex "sleep in step X for Y seconds" parameter or duplicating the flows to create "TimeoutFlows" that would have a method for each of the waiting places. Either way - Yuck!
  • Future proof -  The idea here is to avoid two kinds of problems: The application changes in a place shared between multiple flows, so we want to make the fix in one place only, and not in each flow, and we wanted to lower the cost of refactoring - even if we change a method signature. 

The solution we came up with is simple to describe but complex to implement, as what we did is to take that awful complexity that is part of our product's business logic and hide it elsewhere.
It has the following parts:
  1. Commands - each step that we consider to be a single action (clicking "next", filling a form, validating a value against the database, you name it) is encapsulated within a command. You can check the command design pattern in Wikipedia, but the general idea is that it doesn't matter what lies beneath the surface, externally, there is only an "execute" method that is exposed. We cheated a bit and have two methods ("run" and "runCancel"), but the idea that every command exposes the same interface still stands.
    example:
    public class FillPasswordCommand implements ITestCommand {
     WebDriver driver;
     PasswordContext passwordContext;
     IStepResult result;
     public FillPasswordCommand(WebDriver driver,ITestContext context,IStepResult result){
      this.driver=driver;
      //see explanation for this below
      this.passwordContext=(IPasswordContext)context;
      this.result=result;
     }
     public IStepResult run(){
      PasswordPage page = new PasswordPage(driver);
      //skipped some verifications to keep the example short
      page.fillPassword(passwordContext.getPassword());
      page.clickNext();
      result.addScreenShot(driver,"after filling password");
      return result;
     }
    } 
  2. Context chameleon objects - This part is a bit odd, and the reasoning behind it is that we had the following conflicting requirements:
    1. The context should contain every bit of information that any command might need, now or in the future
    2. The context object shall not have too many methods (the idea is to utilize efficiently the IDE auto-complete functionality, which won't be very helpful if you have over 100 methods)
    3. There will be only one context object that will be used to create multiple commands. 
    The solution we came up with was to have multiple context objects, and then combine them all into some sort of a Megazord (for those who have failed the age\culture test - a Megazord is the giant robot resulting from combining the power-rangers personal robots together). The object can then be cast to represent any of the underlying objects. So we might have "IUserRegistrationContext","IDbConnectionData" and "IPurchaseContext" all bundled together. As the code itself is neither short nor is it self explanatory, I won't include a code sample, but the idea of what we did is as follows: For each type of context we wanted we created an interface  (the "I" at the beginning is marking "interface"), then when we want to merge a couple of these we create a Java proxy object that answers for all interfaces implemented by both contexts. The InvocationHandler is just holding the two contexts and redirecting the calls appropriatly.This was also the first time I looked at a Java code example and did not understand what I was reading1.. All of the contexts are initialized at the setup method of our base test, and each specific test needs only to change the relevant context values that matter to it (plus, the defaults match most of the use cases, so a test won't need to change many parameters.
  3. Commands runner - This entity holds a chain of commands and is responsible to run them one after the other. In case that I want to change something - say, click "cancel" after the 3rd screen I see, the runner is the one responsible to do that for me. I want to sleep 2 seconds between commands? The runner again. I want to add a specific command somewhere in between the existing commands? I will have to do this before calling the runner to execute the steps.
  4. The Flow Factory - Remember that I said that we hid all of the complexity in another place? well, this is that other place, or at least - most of it. This part returns a runner with the chain of commands built inside.
    Here we read the context objects, build new command instances in the right order and return them to the test. Since the logic it encapsulates is complex, we have broken it into ~5 different classes, just to keep things readable.
    How complex it is? well, when we started, we created a decision chart. It now has some additional nodes that make it just a bit more fun. (It is redacted, since I don't know how much I can share, so I left the interesting questions out, but the decision tree structure remained to illustrate the inherent difficulty).
    Using the factory, one the other hand, is really simple. here's an example:
    userActionContext.setUserAction(ACTION.FAIL);
    purchaseFactory.createPurchase(context).run();

So, a short summary of the test-commands is that the tests are sending context to a factory in order to get a runner that will execute the required actions. And that's it.
What did we gain from this construct?
Well, quite a bit:

  1. The test does not call a method with fifty parameters, out of which half are null. We could have gained most of that by using non-static flows, but I feel this works better also in this aspect. 
  2. All of our tests are now configuration oblivious (to the extent that the business logic does not change according to those configurations) - we don't have to worry about getting the correct flow. 
  3. We have the ability to intervene in the middle of a chain without creating a new flow - so no code duplication. 
  4. Adding new behaviors is actually easier & faster - since every part of the chain creation is isolated, we don't need to create the whole flow from scratch (or, as was common - copy, paste & edit), we can just add the needed code at the right point. For example - when we added a new challenge (we had password & SMS, we wanted to add another one), all that it took was to add the code that deals with the new screens to the switch statement dealing with the challenge type - and did I mention that all of our tests now supported this new challenge? this is really the point where I wanted to shout "presto!"
  5. Writing tests got shorter to a third. Not "by a third", to a third. It also enables us to focus our attention on the important stuff that are developed instead of making sure our tests are compatible with the multitude of flavors our product has.

As you can see - there's quite a lot of work to get to the point where the commands are working, and it might not be intuitive at first. It has some advantages over the flows implementation, but those advantages do not always outweigh the drawbacks of high initial cost. So, when to use what?
If your application has a small number of atomic actions (by that I mean "things a user would consider as a single action"), and they are strongly distinguished from one another - Flows are probably OK for you. If, however, there are a lot of similar actions or they change rapidly - commands are probably better. Currently, we consider using a slightly different approach for dealing with situation where a user will perform more than one action ("go and buy something" is one action, but "check user history, then unlock the user account and reset the password" are three separate actions) - the concept of the commands will probably stay, but we consider replacing the factory in a builder. The difference is that in a builder we could do something like
builder.login().checkUserHistory(user).unlockUser(user).changeUserpassword(user,newPass);
But, we'll have to wait for a trigger to start working on that  - implementing such a solution would not be short and just like everyone else - we have more improvements we want to make than time to implement them.
I hope you'll find this idea useful, if there are any questions (I did try to explain what we do with the commands, but I feel it might not be as straightforward as I think it is) - don't hesitate to ask.



1  Reflection in Java, and proxies in particular, can be a bit confusing when you first encounter them. If you are a bit confused as I was, all you need to know is that a Java proxy has two parts: A list of interfaces that it is faking and will answer true for "instanceof" queries, and an invocation handler, which is the part that is responsible to actually do something when a method is called. It can be as simple as just returning null value,  adding a delay or counting the number of times each method was invoked for this specific object, or it could be as complex as you would like it to be. ↩

Thursday, August 4, 2016

האם בודקי תוכנה צריכים ללמוד אוטומציה?

As a software tester, do I need to learn about automation?

English first, as this is (sort of) a response to something I saw.

The answer to this question is NO. In fact, I would say the answer is "Don't you dare doing that". Instead, learn to program (or, if you insist, to code). 
I have encountered this post, and at first I thought to myself: "great, here's another one who calls test programming 'automation' ", when I saw this: "You don’t need to complete all of the lessons unless you want to. You’re not trying to become a developer, you need to know ‘just enough’ to be getting on with for now."
And this is why I don't like the "automation skill" talk. A test code project is a coding project in every aspect, and taking part in it does require being a decent programmer. Otherwise, you'll be digging yourself a hole that will be quite difficult to get out from - It could be poor infrastructure that will bite back in a 6 months time, it could be weak automation that only moves the browser around since this is all you've learned. Heck, it might even be that you need to write a multi-threaded test, only you have never before encountered the concept of threads since you were learning "automation" instead of programming. 
So yeah - programming is not difficult, and every tester would benefit from having some programming skills, just stop blinding yourself by calling it automation and regarding it like 2nd grade programming.

---------------------------------------------
התשובה לשאלה הזו היא לא בל' רבתי. אין לאף אחד שום סיבה ללמוד "אוטומציה". 
במקום זה עדיף ללמוד תכנות. 
נתקלתי במקרה בפוסט הזה ובמבט ראשון אמרתי לעצמי "נו, הנה מישהי שכותבת אוטומציה כשהיא מתכוונת לתכנות. ניחא". אבל, אז הגעתי למשפט שאמר (בתרגום חופשי שלי, המקור למעלה) - "זה בסדר לדלג על תרגילים, אתה לא מנסה להיות מפתח,  אתה צריך לדעת בדיוק מספיק כדי להסתדר". 
וזו בדיוק הסיבה בגללה אני לא אוהב את המונח "כישורי אוטומציה". פרוייקט אוטומציה הוא פרוייקט תכנותי לכל דבר. ככזה, הוא דורש מתכנתים שיודעים מה הם עושים כדי להצליח. אחרת, אנחנו חופרים לעצמנו בור שיהיה קשה לצאת ממנו - זה יכול להיות כי התשתיות שנכתוב כ"מפתחי אוטומציה" יהיו גרועות מאוד ונצטרך להחליף אותן ברגע בו נפסיק להתלהב מכך שכתבנו משהו שפחות או יותר עובד. או אולי פשוט יהיו לנו בדיקות חלשות כי כל מה שלמדנו לעשות הוא להזיז את הדפדפן קצת, אז אנחנו לא מסתכלים על מסד הנתונים. על דברים כמו מולטי-ת'רדינג (שקלתי לכתוב ריבוי חוטים והגעתי למסקנה שזה נשמע טפשי) אפילו לא נדע לשאול כי למדנו "אוטומציה" במקום תכנות. 
אז כן, זה לא קשה לתכנת, וכדאי מאוד שכל בודק תוכנה ידע לעשות את זה. רק בשם שמיים - תפסיקו לקרוא לזה "אוטומציה" ולהתייחס לזה כאל תכנות בחצי כוח. 

Monday, July 25, 2016

זמן ומוטיבציה

Time and Motivation

דמיינו את הסיטואציה הבאה: אתם נמצאים ללא אינטרנט, אבל מול עמדת מחשב.למשך לילה שלם. בערך פעם בשעה מצלצל הטלפון הקווי ואתם צריכים לעדכן טבלת אקסל ומשהו בתוכנה ייעודית כלשהי. בערך חמש דקות עבודה. מה תעשו עם שאר הזמן? אפשר להביא ספר, אבל למי יש כוח לקרוא באמצע הלילה?
אי אז מזמן, בטרם היות הטלפונים החכמים, הייתה רק תשובה אחת - משחקים סוליטייר, או שולה מוקשים.
לא מזמן, הודות לצה"ל, מצאתי את עצמי בסיטואציה כזו - מול עמדת מחשב מנותקת מכל דבר שמזכיר אינטרנט (בסך הכל - מערכות צבאיות הן לא משהו שאנחנו רוצים שידלוף החוצה), בלי פלאפון ומחכה שמשהו מעניין יקרה. כדי להוסיף חטא על פשע, המחשב הוגדר כך שהמשתמש שניתן לי היה בעל הרשאות מוגבלות למדי - כל מה שאפשר לפתוח הוא התוכנה הצבאית ומגוון תוכנות אופיס. זהו.
כדי להילחם בשיעמום נקטתי בגישה בה נתקלתי אי אז אצל ג'יימס באך - "אני יודע מה זה, המחשב הזה הוא תחנת אימונים לבודקי תוכנה!". פתאום יש לי מה לעשות. האתגר שבחרתי לעצמי - האם ניתן לעקוף את המגבלות שהוטלו על המשתמש שלי ולעשות דברים מעניינים יותר?
התשובה, בקיצור, היא "כן" (אחרת לא היה לי מה לכתוב). בערך אחרי שעה מצאתי את פריצת הדרך הראשונה שהובילה לכך שהיה לי ממשק של powershell פתוח על המחשב, עם גישה לכל מיני קבצים שאין אליהם גישה דרך הממשק הגרפי. לכאורה - ניצחתי, לא? הוכחתי שניתן לעקוף את מערכת ההרשאות עד מידה מסויימת. אבל כמו שהזכרתי קודם - היה לי משעמם, ורציתי לעשות משהו. ביליתי קצת זמן בלנסות להבין את מימדי הנזק שאני יכול לגרום (כמובן, בלי לגרום נזק של ממש - זו לא הייתה המטרה שלי), ואחרי ששכנעתי את עצמי שאני יכול לנסות להפיל את העמדה שלי ע"י מילוי הכונן הקשיח, או לנסות להציף את הרשת בבקשות PING ברשת הפנימית הצבתי לעצמי אתגר מעניין יותר - האם אני יכול להפעיל סוליטייר על המחשב? אני באמת לא בטוח מתי בדיוק הידע הזה נכנס לי לראש, אבל זכרתי שההתקנה הסטנדרטית של סוליטייר נמצאת תחת system32 (בחלונות XP) ולכן גיליתי די מהר שהמשחק לא מותקן.
חבל מאוד. כאן הגעתי לגבול הידע שלי, והמשכתי להעביר את הזמן במשמרת
אחרי המשמרת שלי, ניצלתי את האינטרנט בפלאפון כדי לשאול "איך להתקין סוליטייר משורת הפקודה?" מסתבר שזה ממש פשוט. במשמרת הבאה כבר שיחקתי בסוליטייר.
בסיכומו של עניין, בתוך מספר מועט של שעות (פחות משלוש שעות עבודה נטו, כולל חיפושים באינטרנט בפלאפון שנעשו הרחק מהמחשב) הצלחתי להגיע לקבצים שלא הייתי מורשה לראות, ידעתי לומר שההגנה על הregistry נאכפת היטב, מצאתי דרך להריץ קוד על המחשב ודרך נוחה למדי לכתוב אותו, והצלחתי "להתקין" משחקים (שכבר היו מכווצים על המחשב - לא חיברתי שום דבר שהגיע מחוץ לרשת המאובטחת). עשיתי את כל זה למרות שבתחילת הדרך ביליתי כשעה בניסיונות סרק שלא הובילו אותי לשום מקום. למה המשכתי? כי היה לי זמן לשרוף, וכי שיעמום הוא מניע חזק - אני רציתי סוליטייר, ועד שלא הגעתי למטרה שלי, לא עצרתי. מסתבר שעקשנות, התמדה או איך שלא תרצו לקרוא לזה, היא כלי חזק להחריד.
עכשיו נשארו רק שני דברים לעשות - למצוא מישהו שאני יכול לדווח לו על חולשות האבטחה במערכת, ולהבין איך אני מתרגם את דפוס ההתנהגות הזה לעבודה היומיומית.

-------------------------------
Imagine the following situation: You are sitting in front of a computer, with no access to internet at all, for a whole night. Once an hour, or so, the phone rings, and you have to update something on an excel sheet and another on a custom management system. All in all, a phone calls takes 5 minutes to handle. 10 if you try to stretch it. What would you do with the rest of the time you have? Perhaps you would bring a book, but frankly - reading at the middle of night can be taxing. There was a time, before smartphones, where the most common answer to such a situation was "Solitaire" (or minesweeper).
Not long ago, at the courtesy of the IDF, I found myself in such a situation during reserve duty. Naturally, I won't go into details, but I think that without breaking any rules or exposing classified information, I can safely say that I found myself in a similar situation. A lot of dead time in front of a computer with an occasional interruption every now and then. No internet, phones are not allowed (since they can be used for remote eavesdropping) and nothing really interesting to do. Worse: I was using the computer with an underprivileged account that enabled me access only to what was necessary to do the work I was called to do - A dedicated piece of software and a couple of office programs. Bummer.
So, to fight boredom off, I took an approach I saw at one of James Bach's videos - "I know what this is. This is a tester workout station".Suddenly, I had something to do. The challenge I chose for myself (or my charter, if you would prefer it), was to try and bypass the extreme limitation imposed on my user. Could I do something more interesting? The answer, by the way, is yes. I could (otherwise - nothing to write about, write?) It took me about an hour to get my first breakthrough that gave me a powershell interface.  Regular DOS was blocked for my user, so opening powershell was definitly something I was not supposed to do. In addition, Through powershell, I could access files that I was not able to access through the GUI.
As it seemed - victory was mine, right? opening a shell is usually refereed to as the hacker's end-game. But, as I have mentioned, I was bored, and thus I started looking around to see how extensive can I damage the system (with the obvious limitation of not actually wanting to do any damage, or any noise that might be noticed from the outside). I have convinced myself that I could, in theory, flood the internal network in ping requests, learned a bit about the underlying technologies used in the software installed on this computer and then went looking for solitaire under system32. Sadly, it wasn't there, and I concluded this shift.
During my off time, away from any sensitive data, I used my phone to google out some instructions and found out that I could actually install (or rather, extract) solitaire manually without doing something I know was monitored such as plugging in a USB drive (besides, if you ever work on a sensitive system, don't insert any media that was in contact with the outside world, you might end up with stuxnet). Thus, 10 minutes after my next shift, I got to play solitaire & minesweeper.

What really got my attention, except for the fact that in less than 3 hours of work with very limited resources, I knew quite a bit more about a system than I was supposed to (for instance, I know that the registry was write protected properly, but I could read the entire tree, which could have been helpful to an attacker familiar with the registry), was that I managed to do so despite my first 30 minutes were terribly frustrating - everything I tried was either blocked or futile. In a normal situation, I would have probably gone to check other things and say "this is safe enough". This time, as I had both plenty of time and motivation (boredom is almost a strong motivator as laziness), I just went on and on until something gave in. Persistence seems to be quite a strong tool.
Now, i have to do two things - find someone to report this bug to, and figure out how to translate this work pattern to my daily job. 

Friday, June 24, 2016

Only in JeST

ביום שני האחרון היה מפגש JeST, שהיה קטן מהרגיל, אבל, אולי בזכות העובדה הזו, מעניין במיוחד. אפשר להתחיל ולהעלות שאלות פילוסופיות על למה אין יותר בודקים שטורחים להגיע לאירועים מהסוג הזה (בכנות, אין לי מושג למה - זו הזדמנות להכיר אנשים טובים ולשמוע דברים מעניינים. ברנדן קונולי כתב על זה בדיוק לא מזמן), אבל בסופו של יום, היה אירוע, הוא היה מעניין ואני רוצה להשוויץ כי אני הייתי שם ואתם (בהסתברות גבוהה) לא. 
בניגוד לנוהל הסטנדרטי בJeST, התחלנו עם הרצאה קצרה שנקבעה מראש. בכנות? לא נהניתי ממנה כמעט בכלל. הנושא עצמו היה עשוי להיות מעניין "חוויות על עבודה בסקראם", אלא שההרצאה עצמה הייתה נטולת תוכן. כמעט הכל נשאר ברמה הכללית, כי למרות שהסיפור היה על עבודתו של הדובר בצוותים שונים, נשארנו רחוק מאוד מפרטים שניתן היה ללמוד מהם, והסיפור כולו היה "בצוות אחד לא עבדנו בסקראם היטב, בצוות שני כן, ובעוד צוות אני מנסה לתקן את המצב". בסדר. שיהיה. 
בהמשך חזרנו לנוהל הרגיל בו כל אחד מהנוכחים רשאי להעלות נושא אחד או יותר עליו הוא רוצה לדבר, או לשאול. לטובת האורח שהגיע אלינו מחו"ל (בחור חביב בשם גולדן הגיע מהודו ואיכשהו מצא את המפגש הזה) ולא הכיר את הכללים, אחרי שאנשים העלו כמה נקודות בהן הם רצו לחלוק מידע, העליתי שתי שאלות ונושא נוסף. השאלות עצמן מעניינות אותי, אבל המטרה המרכזית שלהן הייתה לעודד את גולדן להשתתף גם הוא ולהעלות שאלה (הוא הציג את עצמו כמי שחסר ניסיון באג'ייל ומטרתו הייתה ללמוד קצת מאחרים על איך הם מתמודדים עם זה, כך שרציתי לעודד אותו להוסיף נושא בעצמו). 
בסופו של דבר, נבחרו שני נושאים נוספים על ההרצאה הפותחת, שבעקבותיה התפתח דיון קצר על התנהלות בסקראם, או בכלל. 
הנושא הראשון היה הצעה שלי - מידול איומים והקשר שלו לבדיקות תוכנה. בגדול, הצגתי את מה שכתב אדם שוסטק (ועל זה כתבתי בהרחבה כאן) כאשר מה שהיה מעניין מבחינתי הוא התרגול בדיבור על הנושא והשאלות שעלו בעקבות ההרצאה הקצרה שלי. איכשהו, בספרינט שכמוהו טרם ראיתי, הצלחתי לכסות את הנושא בשתים עשרה דקות (חמש דקות של חריגה משבע הדקות שהוקצבו לי, אבל בהתחשב בזמן שבילינו בשאלות אחר כך, אני חושב שהצלחתי לעניין את הקהל מספיק). אחרי שיישרנו קו והבנו יחד על מה מדובר, עסקנו קצת בשאלות על איך ומתי נכון ליישם את הטכניקה הזו (התשובה שלי - עכשיו, וכל הזמן. ההמשך תלוי במודל הפיתוח), ועל האם ניתן ליצור איזשהו סטנדרט שיספק פיתרון "בטוח" לסיטואציות מסויימות (התשובה לזה, כמובן, היא "לא", בדיוק כמו שקל מאוד להשתמש בהצפנה חזקה באופן לא מאובטח). 

אחרי דיבר איסי על פילים לבנים, מה שהעלה את השאלה המעניינת - איך ניתן לזהות אותם מוקדם, ומה ניתןו לעשות איתם? איסי גם העלה שאלה מטעם שמואל שנאלץ לפרוש מוקדם - האם לפילים לבנים יש ערך? מה זה פיל לבן? איסי כתב על זה יפה מאוד כאן. 

בקיצור, מה שאני מנסה לומר הוא זה - אם יש לכם הזדמנות, לכו למפגשי בדיקות, זה מעניין, ויש שם הזדמנות גם לפגוש אנשים, גם להיתקל ברעיונות חדשים, וגם לדבר קצת בפני קהל ידידותי. 

שבת שלום

-------------------------------------
Last Monday, I attended JeST - A testers meetup in Jerusalem. Besides the fact that Jerusalem is a great place to be in (and, not living there currently, it's also a good place to pay a visit every now and then), Testers meetups are awesome. Seriously, I don't understand why there aren't more testers coming to such events. But, this isn't the subject (it was covered nicely by Brendan Connolly in his post about "black matter testers"). I want to show off a bit, since I was there, and you - most probably - were not (The meeting was a bit smaller than usual - but we had a guest from India who happened to be in the area and somehow found the meetup, which is very cool).  
Unlike the Usual JeSTs, this one had a first predetermined talk. The subject was "Testers in (fr)agile world", or, as the speaker put it - A talk from the scrum trenches. I think such a talk could have been interesting, but sadly - it was not. The talk itself can be summarized to "I worked in one team that did scrum poorly, then in another one that did great, and I intend to improve the team I currently in". There was very little to hold onto in the talk - maybe it was the English (In order to accommodate the guest, we held the meetup in English), maybe it was something else, but I could not find anything tangible that was different from a generic case study - no analysis of why things work and why they didn't, and very little I could try to see if is applicable to my team (that's my problem with experience sharing - it has to be done pretty well in order to be interesting to others).
However, after that slow start, we had a short discussion about Agile (in capital A) and Waterfall, and anything in between which was fairly interesting - the good point about small meetups is that we had the privilege of actually having a discussion between everyone instead of a format where everyone gets to talk once or twice and then the time runs out. 
After that (or was it before the actual first talk?), we did the usual shtick of JeST, which is to raise subjects in a manner similar to lean coffee. I actually had three subjects to raise - a couple of questions and a subject I wanted to share with the group. For the questions, I had a double motive in raising them. The primary was, of course, to have them answered, or discussed, but the secondary motive was to encourage Golden, our guest to participate as well (When he presented himself, he said he was just transitioning to agile and came in order to learn from others' experience, so I assumed he will be more comfortable raising a question instead of standing in front of a bunch of strangers sharing experience that might not interest them, so I wanted to show that even raising open questions without answers is OK). 
By the end of the voting, I found myself standing up and giving a lightning talk about threat modeling - I was awfully unprepared, and I would be far more comfortable speaking about it for an hour with a prepared slideshow, but I did it anyway. By the end, I managed to say most of what I wanted in ~12 minutes (which was five more than the seven I was initially allocated, but judging by the questions afterwards, I would guess I had the audience interested. 
For me, the most interesting part wasn't the talk itself (which is basically repeating what I read in Adam Shostack's book on which I wrote in length here), but rather the questions that came afterwards. After we had the basics covered, we discussed a bit when should this activity take place (My answer - right now, and at all times. The rest is depending on how you develop software), and whether someone could just use a standard solution that will be secure for some common problems (Obviously - no. Even if we look on cryptography  - people are using perfectly sound encryption algorithms in a way that renders them completely insecure, and the whole notion of security is even more ambiguous than "simple" encryption). 

After my talk, Issi talked about a subject he touched in his recent blog post - white elephants. We then had a nice discussion of how to identify white elephants, what to do with them and whether or not they have value (Sadly, Shmuel had to leave early, but Issi told us about his opinion that those white elephants still have some value in PR, or even in giving someone something interesting to do for a while). 

All in all, I had a great time (and I'm not even counting the way back, during which I talked with Kobi about some other subjects as well. My message is this - If you have the chance, go and participate in such a meetup. It's a great opportunity to meet new people, hear about new ideas and have the experience of sharing your ideas in a friendly group. 

Thursday, June 16, 2016

לדבר זה מפחיד

Talking is scary

היום, לראשונה בחיי, מצאתי את עצמי מדבר בפני קהל שאני לא מכיר. ההקשר - מיטאפ סלניום שמתקיים בארץ. הקרדיט ברובו מגיע למנהל שלי שהעלה את הרעיון והציק לכל מי שהיה צריך כדי לגרום למפגש להתקיים (ועוד במשרדים שלנו), ולאדם כרמי שמארגן את המפגשים האלה כבר שנתיים וחצי בערך. אני, כמו שמקובל לומר - רק עובד כאן. אחרי שכבר דיברתי בפני כמה אנשים בעבודה וגיליתי שאני מסוגל לבנות הרצאה די אפקטיבית, הרגשתי די בטוח בעצמי. מעבר לכך, לא העברתי את ההרצאה הזו לבד, אלא הגשתי אותה במשותף יחד עם המנהל שלי. אפילו התכוננו היטב להרצאה - העברנו אותה פעם אחת זה לזה ובפעם השנייה הצגנו אותה בפני הצוות ואז גם קיבלנו כמה הערות עם פידבק חיובי מאדם שסקר את המצגת וידע להצביע על נקודה מסובכת כדי שנפשט אותה.  
לכאורה - תנאים אופטימליים. מגרש ביתי, הכנה טובה, עוד מישהו שאפשר לסמוך עליו. 
בפועל, מפחיד לאללה. משהו במעמד הזה של דובר בכנס עם אנשים זרים (אני לא בטוח כמה בדיוק הגיעו, אבל נדמה לי שהיו בסביבות חמישים או שישים) היה מלחיץ. או, כמו שאמר לי המנהל שלי אחר כך - "אף פעם לא ראיתי אותך ככה". וזה נכון - בערך שעה לפני האירוע הייתי חסר מנוחה, וברגע בו ההרצאה התחילה, יכולתי להרגיש את הלחץ מפריע לי. למזלי, כל מיני תופעות עליהן בעיקר קראתי כמו שכחה מוחלטת או שפת גוף קפואה נשארו בגדר שמועות בלבד ואני חושב שההרצאה הלכה בסדר גמור (דעתי אולי תשתנה אחרי שאראה את ההקלטה), אבל אני למדתי שיעור שכנראה לא יכולתי ללמוד בשום דרך אחרת - לדבר בפני קהל זר זה מלחיץ, גם כאשר כל שאר המשתנים פועלים לטובתי. וכשאני לחוץ, אני מדבר מהר יותר ובמשפטים מובנים פחות (ועל פסקאות אין בכלל מה לדבר). עם זאת - מתישהו תוך כדי ההרצאה הלחץ הזה דועך ואני מתחיל לתפוס קצת קצב - אני מניח שבעזרת אימון אצליח לצמצם את כמות הזמן שנדרשת לי עד שאני נכנס לתוך זה. 
חוץ מזה, כשהקשבתי לדובר שעלה אחרינו למדתי שכמאזין, זה לא כל כך מפריע לי אם הדובר מגמגם או אומר הרבה "אמממ..." בתנאי שהתוכן בהרצאה מעניין. 
עכשיו, נשאר לי רק ללמוד, לתרגל ואז לתרגל עוד קצת. 

----------------------------------------------------------------------
Today, for the first time in my life, I found myself speaking in front of a bunch of people I don't know. The occasion was a Selenium meetup here in Israel. Most of the credit for this goes to my direct manager who came up with the talk idea and pushed forward until we could host the meetup at our office, and to Adam Carmi who has been organizing those meetups for approximately two and a half years. Me? as the saying goes - I just work here. 
Anyway, after giving a couple of talks at work and finding that I can build a well structured lecture (with decent slides as well), I was feeling pretty confident. Moreover - I co-delivered this talk with my manager, so I was not facing the new situation alone. We even prepared properly and after deciding on the content we did a dry run between us two, then another in front of our team (and department director), and we got some good feedback from Adam who reviewed the presentation and pointed some complex things we then simplified. All in all, the best conditions one could hope for. 
In practice, however, it was super scary. There something in the position of standing up in front of a whole bunch of strangers (I think there were around 50 of them) that is simply stressful. Or, as my manager said afterwards: "I have never seen you stressed like this" - which was true. About an hour before the event I was restless, and once we actually got to talking, I could feel the stress settling in and interfering.  Luckily, many symptoms I read about such as forgetting what I wanted to say or having a frozen body language remained a far rumor, and I think that overall it went pretty well (I might change this opinion after I'll watch the video recording), but I learned a lesson I couldn't learn any other way - Speaking in front of strangers is stressing, even when all other parameters are in my favor. Also, when I'm stressed I speak faster, and with less structured sentences (not to mention paragraphs). On the other hand, at a certain point the stress effect is lessened to a level I almost don't feel it - I assume that with some practice I will be able to reduce that amount of time. 
A second thing I learned when I got to listen to the lecture after us was that as a listener, I don't really mind it when a speaker is not giving a good show, reads from the presentation and uses a lot of "Umm...", if the content is interesting (what really bothered me were typos in the presentation, so don't make those). 
Now, all I have to do is to learn a bit, practice a bit, and then practice a bit more. 


Tuesday, June 14, 2016

European Testing conference call for collaboration is up

Well, for the slim chance that there is anyone reading my blog who hasn't heard of this already, the European Testing Conference has opened a call for collaboration. If you have ever even remotely considered presenting at a testing conference, this one is for certain one of the better options out there, if not the best.
I assume that reasons for submitting a call are different for each and every one, so I want to give my personal reason for wanting to speak at a testing conference (and particularly on this one - I'll submit an initial proposal once I'll muster my guts)  - I have so far attended exactly one testing conference, which was the previous ETC. For me, the experience was amazing - feeling the energy around and getting to meet some cool people, not to mention a whole bunch of interesting ideas I got exposed to.
When the conference was over, I noticed an odd thing - almost everyone I had a conversation with (or rather, everyone but one exception) was a speaker at the conference (and in most cases I did not know this before we somehow ended talking). So, I don't really know what is it that made the speakers at the conference to stand out like that, but I kinda want to join this group - both to have a chance to speak with some of them a bit more, and to check whether it's the personality who makes the speaker, or the speaking that have an impact on the person (with myself as a guinea-pig).
So, go submit your proposals! If you have never done such a thing yet and feel the need for some help, try contacting SpeakEasy, they're great (and I'll write a more detailed post about it in the future)

-------------------------------------
לקוראי העברית שאיכשהו הגיעו לכאן ולא יודעים עדיין - כנס הבדיקות האירופי (השני) פרסם קריאה לשיתוף פעולה (מה שבכנסים אחרים נקרא "קריאה להגשת הרצאות" או משהו כזה). אם אי פעם אפילו רק שקלתם לדבר בכנס בדיקות בינלאומי, זו אחת האפשרויות הטובות ביותר, אם לא האפשרות הטובה מכולן. 
כיוון שיש הרבה סיבות להגיש הרצאה לכנס, אני רוצה לתת פה בקצרה את הסיבה שלי לרצות לדבר בכנס (ובפרט בכנס הזה - ברגע בו אאזור די אומץ אגיש את ההצעה שלי) - עד כה, השתתפתי בכנס בדיקות אחד בדיוק. הכנס הבדיקות האירופי הקודם, והחוויה הייתה מדהימה. המון אנרגיה באוויר, המון אנשים טובים והמון רעיונות מעניינים שיצא לי להיחשף אליהם. אבל, אחרי הכנס שמתי לב למשהו מעניין - כמעט כל מי שדיברתי (ולמעשה, כולם למעט אחד) איתו העביר הרצאה בכנס. ברוב המקרים שמתי לב להרצאה שהעביר אותו אדם רק אחרי שיצא לנו לדבר. בקיצור - משהו בחבורה הזו של דוברים בכנס היה מיוחד, ואני רוצה גם. גם הזדמנות לדבר איתם טיפה יותר, וגם לבדוק אם זה המרצה שמלכתחילה היה פתוח יותר לדיבורים ופחות נחבא אל הכלים, או שמשהו בכל החוויה של להעביר הרצאה שהפך את המרצים לאנשי שיחה יותר מאשר האחרים. במקרה, יש לי שפן ניסיונות זמין (אני) כדי לנסות להכריע בשאלה הזו. 

בכל מקרה - לכו להגיש הצעות. אם טרם עשיתם זאת מעולם, נסו לדבר עם SpeakEasy, הם אחלה (ואני אכתוב בהרחבה עליהם בהמשך).