GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing kroartem.wordpress.com — kroartem

← Older posts

Back from stasis

Posted on October 16, 2018 by kroartem

Hello again, long time no see! That’s the phrase I usually say 🙂

A lot of things have changed since my last post. Currently I’m working in Wrike as QAA Engineer. As my work is again (surprisingly!) related to web-development and web-testing, I’m planning to write a bunch of notes here about WebDriver and all this stuff. Stay tuned!

Posted in Uncategorized | Leave a comment

When you see warnings everywhere

Posted on May 19, 2017 by kroartem

Just got an email from one of online shops and one thing made me feel a bit uncomfortable. Can you guess why?

checkstyleV2

Yes, the answer is simple. The underline heavily reminds about CheckStyle

checstyle

Posted in Uncategorized | Leave a comment

Autologin in Windows

Posted on May 15, 2017 by kroartem

It required me some time to find an appropriate way to autologin into Windows 2102 Server. There are several ways of doing this but I found that typing

netplwiz.exe

In cmd is a good way to get things done and (as SO says) it this case it doesn’t store password in a clear way in registry.

It’s also stated that Autologon from Sysinternals can do the trick but I didn’t check it.

P.S. Some may notice it’s been a while I wasn’t here. I’ll write another post regarding this.

Posted in Uncategorized | Tagged testing | Leave a comment

Software Testing

Posted on August 30, 2015 by kroartem

Long time no posts, but I’m still alive and kicking!

Just finished an online course on Udacity — Software Testing.  Feels pretty interesting and not that hard to listen to (I was afraid my English skills degraded badly). However, still have to finish coding tasks, but there is a problem regarding these tasks. When I do something wrong, it shows something like “Incorrect. You’ve passed 3 out of 0 tests”, and I don’t get the point what is going wrong. 🙂 Also sometimes I don’t understand what exactly is needed from me, writing tasks’ text in python code doesn’t seem to be a good idea.

Anyway, I’m glad to watch this course and will continue with Software Debugging Automating the Boring Tasks. Hope to finish it and some other courses till the end of the year.

Posted in Uncategorized | Tagged automation, testing | Leave a comment

A few words about SmartClientWebDriver

Posted on August 11, 2014 by kroartem

Since I’ve touched SmartClientWebDriver at work, supporting a framework to test SmartGWT web-application, there is something I have to say. Do not agree to test SmartGWT’s applications!

Probably, I’m a bit harsh, but here is my point of view:

  • SmartClientWebDriver doesn’t have all information about what is implemented, why using their own driver instead of vanilla’s WebDriver, where to look for help and so on.
  • It doesn’t implement (or inherit) all methods WebDriver has. A short example: when test fails, it’s a good idea to make a screenshot to ease my life. Perhaps, it is just a connection issue and it’s a false-positive. Anyway, WebDriver has a possibility to make a screenshot of the browser’s window, but not SmartClientWebDriver. So the solution is… yes, pressing VK_PRINTSCREEN, the more stupid the more stable.
  • It has problems with timeouts (see my post)
  • Digging through autogenetated code is somewhat… uninteresting, to be polite.

In a nutshell, if somebody will ask me to work with SmartClientWebDriver again, the answer will be “NO!“

Posted in Uncategorized | Tagged automation, testing | Leave a comment

A simple revelation about WebDriver

Posted on May 1, 2014 by kroartem

Continuing my last post:

We’ve managed to make our framework faster and more stable. The answer was quite easy – seems like SmartClient implementation of WebDriver works incorrectly with timeouts. So

WebDriver wait = new WebDriver(driver,timeout).withTimeout(5, TimeUnit.SECONDS).pollingEvery(1,TimeUnit.SECONDS);

didn’t work properly. We’ve changed our code to this one:

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

And it does the trick. Now we’re polling ~every 5 milliseconds and it works correctly. So I assume it is a bug in SmartClient WebDriver, but who cares, if we already have a workaround? 🙂

Posted in Uncategorized | Tagged automation, testing, WebDriver | 1 Comment

One thing that disappointed me in Selenium WebDriver

Posted on April 9, 2014 by kroartem

Two days ago I was trying to speed-up our framework that eases work with Selenium Webdriver – we just write .xml files and then tests are working according to these files.

Whilst trying to do explicit wait, I mentioned one thing related to wait.until:

The functions’ return value if the function returned something different from null or false before the timeout expired.

So I need to do something like this because .withTimeout(30, SECONDS) .pollingEvery(5, SECONDS) doesn't seem to be working properly:

WebDriver wait = new WebDriver(driver,timeout).withTimeout(5, TimeUnit.SECONDS).pollingEvery(1,TimeUnit.SECONDS);

boolean check = true;

while(check){

try{

wait.until(ExpectedConditions.elementToBeClickable(By.xpath(xpath)));

break;}

catch (TimeutException ex) {continue;}}

 

I don’t catch NoSuchElementException as we don’t really care about it. The idea is that I want to check this element once or twice in a seconds and sometimes it works, sometimes not.

Posted in Uncategorized | Tagged automation, testing, WebDriver | Leave a comment

Начало работы с GoogleTest

Posted on February 20, 2014 by kroartem

Мой первый пост здесь на русском, но так будет проще.

Столкнувшись недавно с необходимостью покрыть код тестами, я стал искать фреймворк для тестирования кода. Навскидку можно сразу же назвать несколько: xUnit, Boost Test Library, и GoogleTest (далее GT). Посмотрев несколько обзоров на хабре и stackoverflow, остановился на GT.

На первый взгляд, примеры выглядят не так уж и сложно. Однако возникает вопрос, как вообще добавить GT к своему проекту? На мой взгляд, с этим есть небольшие проблемы.

Сначала (на deb-based дистрибутивах):

1. sudo apt-get install libgtest-dev

Этот пакет установит всего лишь сорцы (i.e. header-files). Скомпилировать пакет нужно самому. Код теперь лежит в /usr/src/gtest

Идем в эту директорию, говорим

2. sudo cmake CMakeLists.txt && sudo make && sudo cp *.a /usr/lib

Последний шаг самый важный, мы сделаем копии полученных библиотек в /usr/lib, которые при установке libgtest-dev почему-то не устанавливаются.

Теперь, когда мы разобрались с установкой, мы можем попробовать написать и собрать самый простой пример.

#include <gtest/gtest.h>
#include <math.h>

double squareRoot(const double a)
{
double b = sqrt(a);
if(b != b) //nan check
{
return -1.0;
}
else
{
return sqrt(a);
}
}

TEST(SquareRootTest, PositiveNos)
{
ASSERT_EQ(6, squareRoot(36.0));
ASSERT_EQ(18.0, squareRoot(324.0));
ASSERT_EQ(25.4, squareRoot(645.16));
ASSERT_EQ(0, squareRoot(0.0));
}

TEST(SquareRootTest, NegativeNos)
{
ASSERT_EQ(-1.0, squareRoot(-15.0));
ASSERT_EQ(-1.0, squareRoot(-0.2));
}

int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

Объяснять здесь вроде особо нечего. У нас есть функция, вычисляющая квадратный корень. Мы покрываем её тестами, одни тесты проверяют корректность if-ветки, вторые – else-ветки. Потом мы запускаем прогон всех тестов.

Собирать будем командой

g++ -I usr/include/ test2.cpp -lgtest -lpthread -o test1

Запускаем test1, и получаем примерно вот что:

./test1
[==========] Running 2 tests from 1 test case.
[———-] Global test environment set-up.
[———-] 2 tests from SquareRootTest
[ RUN      ] SquareRootTest.PositiveNos
[       OK ] SquareRootTest.PositiveNos (0 ms)
[ RUN      ] SquareRootTest.NegativeNos
[       OK ] SquareRootTest.NegativeNos (19 ms)
[———-] 2 tests from SquareRootTest (19 ms total)

[———-] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (19 ms total)
[  PASSED  ] 2 tests.

Что предстоит дальше – добавить сборку в cmake, и как-то сделать всё это дело более кроссплатформенным (попробовать под виндой).

P.S. Идеи, как заставить всё это работать, да и код тоже, были бессовестно взяты с нескольких зарубежных блогов.

Posted in Uncategorized | Tagged gtest, opensource, testing | Leave a comment

gcc: decrease binary size, eliminate unused functions/code

Posted on February 9, 2014 by kroartem

In SuperTuxKart, we have ~80 unused functions and some of them are really big. As I’m not sure whether they’re needed or not, I’ve googled for special gcc options.

Some links so I don’t forget:

http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Compilation-options.html

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffunction-sections-973

http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-Wl-1104

By default gcc won’t eliminate unused data/functions, but we can do it manually. As a result – decreasing ‘supertuxkart’ binary by 80kb. Not epic, especially when you know that binary is 11mb in size.

Posted in Uncategorized | Tagged gcc, linux, optimization | Leave a comment

Please make me unsee it

Posted on February 4, 2014 by kroartem

Please make me unsee it

It was 2014…

Posted in Uncategorized | Leave a comment
← Older posts
  • Recent Posts

    • Back from stasis
    • When you see warnings everywhere
    • Autologin in Windows
    • Software Testing
    • A few words about SmartClientWebDriver
  • Archives

    • October 2018
    • May 2017
    • August 2015
    • August 2014
    • May 2014
    • April 2014
    • February 2014
    • January 2014
    • June 2013
    • March 2013
    • February 2013
  • Categories

    • Uncategorized
  • Meta

    • Create account
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.com
  • Meta

    • Create account
    • Log in
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
  • kroartem
    View site in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar
Loading Comments...
Create your own website, free on WordPress.com.Create your own website.
Start free
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.