Weekly Report #12 — Unit Test— Firza

  1. learning how to do testing in Ruby on Rails from http://guides.rubyonrails.org/testing.html , http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
  2. Database: happystock_db. To connect to database, enter `psql -d happystock_db` in terminal. Table: `\dt`to view all database lists
  3. code Threshold.yml to test Threshold model
  4. add bug backlog in Pivotal
  5. deployment using Capistrano


Last week I asked by Bu Maya where and what is our database. She asked this question because I want to claim some points, those are: DBMS, refactoring, Framework. Unfortunately, I cant answer her question. But after I find out our database which use PSQL. Our database is ‘happystock_db’ and table Thresholds.

Bug / Ticket Tracking

Also, few weeks ago I solved some bugs related to query trend which most of them are already solved and already merged. Bug that hasnt solved yet is the graph is not shown. So I report this bug at Pivotal.


Last week, I started to learn how to test in Ruby on Rails. I refer to http://guides.rubyonrails.org/testing.html and http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html. What I learned is that there is a folder called ‘test’ where the developer create testing for controllers, models, etc. Because last 2 weeks I worked on query trend which involve Threshold model, I started to code on threshold.yml (which I already pushed to Master). But, I just get suggestion from @irfan3 that it’s better to refer to this https://www.relishapp.com/rspec/rspec-rails/docs/gettingstarted

Applying Algorithm and Data Structure

Data structure which I usually used is Active record, a data structur that represent relational database in rails. I use it since the first time I code Trend. The Active Record has class/model and object. Class that I used is Treshold and other used SpreeInventoryUnit, SpreeStockItem, etc. And the example of object is a tuple in table database represent one object. Some method that I usually used are .all, .find(:id), where(condition), .last. Also I add applied simple algorithm to query and show the Threshold data in Trend.


I did deployment by enter command ‘cap production deploy’ in terminal. I refer to this link about Capistrano https://github.com/capistrano/capistrano/blob/master/README.md

Red Panda

We are @firza_pratama, @idadidut, @irfan3, @kennabila, @pnteresa, and @shylla working on a challenging Software Engineering project at HappyFresh. Here, we share our stories.

    Muhammad Firza Pratama

    Written by

    Red Panda

    Red Panda

    We are @firza_pratama, @idadidut, @irfan3, @kennabila, @pnteresa, and @shylla working on a challenging Software Engineering project at HappyFresh. Here, we share our stories.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade