• Posts
  • About
  • Friends
Friends
  • 1
    0
    Image
    Pamador Posted 2019-10-31 01:10:10Z
    Azure Certificates [Clicked : 7]
    so, cloud again. we have many cloud providers, but there are 2 major ones
    AWS and Azure. google cloud platform is good but market is dominated by those AWS and Azure. AWS is first to enter into this, hence the advantage, but Azure is closing the gap real fast. Azure is more friendlier to normal users as well. it integrates better with other Microsoft services. in general it doesn't much matter which one to use IMHO. now, bout certificates, Microsoft announces role-based certificates recently. so before you pick the exam you think is necessary and do that one. Microsoft shifts the focus from product knowledge to a skills-based approach based on specific job roles. for example, you now have Azure Developer Associate role, then you need to pass the relevant exam (AZ 203) to be certified. exam covers the ground to be recognized as such. before that you need to pass 2 different set of exams, I guess. anyway, the basic fundamental Azure exam is AZ 900(Microsoft Azure Fundamentals) which is easy. it gives you the entry point to other exams and obtaining the role(s) required by your organization or your own desire. 

    there are plenty of resources available online, if you decide to sit for one of Azure exams. Microsoft its own leaning website, pluralsight, udemy etc. practice exams can be obtained as well. some good resources can be found on git hub too. 
    there are some study guide from people who passed the exam as well. 
    good luck
  • 1
    0
    Image
    Pamador Posted 2019-10-30 23:56:47Z
    Selenium & Specflow [Clicked : 5]
    Selenium is a automation testing framework for web pages. as it states in their web site is just "automates browsers". so say you have a website and you want to test it, then you need selenium. you have some options if you're new to Selenium. Selenium IDE, which comes in as a browser plugins (Firefox and Chrome). it's like a recorder. you lunch it, then you nviagte to the website under the test. you interact with the site i.e. click on links, fill forms, go back and forth etc. it records all of that. after that you  can play it back, so see the interaction. but you don't have the options to export the whole scenario as a test file in your language of choice. you need other plugin to achieve that (Katalon Recorder). however, using method like this is only good for start. it just gives you an idea how it works. for serious, testing and development, you need to look into using selenium framework in  your testing environment. it can be done in any programming language. if you use java, then you just get the required packages into your project. so if you have a maven project, then get it from maven repository page, put it into your pom and start coding against it to automate testing your website. or if you're into .Net, then you just download the required nuget packages into your project and start writing your tests. there are some design patterns and conventions needs to be followed if you want to do a proper testing, like page object model, annotation etc. 
    Now, Specflow is a different thing. it can be used in combination with selenium. it is just gives you more readable scenarios for your testing, then you can write your tests matching those scenarios steps. 
    Specflow is the .Net implementation of Cucumber(Java and others). 
    this was a short summary of Selenium and Specflow, however it is a big area to just cover in one post. I think you have enough to look into it, if you are mindful about BDD and testing in general. 
  • 3
    0
    Image
    Pamador Posted 2014-09-26 09:27:07Z
    Straight to the point.
    open up terminal and create a new Rails project, simple_test:

        $ rails new simple_test --skip-test-unit
        $ cd simple_test

    option --skip-test-unit, tells Rails not to generate a test directory associated with Test::Unit framework. this is because we want to use another testing framework named RSpec to write our tests.

    then we need to include RSpec Gem in 'Gemfile' in your project root directory

        group :development, :test do
          gem 'sqlite3', '1.3.8'
          gem 'rspec-rails', '2.13.1'
        end

        group :test do
          gem 'selenium-webdriver', '2.35.1'
          gem 'capybara', '2.1.0'
        end
      
    This includes rspec-rails in a development environment so that we have access to RSpec-specific generators, and it includes it in test mode in order to run the tests. We don’t have to install RSpec itself because it is a dependency of rspec-rails and will thus be installed automatically. We also include the Capybara gem, which allows us to simulate a user’s interaction with the sample application using a natural English-like syntax, together with Selenium, one of Capybara’s dependencies.

        $ bundle install

    it might be better to update the gems with bundle update to make sure the versions match, and then run bundle install to make sure the Gemfile.lock file is fully up-to-date.
    Next, we need to configure Rails to use RSpec in place of Test::Unit.

        $rails generate rspec:install

    you should see:

        create  .rspec
        create  spec
        create  spec/spec_helper.rb
    if you're using sublimeText, you can open the entire project by navigating to your project directory and then

        $ subl .

    or any other editor.
    ok, now we set to start developing. since we're following MVC pattern here, I jut give an short overview about that. model is your data access layer. view is your presentation layer, and controller is your business logic layer. business layer i.e. controllers, are between those 2 other layers.
    it means, if some data needs to be shown by presentation layer, i.e. views, it can't access the model (data access layer, or database side) by itself. it needs to go through the business layer i.e. controllers.
    now if you opened the entire project in your editor, and then go into 'app' folder in project root directory you'll see folders related to these layers, models, views, controller. there are some convention here which makes the development easier, which you can search it for yourself.
    now lets make a controller:

        rails generate controller StaticPages home help --no-test-framework

    --no-test-framework option suppresses the generation of the default RSpec tests, which we won’t be using. Instead, we’ll create the tests by hand. this will generates a controller, StaticPages, with 2 action methods : home and help, which both represent 2 pages(look into app/view/static_pages). now, since i just want to show how TDD works, i don't go into details on how writing tests for the existing code. instead suppose i want to add another page, About.
    In test-driven development, we first write a failing test, represented in many testing tools by the color red. We then implement code to get the test to pass, represented by the color green. Finally, if necessary, we refactor the code, changing its form (by eliminating duplication, for example) without changing its function. This cycle is known as “Red, Green, Refactor”.
    because here, i'll do integration testing we need to run following command:

        $ rails generate integration_test static_pages
          invoke  rspec
          create    spec/requests/static_pages_spec.rb

    This creates the static_pages_spec.rb in the spec/requests directory. As with most generated code to use the Capybara you need to add the following line in  spec/spec_helper.rb

        .
        .
        .
        RSpec.configure do |config|
          .
          .
          .
          config.include Capybara::DSL
        end

    checkpoint: now we have a controller, static_pages_controller, it has 2 action methods, home, help and we want to add another one, about. we have RSpec installed, and we execute the rails generate integration_test static_pages, which generated spec/requests/static_pages_spec.rb for us. we put our test inside that file.

    Actual TDD

    We’ll start the testing cycle by writing a failing test for the About page.

        in spec/requests/static_pages_spec.rb

        require 'spec_helper'

        describe "Static pages" do
          describe "About page" do

            it "should have the content 'About Us'" do
              visit '/static_pages/about'
              expect(page).to have_content('About Us')
            end
          end
         end

    if you run the RSpec using

        $ bundle exec rspec spec/requests/static_pages_spec.rb

    the output is very informative. it includes:

        No route matches [GET] "/static_pages/about"

    this means we need to add /static_pages/about to routes file in config/routes.rb

        get "static_pages/about"

    now running the test again

        $ bundle exec rspec spec/requests/static_pages_spec.rb

    complains that

        The action 'about' could not be found for StaticPagesController

    go to app/controllers/static_pages_controller.rb and add action for about, same as home and help actions
          
        def about
        end

    now running the test again

        $ bundle exec rspec spec/requests/static_pages_spec.rb

    says that we are missing a “template”, i.e., a view:

        Missing template static_pages/about

    To solve this issue, we add the about view. This involves creating a new file called about.html.erb in the app/views/static_pages directory with following content:   
    <h1>About Us </h1> Running the test again

        $ bundle exec rspec spec/requests/static_pages_spec.rb

    it should show us the green.
    to see the page you created, run the rails server in terminal:

        $rails server

    then in your browser navigate to

        0.0.0.0:3000/static_pages/about

    and you should see the about view you created.
    now suppose we want to write test to check the page title. we want the "About page" has the title "About Us". we write the test first:

        it "should have the title 'About Us'" do
          visit '/static_pages/about'
          expect(page).to have_title("About Us")
        end

    if you run the test

        $ bundle exec rspec spec/requests/static_pages_spec.rb

    it should fail

        expected #has_title?("About Us")

    The test uses the *have_title* method, which checks for an HTML title with the given content. In other words, the code

        expect(page).to have_title("About Us")

    to pass the test you just need to change the title of about page to "Abut Us" in its relevant view file in app/views folder, which is easy

    some side notes: 
    these tests are technically integration tests, however writing unit tests are similar. you just test the data based on your model, for example for invalid data, or password length. etc.
    I tried to be more detailed and descriptive, sorry if that's so long.all the steps have been tested on Kubuntu 14.04this was adopted mostly from http://www.railstutorial.org/if you see any errors, leave a comment please.
    better version can be found here <a href="http://krakenaround.blogspot.com.au/2014/08/simple-step-by-step-testing-in-ruby-on.html"> Test on Ruby On Rails </a>
    • 0 Comment(s)
    • Send Comment
  • 3
    0
    Image
    Pamador Posted 2014-07-09 10:31:51Z
    you know what the genymotion is. simply, it's emulator to run android app.straight to the point:
    1- Install virtualbox. the easiest way is to install it via Software Center. just search for it and then installyou have other options: navigate to VirtualBox  website, find your system installer package then install it, simpleor you can use 'wget' command.
    2- install Genymotion. you need to sign up to be able to download, which is free. to install genymotion open up terminal(CTRL+T) then run the following commands:you are in your home directory: cd Dowloandsgive executable permission to installation file. you might have different version: chmod +x genymotion-2.2.2_x64.binrun the installer:  ./genymotion-2.2.2_x64.binmove the directory to your home directory:                                                mv geymotion ~/.genymotionadd this executable path to make your life easier:  echo 'export PATH="/home/$USER/.genymotion:$PATH"' &gt;&gt; /.bashrc                       you don't have to add this but then you have to go to its directory and run it from there.now you can simply run it by : genymotion
    I had some problems after installation:Error while opening log file: /home//.Genymobile/genymotion.log what i did to solve this problem was that i created a hidden folder in the directory in error message and then just create a log file with that name. you need to replace the with your own user namecd home/mkdir .Genymobilecd .Genymobiletouch genymotion.log    
    Cannot mix incompatible Qt library i searched a lot to solve this problem, there were many solutions but the one actually worked was that just try to remove everyfile in genymotion instalation directory that are related to qt. you jut need to find files in every folder in installed directory with qt in their names and just delete them. that's it. now you can run genymotion by: genymotion  in terminal.after installation you can do whatever you want with it, it's simple and it's just configuring what you want and hitting next or ok.Goodluck
  • 2
    0
    Image
    Pamador Posted 2014-06-21 01:53:55Z
    http://zenpencils.com/comic/98-alan-watts-what-if-money-was-no-object/

    these are cool stuff..all of them
  • 2
    0
    Image
    Pamador Posted 2014-04-15 10:27:17Z
    Seriuosly [Clicked : 4]
    When you find your path, you must not be afraid. You need to have sufficient courage to make mistakes. Disappointment, defeat, and despair are the tools to show us the way.” 
    ― Paulo Coelho, Brida
    • 0 Comment(s)
    • Send Comment
  • 1
    0
    Image
    Pamador Posted 2014-04-06 08:53:03Z
    Never ever ever [Clicked : 6]
    http://9gag.com/gag/a5dDOgo
    • 0 Comment(s)
    • Send Comment
  • 1
    0
    Image
    Pamador Posted 2014-03-21 00:08:15Z
    class alone [Clicked : 2]
    http://tmblr.co/ZE1tmv1AeTiYk
    • 0 Comment(s)
    • Send Comment
  • 0
    0
    Image
    Pamador Posted 2014-03-15 01:50:21Z
    true me [Clicked : 4]
    http://tmblr.co/ZE1tmv19u7osE
  • 0
    0
    Image
    Pamador Posted 2014-03-08 09:57:23Z
    There are couple of ways to do that, here i just give one of the many ways.
    1- right click on kick off application launcher
    2- choose 'Edit Application'
    3- in left hand side of the windows, select System, then Konsole(Terminal)
    4 - when you select that, on the right hand side of the window, click on 'Advanced' tab
    5 - at the bottom of that tab you can set whatever shortcut key you like.then save the changes and start using.
    as i said there are other ways as well, however, i tried  this and it worked for me.

    as always, if you see an error point it out. if you have a better way, share it please
    • 0 Comment(s)
    • Send Comment
More ...